-
Notifications
You must be signed in to change notification settings - Fork 104
Splitting up the "Set configuration parameters" page #1170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Vercel Previews Deployed
|
Broken Link CheckerNo broken links found! 🎉 |
| "permanent": true | ||
| }, | ||
| // values → parameterize | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting these out for now until we know the new paths.
trujillo-adam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've done what has been asked, but I'm not sure we're there yet. Of course, I could be way off. Let's sync up outside this PR.
|
|
||
| </CodeBlockConfig> | ||
|
|
||
| Depending on whether an output value is defined in your root module or a child module, you can access the information exposed in different ways. Terraform displays root module output values in the CLI after you apply your configuration, and if you are using HCP Terraform, your workspace's overview page lists your configuration's outputs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Depending on whether an output value is defined in your root module or a child module, you can access the information exposed in different ways. Terraform displays root module output values in the CLI after you apply your configuration, and if you are using HCP Terraform, your workspace's overview page lists your configuration's outputs. | |
| ## Reference data exposed by the `output` block | |
| Depending on whether an output value is defined in your root module or a child module, you can access the information exposed in different ways. Terraform displays root module output values in the CLI after you apply your configuration, and if you are using HCP Terraform, your workspace's overview page lists your configuration's outputs. |
Maybe "Consume data exposed . . ." is a better way to characterize it? It seems like there's at least two parts: add the output block to expose the information and then do something with it, which is what the rest of this section seems to be about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think I'm wrong about what this paragraph is about, but I'm leaving the comment here for discussion. I think this is actually about determining which attributes you can reference and expose. Correct? Aren't outputs also described in the provider documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more about explicitly stating the child module outputs are only available to their parent module.
I split this up into two sections to make it clearer that we are talking about accessing output values, then adding a subsection about child modules:
## Access output values
Depending where you define an output value, you can access the information a module exposes in different ways. Terraform displays root module output values in the CLI after you apply your configuration. If you are using HCP Terraform, your workspace's overview page also lists your configuration's outputs.
### Child module outputs
Defining an `output` block in a child module exposes that value to the parent module. You can use outputs to pass a value from a child module to a parent module. Parent modules can access child module outputs using `module.<CHILD_MODULE_NAME>.<OUTPUT_NAME>` syntax.
etc.
| > **Hands-on:** Try the [Customize Terraform Configuration with Variables](/terraform/tutorials/configuration-language/variables?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial. | ||
| Add `variable` blocks to your configuration so that module consumers can pass in specific input values. This lets module consumers customize module behavior without altering the module's source code. Variables define the interface of your module by specifying what values your module accepts as arguments. | ||
| Variables define the interface of your module by specifying what values your module accepts as arguments. The `variable` block lets your module consumers customize module behavior without altering the module's source code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider removing lines 10-12 and starting with the paragraph at line 35 following by the paragraph at line 14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer the intro was broad, so folks understand what this page is about, before it gets super specific in the following sections.
I'll split the difference with:
"
Variables define the input interface of your module by specifying what values your module accepts as arguments.
Terraform sets up resources with hardcoded values the same way every time, making your module inflexible and potentially hard to reuse. If you know a value in your configuration changes between Terraform operations, you can replace that value with a variable block. A variable block lets module consumers customize module behavior without altering the module's source code.
"
then leaving the following section so they can learn how to define a variable block.
Made an overview and re-adding separate variables, locals, and outputs usage pages. I made this just for v1.12 to make reviewing easier, but after we finalize this, I'll go fix all the links and add redirects in 1.13 and 1.14 as well!