From the course: Advanced Terraform

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Output variables

Output variables

- [Instructor] Computer programs typically have return values that report the status of an operation. Terraform output variables are like the return values of a configuration. Output values have a name and a value. The name is a string unique to the configuration. The value can be any attribute of any resource in the configuration, and it may be of any type supported by Terraform. In the integrated terminal execute terraform show s1.tfplan. This output shows the contents of the plan we created earlier. Note that many of these entries say, "Known after apply." Terraform won't know what these values are until the configuration is deployed, because those values are assigned by GCP when the resource is created. There are many situations where we'll want to output some of those values to pass them on to later steps in an infrastructure deployment. At this point, you can follow along with me, or just execute git checkout 02 03…

Contents