Interview Prep/Terraform/Workflow and CLI

How do you view outputs and the current state?

BeginnerConceptWorkflow and CLI
Answer

terraform output prints root outputs (-json or -raw for scripting). terraform show renders the state or a saved plan; terraform show -json tfplan gives machine-readable JSON for policy tools. terraform state list lists addresses.

terraform output -raw db_endpoint
terraform show -json tfplan | jq '.resource_changes[].change.actions'
All Terraform questions Roadmap: Terraform

More on Workflow and CLI