Terraform 1 cheatsheet
Terraform 1: Variables, targets and outputs
7 common Terraform 1 tasks.
Apply a single resource
Limit the run to one resource and what it depends on.
terraform apply -target=aws_instance.web
Caution: Targeting is for exceptional situations. It can leave other resources out of sync.
Force a resource to be recreated
Destroy and recreate a resource. This replaces the old taint command.
terraform apply -replace=aws_instance.web
Caution: Recreating a resource can cause downtime and data loss.
Read one output as a plain value
Print a single output without quotes, handy in scripts.
terraform output -raw db_endpoint