Difference between revisions of "Terraform output"

From wikieduonline
Jump to navigation Jump to search
Line 12: Line 12:
 
  terraform output -raw cluster_name
 
  terraform output -raw cluster_name
 
  education-eks-Ry318DCv%
 
  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.
 +
  
  

Revision as of 20:28, 29 November 2021

terraform output command is used to extract the value of an output variable from the state file.


terraform output your_var
terraform output -raw region
us-east-2%
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.
╵



Related commands

See also

Advertising: