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

Remove all or none of object keys in set #818

Closed
wants to merge 1 commit into from

Conversation

shakhovski
Copy link

@shakhovski shakhovski commented Jan 11, 2022

Description

These changes are meant to fix #817 issue. It is meant that all 'set' attributes are always present. If e.g. 'type' attribute is not defined in configuration, it however is stored in state as "". Whereas diff functions consider such an attribute as removed since it is changed from "" in state to nil in configuration. This behavior causes issues described in #817.
The idea is to consider an element is 'set' as removed only if all its attributes are marked as removed.

I'm not a go/tf developer, so my reasoning may be complete nonsense. At least it fixes #817.

Acceptance tests

  • Have you added an acceptance test for the functionality being added?

Release Note

Release note for CHANGELOG:

...

References

#817

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

@hashicorp-cla
Copy link

hashicorp-cla commented Jan 11, 2022

CLA assistant check
All committers have signed the CLA.

@jrhouston
Copy link
Contributor

hi @shakhovski thanks for opening this, but the change you've made is actually to a dependency of this project so we can't accept it. Code in the vendor/ directory is dependencies that are brought in from the go.mod file via the go mod vendor command. You will have to open a PR against the dependent project terraform-plugin-sdk.

@shakhovski
Copy link
Author

hi @shakhovski thanks for opening this, but the change you've made is actually to a dependency of this project so we can't accept it. Code in the vendor/ directory is dependencies that are brought in from the go.mod file via the go mod vendor command. You will have to open a PR against the dependent project terraform-plugin-sdk.

@jrhouston, thanks, got it. There are 3 newer versions of terraform-plugin-sdk, so it looks like formally I'll have to check with the latest version, although at the first glance the issue is still there.
Closing this one in favor of the possible another one on terraform-plugin-sdk.

@shakhovski shakhovski closed this Jan 17, 2022
@github-actions
Copy link

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 issues.
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 Feb 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants