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

bugfix/wiz_control_associations: fix for issue#34 #163

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

cvirtucio
Copy link
Contributor

@cvirtucio cvirtucio commented Aug 15, 2023

Description

This is a bug fix for issue#34. A couple of things were happening:

Diffs were appearing even for the same control ID values in the same order

I am not entirely sure yet why this is the case. Supposedly terraform will not present a diff if the values and their order are the same. I think terraform is presenting a diff
because of some internal state that shows the resource data is getting modified at all. So we gate the call to d.Set("control_ids") on the presence of actual
differences in the cleanControls and the resource data's control IDs.

ForceNew was forcing destruction of association

I am not entirely sure why ForceNew is even necessary since the association isn't a real resource, and just calls the UpdateControl mutation on the wiz GraphQL API. And that update certainly happens in-place, rather than requiring a complete re-creation.

@gramsa49 gramsa49 merged commit f187d5e into AxtonGrams:main Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants