-
Notifications
You must be signed in to change notification settings - Fork 673
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
Add path to invoke update without determining changed CRN data, add validator for name of secrets #4859
Merged
hkantare
merged 12 commits into
IBM-Cloud:master
from
jared-hayes-dev:terraform-ingress-update-secret-validate-name
Oct 25, 2023
Merged
Add path to invoke update without determining changed CRN data, add validator for name of secrets #4859
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
59ca57e
update + validate
bd91c17
Merge branch 'IBM-Cloud:master' into terraform-ingress-update-secret-…
jared-hayes-dev 13cba28
invalid name tests
49702b6
updated to add new tf only flag for update + tests
58180d6
update false positives
28ddaa2
update secret int
cdbd195
update docs
e24be7d
fetch upstream
3b0bce8
secrets audit
3a75909
pr comments
45555b7
updated tests
d815ea8
Merge branch 'master' into terraform-ingress-update-secret-validate-name
hkantare File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
update_secret
is never set in the code withd.Set
. if I get it right, terraform will detect this field as changed on every apply, if the field is not empty.this can be verified with a test, where you apply the same testAccCheckIBMContainerIngressSecretOpaqueForceUpdate configuration twice.
you can to use
d.Set
and update the state after theingressAPI.UpdateIngressSecret
.( or if this behaviour works for you, the field can be modified to a boolean. )
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.
I was unable to replicate the behavior you mentioned either by running the test in the code with the same config again or by manually using my own terraform plan/resources. I see the
update_secret
field reflected in the state file and terraform doesn't execute an update on a repeat apply of the same config should the variable remain unchanged. I also took a look at the above mentioned fieldretry_patch_version
whose patternupdate_secret
was modeled after and I didn't see any instances of that implementation using thed.set
either. Although even in the case it did update every time that would be acceptable behavior. Please let me know if there are any other concerns.I also went ahead and updated the tests to validate this behavior:
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.
I wasn't sure about this one.
thank you Jared for looking into it!