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

Update HCL and go-cty to fix optional and default attributes #32178

Merged
merged 4 commits into from
Nov 10, 2022

Conversation

liamcervante
Copy link
Member

@liamcervante liamcervante commented Nov 7, 2022

  • Updates HCL
  • Updates go-cty
  • Add test cases that verify all the below issues are fixed

Target Release

1.3.5

Draft CHANGELOG entry

BUG FIXES

  • Fix Terraform creating objects that should not exist in variables that specify default attributes in optional objects.
  • Fix several Terraform crashes that are caused by HCL creating objects that should not exist in variables that specify default attributes in optional objects within collections.
  • Fix inconsistent behaviour in empty vs null collections

@liamcervante liamcervante added the 1.3-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Nov 9, 2022
@liamcervante liamcervante changed the title WIP: Update HCL and go-cty to fix optional and default attributes Update HCL and go-cty to fix optional and default attributes Nov 10, 2022
@liamcervante liamcervante requested review from alisdair and a team November 10, 2022 11:22
@liamcervante liamcervante marked this pull request as ready for review November 10, 2022 11:23
Copy link
Contributor

@alisdair alisdair left a comment

Choose a reason for hiding this comment

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

Great idea to add tests here as well as upstream, that really helps codify Terraform's expectations of the cty/hcl behaviour!

@liamcervante liamcervante merged commit 0c7fda1 into main Nov 10, 2022
@liamcervante liamcervante deleted the liamcervante/make-default-attributes-work-again branch November 10, 2022 14:00
@github-actions
Copy link
Contributor

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

crw pushed a commit that referenced this pull request Nov 18, 2022
* Add test cases to verify all the default and optional issues are fixed

* actually commit all the tests

* update go-cty

* Update hcl
crw pushed a commit that referenced this pull request Nov 18, 2022
* Add test cases to verify all the default and optional issues are fixed

* actually commit all the tests

* update go-cty

* Update hcl
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.3-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
2 participants