Skip to content

Instantly share code, notes, and snippets.

@suibinz
Created June 17, 2021 16:06
Show Gist options
  • Save suibinz/650d287dc9c2c4b7cbdfcc39a61edd96 to your computer and use it in GitHub Desktop.
Save suibinz/650d287dc9c2c4b7cbdfcc39a61edd96 to your computer and use it in GitHub Desktop.
terrform-validator json char error
Run /tmp/terraform-validator validate /tmp/plan.out.json --policy-path="/tmp/policy-library" --verbose
/tmp/terraform-validator validate /tmp/plan.out.json --policy-path="/tmp/policy-library" --verbose
shell: /usr/bin/bash -e {0}
env:
GOOGLE_CREDENTIALS: ***
GOOGLE_APPLICATION_CREDENTIALS: /tmp/google.json
CLOUDSDK_METRICS_ENVIRONMENT: github-actions-setup-gcloud
TERRAFORM_CLI_PATH: /home/runner/work/_temp/1758e47d-fc34-4904-bce3-49e563d78065
2021/06/17 15:56:20 [INFO] Authenticating using DefaultClient...
2021/06/17 15:56:20 [INFO] -- Scopes: [https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloud-identity https://www.googleapis.com/auth/ndev.clouddns.readwrite https://www.googleapis.com/auth/devstorage.full_control https://www.googleapis.com/auth/userinfo.email]
Error: converting tfplan to CAI assets: reading resource changes: reading JSON plan: invalid character 'c' looking for beginning of value
Usage:
terraform-validator validate <tfplan> [flags]
Flags:
--ancestry string Override the ancestry location of the project when validating resources
-h, --help help for validate
--offline Do not make network requests
--output-json Print violations as JSON
--policy-path string Path to directory containing validation policies
--project string Provider project override (override the default project configuration assigned to the google terraform provider when validating resources)
Global Flags:
--verbose Log output to stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment