Skip to content
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

Documentation for linking Stacks #36408

Merged
merged 11 commits into from
Feb 4, 2025
Merged

Documentation for linking Stacks #36408

merged 11 commits into from
Feb 4, 2025

Conversation

rkoron007
Copy link
Contributor

@rkoron007 rkoron007 commented Jan 31, 2025

Importing our docs outline into Github

Summary and pages affected:

  1. Added the publish_output and upstream_input blocks to the deployment configuration reference
  2. Added small mentions of inputs and outputs to "Design a Stack" article
  3. New article on passing data from one stack to another

Target Release

1.11.x

CHANGELOG entry

(This is user-facing, but I'll leave the changelog entry to the team when this comes out)

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@rkoron007 rkoron007 added the 1.11-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Jan 31, 2025
@rkoron007 rkoron007 self-assigned this Jan 31, 2025
@rkoron007 rkoron007 marked this pull request as ready for review January 31, 2025 19:49
@rkoron007 rkoron007 requested review from a team as code owners January 31, 2025 19:49
@rkoron007 rkoron007 requested a review from mikegolus January 31, 2025 19:49
@rkoron007 rkoron007 added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Jan 31, 2025
@rkoron007 rkoron007 requested a review from shernandez5 January 31, 2025 20:01
Copy link
Contributor

@Uk1288 Uk1288 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from the technical perspective 🎉

Copy link
Contributor

@trujillo-adam trujillo-adam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great first draft. Let me know if you have any questions about these suggestions.

website/data/language-nav-data.json Outdated Show resolved Hide resolved
website/docs/language/stacks/deploy/link-stacks.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/deploy/link-stacks.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/deploy/link-stacks.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/deploy/link-stacks.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/reference/tfdeploy.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/reference/tfdeploy.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/reference/tfdeploy.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/reference/tfdeploy.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/reference/tfdeploy.mdx Outdated Show resolved Hide resolved
rkoron007 and others added 2 commits February 3, 2025 17:28
Copy link
Contributor Author

@rkoron007 rkoron007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops didn't mean this as a review - but posting anyway cause I don't want to lose my comments 😂

website/docs/language/stacks/deploy/link-stacks.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/deploy/link-stacks.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/deploy/link-stacks.mdx Outdated Show resolved Hide resolved
website/docs/language/stacks/deploy/link-stacks.mdx Outdated Show resolved Hide resolved
```

</CodeBlockConfig>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Is correct!
  2. So, Stacks have a different VCS workflowIs actually a bit fuzzy depending on how you set up your Stack the first time. Most folks use a VCS-linked Stack so when you push to Github, HCP Terraform makes a new configuration version that you can apply (which is different then a deployment plan that rolls out a configuration version once it's been applied). There is also a second workflow you can go through manually, so you literally push the "Fetch configuration" button to start a configuration plan.

Since this article isn't about the second point (and we are in the Terraform language docs, not the HCP Terraform docs), I felt like it'd be distracting to talk about how to apply the configuration versus what folks care about here - which is that you have to apply it before the outputs are available.

website/docs/language/stacks/deploy/link-stacks.mdx Outdated Show resolved Hide resolved

# Declare outputs

You must declare a `publish_output` block in your deployment configuration for each value you want to output from your current Stack.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to explain what an expression is here, or how to reference a value. Wouldn't that be what we'd want to put in a reference article? This is usage so that feels a bit excessive, what I'm trying to communicate is:

  1. Declare a publish_output for each value you want to output from your Stack (can be value).
  2. Here is an example of what that looks like.
  3. To use this output, HCP Terraform needs to fetch your configuration and apply it.
  4. Look at the reference article if you want to learn more about syntax.

Copy link
Contributor

@crw crw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved per request of @rkoron007. Did a quick review but do not have the context to know if the content is correct. Be forewarned.

@rkoron007 rkoron007 merged commit 8f1b79a into main Feb 4, 2025
9 checks passed
@rkoron007 rkoron007 deleted the RK/linked-stacks branch February 4, 2025 22:11
rkoron007 added a commit that referenced this pull request Feb 4, 2025
@rkoron007 rkoron007 added the 1.10-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.10-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged 1.11-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged no-changelog-needed Add this to your PR if the change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants