Difference between revisions of "Terraform show"

From wikieduonline
Jump to navigation Jump to search
Line 9: Line 9:
 
* <code>[[terraform show (output example)]]</code> (output example)
 
* <code>[[terraform show (output example)]]</code> (output example)
 
* [[Terraform show output example aws_instance]]
 
* [[Terraform show output example aws_instance]]
* <code>[[terraform show (grep resource) | terrafrom show | grep resource]]</code>
+
* <code>[[terraform show (grep resource) | terraform show | grep resource]]</code>
 
* <code>terraform show | grep [[public_ip]]</code>
 
* <code>terraform show | grep [[public_ip]]</code>
 
* <code>terraform show | grep -w [[Name]]</code>
 
* <code>terraform show | grep -w [[Name]]</code>

Revision as of 02:46, 28 February 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
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.
╵


Changelog

  • terraform show: the JSON plan output now indicates which state values are sensitive. (#28889)

Related terms

See also

Advertising: