JSON plan representation
The machine-readable form of a saved plan, produced by terraform show -json, which lists every planned change and value.
In more detail
Policy engines and review tools read it instead of parsing the human-readable plan. Like the plan file, it can contain secrets.
Example
terraform show -json tfplan > plan.jsonRelated terms
- terraform show — The command that prints the current state, or the contents of a saved plan file, in readable or JSON form.
- saved plan — A plan written to a file with -out, which terraform apply can later carry out exactly as reviewed.
- Open Policy Agent — A general-purpose policy engine that evaluates Rego policies against JSON input and returns a JSON decision.
Taught in
- Enforcing OPA Guardrails on Terraform Plan Payloads — Cloud Security & DevSecOps Engineering
- Running Terraform In CI — Infrastructure as Code with Terraform
- Native Testing With Tftest Files — Infrastructure as Code with Terraform
- Provider Mocking For Tests — Infrastructure as Code with Terraform
- Policy As Code With OPA — Infrastructure as Code with Terraform
- Releasing The Real Cloud Artifact — Infrastructure as Code with Terraform