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

feat(types.mdx): add hint for difference of tuples and lists #35957

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

corsin-ragettli
Copy link
Contributor

This PR adds a section to the Types list of the terraform docs. On this page, it wasn't explained on how lists and tuples differ. As seen in the documentation of the tolist function, they do clearly have a difference.

1.10.x

Draft CHANGELOG entry

ENHANCEMENTS

  • Added the differences between tuples and lists to the Types documentation

Copy link

hashicorp-cla-app bot commented Nov 6, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

@@ -80,6 +80,9 @@ List literals can be split into multiple lines for readability, but always
require a comma between values. A comma after the final value is allowed,
but not required. Values in a list can be arbitrary expressions.

Tuples do allow elements to have mixed data types, like `["a", 15, true]`.
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps better to link to the "Type Constraints" page which describes the types in more detail, or at least use the same verbiage to keep things consistent in the documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, thank you for your comment. I opted to directly link the Type Constraints page. Please let me know if I should change the wording

@crw crw added the waiting-response An issue/pull request is waiting for a response from the community label Nov 19, 2024
@corsin-ragettli corsin-ragettli requested review from a team as code owners November 21, 2024 09:32
rkoron007
rkoron007 previously approved these changes Nov 21, 2024
Copy link
Contributor

@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.

Looks good with a small style suggestion! ✨

website/docs/language/expressions/types.mdx Outdated Show resolved Hide resolved
@crw crw removed the waiting-response An issue/pull request is waiting for a response from the community label Nov 25, 2024
@crw crw 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 Nov 25, 2024
@crw crw merged commit f90d2ae into hashicorp:main Nov 25, 2024
7 of 8 checks passed
Copy link
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

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 documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants