Plan with a var file

Build a plan with prod variables and save it to a file

terraform plan -var-file=prod.tfvars -out=prod.tfplan

tool
terraform43 commands
tags
terraform

More terraform commands

  • terraform apply prod.tfplan

    Apply exactly the plan you saved before, without a second confirmation

  • terraform state show 'aws_instance.web[0]'

    Show all attributes of one resource in state

  • terraform state mv 'aws_instance.web' 'module.app.aws_instance.web'

    Rename a resource or move it into a module without destroying it

  • terraform import 'aws_s3_bucket.mybucket' my-existing-bucket

    Put an existing S3 bucket under Terraform control

  • terraform taint 'aws_instance.web[0]'

    Mark a resource to be destroyed and created again on the next apply

all 43 terraform commands