Show a resource in state

Show all attributes of one resource in state

terraform state show 'aws_instance.web[0]'

tool
terraform43 commands
tags
terraformdebug

More terraform commands

  • 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

  • terraform state rm 'aws_instance.legacy'

    Remove a resource from state without destroying it in the cloud

  • terraform output -json | jq 'to_entries[] | {(.key): .value.value}'

    Print each output as a short {name: value} JSON object

all 43 terraform commands