-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
resource/msk_scram_secret_association: update secret handling on read/update #16832
Conversation
1a2b060
to
222a8c0
Compare
222a8c0
to
824fe52
Compare
Hi @anGie44 , Great fix, thanks. It seems that 1 test is nos passing (goreleaser). Is it a normal behavior ?
Maybe it should appears like this:
What do you think ? Anyway, I tested it and it works very well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, trying to workaround how Terraform CLI and the Terraform Plugin SDK expect full management of all elements within a TypeList
/TypeSet
leads to problematic edge cases and breaks practitioner experience with the rest of the Terraform provider ecosystem. For example, setting up the resource in this manner prevents import
from working correctly as noted by the ImportStateVerifyIgnore
. It is likely best to approach the problem from a different angle.
If there really is a strong use case for 1:1 management like other association resources, it may be best to consider something along the lines of the following to treat that use case separately in the logic:
- Mark
secret_arn_list
asOptional
+Computed
- Add
secret_arn
as newTypeString
+Optional
+Computed
+ConflictsWith
attribute - In the import function, support an optional delimited import ID that triggers secondary behavior of
d.Set("secret_arn", ...)
andd.SetId()
with the cluster ARN - In the read function, perform
d.Get("secret_arn")
check against the list of secret ARNs to trigger resource recreation
Please reach out if you have questions.
Closing this per comment above, as solution should be approached differently to ensure resource's behavior does not lose functionality like |
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. |
Community Note
Closes #16791
Release note for CHANGELOG:
Output from acceptance testing: