-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
fix: Fix policy_version inconsistent result after apply error for aws_opensearchserverless_lifecycle_policy and aws_opensearchserverless_security_policy #39528
fix: Fix policy_version inconsistent result after apply error for aws_opensearchserverless_lifecycle_policy and aws_opensearchserverless_security_policy #39528
Conversation
Community NoteVoting for Prioritization
For Submitters
|
f602573
to
165d248
Compare
165d248
to
d5e62eb
Compare
…_opensearchserverless_security_policy
aws_opensearchserverless_lifecycle_policy
d5e62eb
to
b3d5cb8
Compare
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.
LGTM 🎉
% make testacc PKG=opensearchserverless TESTS="TestAccOpenSearchServerlessLifecyclePolicy_|TestAccOpenSearchServerlessSecurityPolicy_"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/opensearchserverless/... -v -count 1 -parallel 20 -run='TestAccOpenSearchServerlessLifecyclePolicy_|TestAccOpenSearchServerlessSecurityPolicy_' -timeout 360m
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_disappears (18.74s)
--- PASS: TestAccOpenSearchServerlessLifecyclePolicy_disappears (18.76s)
--- PASS: TestAccOpenSearchServerlessLifecyclePolicy_basic (20.82s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_basic (21.15s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_string (25.25s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_stringUpdate (26.11s)
--- PASS: TestAccOpenSearchServerlessLifecyclePolicy_update (26.75s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_update (26.77s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/opensearchserverless 32.293s
Thanks for your contribution, @acwwat! 👍 |
This functionality has been released in v5.70.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Description
This PR fixes an issue where the
policy_version
for theaws_opensearchserverless_lifecycle_policy
resource and theaws_opensearchserverless_security_policy
resource produces an inconsistent value after apply on update. It seems that theUseStateForUnknown
modifier requires that the value be the same before and after apply. Instead of using this, manually setting the API input value using the state value seems to resolve the issue.Relations
Closes #39527
References
n/a
Output from Acceptance Testing