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

[Docs] Clarify Dependency Management in Style Guide #35259

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

makmn1
Copy link

@makmn1 makmn1 commented May 30, 2024

I was reading through the Terraform docs and got confused by a statement which I believe is unclear or incorrect. This is on the "Style Guide" page under "Code style" (link):

Let your code build on itself: define dependent resources after the resources that reference them.

The line above states that dependent resources should be defined after the resources that reference them (so other dependent resources that depend on this dependent resource). However, shouldn't resources always be defined before the resources that reference them? That's what I gather from the "Let your code build on itself" principle and examples elsewhere in the docs.

I think the following change would make this clearer and self-explanatory:

Let your code build on itself: define dependent resources after the resources they reference.

This change clarifies that referenced resources should be defined before the resources that depend on them, which isn't what the original text seems to describe.

Copy link

hashicorp-cla-app bot commented May 30, 2024

CLA assistant check
All committers have signed the CLA.

@crw
Copy link
Collaborator

crw commented Jun 3, 2024

Thanks for this submission! I will notify the docs team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants