Difference between revisions of "Terraform show"
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
== Examples == | == Examples == | ||
* <code>[[terraform show (output example)]]</code> (output example) | * <code>[[terraform show (output example)]]</code> (output example) | ||
− | |||
− | |||
* <code>terraform show | egrep -w "[[resource]]|[[data]]" | grep -v "#"</code> | * <code>terraform show | egrep -w "[[resource]]|[[data]]" | grep -v "#"</code> | ||
* <code>[[terraform show (grep resource) | terraform show | grep -w resource]]</code> | * <code>[[terraform show (grep resource) | terraform show | grep -w resource]]</code> | ||
Line 18: | Line 16: | ||
* <code>terraform show | grep [[instance_type]]</code> | * <code>terraform show | grep [[instance_type]]</code> | ||
* <code>terraform show | grep [[instance_state]]</code> | * <code>terraform show | grep [[instance_state]]</code> | ||
+ | * [[Terraform show output example aws_instance]] | ||
terraform show | terraform show |
Revision as of 20:42, 22 September 2022
terraform show
command provides human-readable output from a state or plan file.
https://www.terraform.io/docs/cli/commands/show.html
terraform init
->terraform plan
->terraform apply
->terraform show
Examples
terraform show (output example)
(output example)terraform show | egrep -w "resource|data" | grep -v "#"
terraform show | grep -w resource
terraform show | grep -w data | grep -v "#"
terraform show | egrep -w "instance_state|public_ip"
terraform show | grep -w public_ip
terraform show | grep -w Name
terraform show | grep instance_type
terraform show | grep instance_state
- Terraform show output example aws_instance
terraform show No state.
terraform show (no output)
Examples with errors
terraform show ╷ │ Error: Module not installed │ │ on /path_to_file/main.tf line 3: │ 3: module "compute" { │ │ This module is not yet installed. Run "terraform init" to install all modules required by this configuration. ╵
│ Error: Backend initialization required, please run "terraform init"
Changelog
terraform show
: the JSON plan output now indicates which state values are sensitive. (#28889)
Related terms
terraform state list
terraform state pull
terraform state show aws_instance.MYexample
terraform apply
terraform destroy
Error: Module not installed
terraform output
See also
terraform show
,terraform show (output example)
,terraform state show module.my compute
terraform show --help
,terraform show (grep resource)
,terraform show my wrong name
,terraform show (grep aws instance)
- Terraform state:
terraform [ state | replace-provider | mv ]
,backend.tf
, Remote state backends to manage Terraform state, State locking,terraform force-unlock
Advertising: