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

elasticsearch/domain: Fix erroneous/perpetual diffs #22157

Merged
merged 5 commits into from
Dec 10, 2021

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Dec 10, 2021

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates #21968
Fixes #21318

Output from acceptance testing (us-west-2):

% make testacc TESTS=TestAccElasticsearchDomainPolicy_basic PKG=elasticsearch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticsearch/... -v -count 1 -parallel 20 -run='TestAccElasticsearchDomainPolicy_basic' -timeout 180m
--- PASS: TestAccElasticsearchDomainPolicy_basic (823.38s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticsearch	824.587s
% make testacc TESTS=TestAccElasticsearchDomain_ PKG=elasticsearch 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticsearch/... -v -count 1 -parallel 20 -run='TestAccElasticsearchDomain_' -timeout 180m
--- PASS: TestAccElasticsearchDomain_tags (971.96s)
--- PASS: TestAccElasticsearchDomain_duplicate (1027.46s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestDefault_key (1112.15s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_disabled (1135.75s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_userDB (1370.42s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_iam (1459.18s)
--- PASS: TestAccElasticsearchDomain_vpc (1525.17s)
--- PASS: TestAccElasticsearchDomain_WithVolumeType_missing (1545.25s)
--- PASS: TestAccElasticsearchDomain_v23 (1548.27s)
--- PASS: TestAccElasticsearchDomain_complex (1872.67s)
--- PASS: TestAccElasticsearchDomain_nodeToNodeEncryption (1062.26s)
--- PASS: TestAccElasticsearchDomain_internetToVPCEndpoint (2179.81s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestSpecify_key (1269.59s)
--- PASS: TestAccElasticsearchDomain_basic (2358.95s)
--- PASS: TestAccElasticsearchDomain_AutoTuneOptions (2404.21s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_indexSlowLogs (2740.99s)
--- PASS: TestAccElasticsearchDomain_policyIgnoreEquivalent (905.34s)
--- PASS: TestAccElasticsearchDomain_customEndpoint (2035.13s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_auditLogs (1363.53s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_esApplicationLogs (1700.13s)
--- PASS: TestAccElasticsearchDomain_VPC_update (3325.24s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_searchSlowLogs (1297.84s)
--- PASS: TestAccElasticsearchDomain_UpdateVolume_type (3509.18s)
--- PASS: TestAccElasticsearchDomain_withDedicatedMaster (3562.54s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsUpdate (2025.81s)
--- PASS: TestAccElasticsearchDomain_requireHTTPS (2443.21s)
--- PASS: TestAccElasticsearchDomain_update (3644.01s)
--- PASS: TestAccElasticsearchDomain_Update_version (3903.51s)
--- PASS: TestAccElasticsearchDomain_policy (2425.65s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsCreateAndRemove (3233.68s)
--- PASS: TestAccElasticsearchDomain_warm (5621.80s)
--- PASS: TestAccElasticsearchDomain_Cluster_zoneAwareness (7262.76s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticsearch	8634.652s

Output from acceptance testing (GovCloud):

% make testacc TESTS=TestAccElasticsearchDomainPolicy_basic PKG=elasticsearch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticsearch/... -v -count 1 -parallel 20 -run='TestAccElasticsearchDomainPolicy_basic' -timeout 180m
--- PASS: TestAccElasticsearchDomainPolicy_basic (898.67s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticsearch	900.063s
% make testacc TESTS=TestAccElasticsearchDomain_ PKG=elasticsearch 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticsearch/... -v -count 1 -parallel 20 -run='TestAccElasticsearchDomain_' -timeout 180m
--- PASS: TestAccElasticsearchDomain_basic (973.34s)
--- PASS: TestAccElasticsearchDomain_v23 (1094.99s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_disabled (1328.73s)
--- PASS: TestAccElasticsearchDomain_policy (1340.51s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_userDB (1343.02s)
--- PASS: TestAccElasticsearchDomain_complex (1427.38s)
--- PASS: TestAccElasticsearchDomain_AutoTuneOptions (1501.09s)
--- PASS: TestAccElasticsearchDomain_vpc (1684.41s)
--- PASS: TestAccElasticsearchDomain_WithVolumeType_missing (1906.89s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_indexSlowLogs (1936.80s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_iam (2012.46s)
--- PASS: TestAccElasticsearchDomain_internetToVPCEndpoint (2393.89s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_esApplicationLogs (1097.49s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_auditLogs (1419.20s)
--- PASS: TestAccElasticsearchDomain_duplicate (2546.77s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsUpdate (2630.96s)
--- PASS: TestAccElasticsearchDomain_policyIgnoreEquivalent (787.64s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestDefault_key (1056.35s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_searchSlowLogs (1504.06s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsCreateAndRemove (1940.36s)
--- PASS: TestAccElasticsearchDomain_update (2952.99s)
--- PASS: TestAccElasticsearchDomain_tags (1521.31s)
--- PASS: TestAccElasticsearchDomain_VPC_update (3301.64s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestSpecify_key (1004.86s)
--- PASS: TestAccElasticsearchDomain_customEndpoint (2212.54s)
--- PASS: TestAccElasticsearchDomain_requireHTTPS (1625.63s)
--- PASS: TestAccElasticsearchDomain_Update_version (3673.64s)
--- PASS: TestAccElasticsearchDomain_withDedicatedMaster (3845.54s)
--- PASS: TestAccElasticsearchDomain_UpdateVolume_type (3944.38s)
--- PASS: TestAccElasticsearchDomain_nodeToNodeEncryption (2332.22s)
--- PASS: TestAccElasticsearchDomain_warm (5086.78s)
--- PASS: TestAccElasticsearchDomain_Cluster_zoneAwareness (6335.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticsearch	7764.565s

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. flex Pertains to FLatteners and EXpanders. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. service/cloudwatchlogs service/ecs Issues and PRs that pertain to the ecs service. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. service/kinesisanalyticsv2 Issues and PRs that pertain to the kinesisanalyticsv2 service. service/kms Issues and PRs that pertain to the kms service. service/s3 Issues and PRs that pertain to the s3 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.) labels Dec 10, 2021
@YakDriver YakDriver merged commit 01f06a3 into main Dec 10, 2021
@YakDriver YakDriver deleted the b-elasticsearch-equivalent-policy-diffs branch December 10, 2021 18:44
@github-actions github-actions bot added this to the v3.70.0 milestone Dec 10, 2021
github-actions bot pushed a commit that referenced this pull request Dec 10, 2021
@github-actions
Copy link

This functionality has been released in v3.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!

@lukvdborne
Copy link

Using Terraform 1.0.10 (darwin_arm64) and the AWS provider v3.72.0, I still get perpetual diffs after having upgraded from ES 7.x to OS 1.1. As per AWS documentation, the advanced setting is set to true after an upgrade/migration.

However, we wish to remove this setting or set it to false. Remove the setting will display

  # aws_elasticsearch_domain.domain will be updated in-place
  ~ resource "aws_elasticsearch_domain" "domain" {
      ~ advanced_options      = {
          - "override_main_response_version"         = "true" -> null
            # (1 unchanged element hidden)
        }

each time.

Setting the value to false will return an error:

Error: ValidationException: Unrecognized advanced option 'override_main_response_version' passed in advancedOptions.

Setting it to true will remove the diff (as expected). This is however not the setting we want.

@mrsiejas
Copy link

Same here, seeing validation exception on provider version = "4.5.0". Also using darwin_arm64 - is it possible that fix ended up only on linux/amd64 platform?

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flex Pertains to FLatteners and EXpanders. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. service/ecs Issues and PRs that pertain to the ecs service. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. service/kinesisanalyticsv2 Issues and PRs that pertain to the kinesisanalyticsv2 service. service/kms Issues and PRs that pertain to the kms service. service/s3 Issues and PRs that pertain to the s3 service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Perpetual diff in aws_elasticsearch_domain when advanced_options are set
3 participants