Plan with var file terraform
Generate plan with prod variables, save to file
terraform plan -var-file=prod.tfvars -out=prod.tfplan
more terraform
all 43 commands →
Apply saved plan
terraform apply prod.tfplan
Show resource in state
terraform state show 'aws_instance.web[0]'
Move resource in state
terraform state mv 'aws_instance.web' 'module.app.aws_instance.web'
Import existing resource
terraform import 'aws_s3_bucket.mybucket' my-existing-bucket
Taint resource for recreation
terraform taint 'aws_instance.web[0]'