Query outputs with jq terraform
Pipe machine-readable outputs into jq for scripting and downstream wiring
terraform output -json | jq -r '.endpoints.value[]'
more terraform
all 43 commands →
Trace plan with TF_LOG
TF_LOG=DEBUG TF_LOG_PATH=tf.log terraform plan
Plan with var file
terraform plan -var-file=prod.tfvars -out=plan.tfplan
Apply a saved plan
terraform apply plan.tfplan
Import existing resource
terraform import module.path.resource_type.name <remote-id>
Show state for a resource
terraform state show module.path.resource_type.name