-
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
r/aws_opensearch_domain: handle unset auto_tune_options.rollback_on_disable #37394
Conversation
Community NoteVoting for Prioritization
For Submitters
|
This fixes an issue observed during domain creation when `auto_tune_options` are configured. `auto_tune_options` are set after the cluster becomes active via the `UpdateDomain` API. The provider was not waiting for this update to complete before calling the read operation, which can result in incorrect `auto_tune_options` data being written to state. The appropriate waiter has been added to prevent this failure mode.
…isable Previously omitting this optional argument resulted in a failure when creating or updating the domain: ``` Error: modifying config for OpenSearch Domain: ValidationException: 1 validation error detected: Value '' at 'autoTuneOptions.rollbackOnDisable' failed to satisfy constraint: Member must satisfy enum value set: [DEFAULT_ROLLBACK, NO_ROLLBACK] ``` The `auto_tune_options` expander logic has been updated to properly handle cases where `rollback_on_disable` is unset. ```console % make testacc PKG=opensearch TESTS=TestAccOpenSearchDomain_autoTuneOptions ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.22.2 test ./internal/service/opensearch/... -v -count 1 -parallel 20 -run='TestAccOpenSearchDomain_autoTuneOptions' -timeout 360m --- PASS: TestAccOpenSearchDomain_autoTuneOptions (1915.20s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/opensearch 1920.265s ```
…n_disable Previously omitting this optional argument resulted in a failure when creating or updating the domain: ``` Error: modifying config for OpenSearch Domain: ValidationException: 1 validation error detected: Value '' at 'autoTuneOptions.rollbackOnDisable' failed to satisfy constraint: Member must satisfy enum value set: [DEFAULT_ROLLBACK, NO_ROLLBACK] ``` The `auto_tune_options` expander logic has been updated to properly handle cases where `rollback_on_disable` is unset. ```console % make testacc PKG=elasticsearch TESTS=TestAccElasticsearchDomain_AutoTuneOptions ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.22.2 test ./internal/service/elasticsearch/... -v -count 1 -parallel 20 -run='TestAccElasticsearchDomain_AutoTuneOptions' -timeout 360m === RUN TestAccElasticsearchDomain_AutoTuneOptions === PAUSE TestAccElasticsearchDomain_AutoTuneOptions === CONT TestAccElasticsearchDomain_AutoTuneOptions --- PASS: TestAccElasticsearchDomain_AutoTuneOptions (2287.79s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/elasticsearch 2292.708s ```
245fd1f
to
fb7a829
Compare
This functionality has been released in v5.49.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
Previously omitting this optional argument resulted in a failure when creating or updating the domain:
The
auto_tune_options
expander logic has been updated to properly handle cases whererollback_on_disable
is unset.Also adds a missing waiter in create operation when
auto_tune_options
are configured.Relations
Closes #37234
References
Output from Acceptance Testing