Editing Terraform output

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{lowercase}} <code>terraform output</code><ref>https://www.terraform.io/docs/cli/commands/output.html</ref> command is used to extract the value of an [[output variable]] from the [[state file]].
+
{{lowercase}}
  
[[terraform]] output ([[terraform output --help|--help]])
+
<code>terraform output</code> command is used to extract the value of an [[output variable]] from the [[state file]].
[[terraform output -json]]
+
* https://www.terraform.io/docs/cli/commands/output.html
[[terraform output -raw]]
 
  
== Examples ==
 
terraform output
 
[[kubernetes_cluster_host]] = "35.225.206.41"
 
[[kubernetes_cluster_name]] = "cluster-name-gke"
 
[[project_id]] = "your-project"
 
[[region]] = "[[us-central1]]"
 
  
terraform output your_var
 
  
[[terraform output -raw]] [[region]]
 
[[us-east-2]]%
 
 
[[terraform output -raw region]]
 
[[us-east-1]]%
 
 
[[terraform output -raw cluster_name]]
 
education-eks-Ry318DCv%
 
 
 
 
terraform output -raw region
 
 
│ Warning: No outputs found
 
 
│ The state file either has no outputs defined, or all the defined outputs are
 
│ empty. Please define an output in your configuration with the `output`
 
│ keyword and run `terraform refresh` for it to become available. If you are
 
│ using interpolation, please verify the interpolated value is not empty. You
 
│ can use the `terraform console` command to assist.
 
 
 
 
* <code>[[aws eks]] --region $([[terraform output]] -raw region) [[update-kubeconfig]] --name $(terraform output -raw cluster_name)</code>
 
  
 
== Related commands ==
 
== Related commands ==
 
* <code>[[terraform apply]]</code>
 
* <code>[[terraform apply]]</code>
 
* <code>[[outputs.tf]]</code>
 
* <code>[[outputs.tf]]</code>
* <code>[[terraform show]]</code>
 
* <code>[[terraform state pull]]</code>
 
* <code>[[terragrunt output]]</code>
 
  
 
== See also ==
 
== See also ==
* {{terraform output}}
+
* {{terraform cmd}}
* {{tf state}}
+
* {{Terraform}}
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: