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

r/elasticsearch_domin: use tags as KeyValueTags type instead of as []*elasticsearchservice.Tag in UpdateTags #21738

Merged
merged 2 commits into from
Nov 11, 2021

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Nov 11, 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

Closes #20498

Output from acceptance testing (with code change):

=== RUN   TestAccElasticsearchDomainDataSource_Data_advanced
=== PAUSE TestAccElasticsearchDomainDataSource_Data_advanced
=== CONT  TestAccElasticsearchDomainDataSource_Data_advanced
--- PASS: TestAccElasticsearchDomainDataSource_Data_advanced (1401.62s)

Output from acceptance testing (without code change):

=== RUN   TestAccElasticsearchDomainDataSource_Data_advanced
=== PAUSE TestAccElasticsearchDomainDataSource_Data_advanced
=== CONT  TestAccElasticsearchDomainDataSource_Data_advanced
    domain_data_source_test.go:51: Step 1/1 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        An execution plan has been generated and is shown below.
        Resource actions are indicated with the following symbols:
          ~ update in-place
         <= read (data resources)
        
        Terraform will perform the following actions:
        
          # data.aws_elasticsearch_domain.test will be read during apply
          # (config refers to values not yet known)
         <= data "aws_elasticsearch_domain" "test"  {
              ~ access_policies           = jsonencode(
                    {
                      - Statement = [
                          - {
                              - Action    = "es:*"
                              - Effect    = "Allow"
                              - Principal = "*"
                              - Resource  = "arn:aws:es:us-west-2:*******:domain/test-es-3701786318374044886/*"
                            },
                        ]
                      - Version   = "2012-10-17"
                    }
                ) -> (known after apply)
              ~ advanced_options          = {
                  - "override_main_response_version"         = "false"
                  - "rest.action.multi.allow_explicit_index" = "true"
                } -> (known after apply)
              ~ advanced_security_options = [
                  - {
                      - enabled                        = false
                      - internal_user_database_enabled = false
                    },
                ] -> (known after apply)
              ~ arn                       = "arn:aws:es:us-west-2:*******:domain/test-es-3701786318374044886" -> (known after apply)
              ~ cluster_config            = [
                  - {
                      - dedicated_master_count   = 0
                      - dedicated_master_enabled = false
                      - dedicated_master_type    = ""
                      - instance_count           = 2
                      - instance_type            = "t2.small.elasticsearch"
                      - warm_count               = 0
                      - warm_enabled             = false
                      - warm_type                = ""
                      - zone_awareness_config    = [
                          - {
                              - availability_zone_count = 2
                            },
                        ]
                      - zone_awareness_enabled   = true
                    },
                ] -> (known after apply)
              ~ cognito_options           = [
                  - {
                      - enabled          = false
                      - identity_pool_id = ""
                      - role_arn         = ""
                      - user_pool_id     = ""
                    },
                ] -> (known after apply)
              ~ created                   = true -> (known after apply)
              ~ deleted                   = false -> (known after apply)
              ~ domain_id                 = "*******/test-es-3701786318374044886" -> (known after apply)
              ~ ebs_options               = [
                  - {
                      - ebs_enabled = true
                      - iops        = 0
                      - volume_size = 20
                      - volume_type = "gp2"
                    },
                ] -> (known after apply)
              ~ elasticsearch_version     = "1.5" -> (known after apply)
              ~ encryption_at_rest        = [
                  - {
                      - enabled    = false
                      - kms_key_id = ""
                    },
                ] -> (known after apply)
              ~ endpoint                  = "vpc-test-es-3701786318374044886-u7nswcfkpnjqs2ib3uwxnqo3i4.us-west-2.es.amazonaws.com" -> (known after apply)
              ~ id                        = "arn:aws:es:us-west-2:*******:domain/test-es-3701786318374044886" -> (known after apply)
              ~ kibana_endpoint           = "vpc-test-es-3701786318374044886-u7nswcfkpnjqs2ib3uwxnqo3i4.us-west-2.es.amazonaws.com/_plugin/kibana/" -> (known after apply)
              ~ log_publishing_options    = [
                  - {
                      - cloudwatch_log_group_arn = "arn:aws:logs:us-west-2:*******:log-group:test-es-3701786318374044886"
                      - enabled                  = true
                      - log_type                 = "INDEX_SLOW_LOGS"
                    },
                ] -> (known after apply)
              ~ node_to_node_encryption   = [
                  - {
                      - enabled = false
                    },
                ] -> (known after apply)
              ~ processing                = false -> (known after apply)
              ~ snapshot_options          = [
                  - {
                      - automated_snapshot_start_hour = 23
                    },
                ] -> (known after apply)
              ~ tags                      = {} -> (known after apply)
              ~ vpc_options               = [
                  - {
                      - availability_zones = [
                          - "us-west-2a",
                          - "us-west-2b",
                        ]
                      - security_group_ids = [
                          - "sg-0da6055a2dfdbdd73",
                        ]
                      - subnet_ids         = [
                          - "subnet-08d711d42ca468ad1",
                          - "subnet-09a041bafd06afd9e",
                        ]
                      - vpc_id             = "vpc-098bfc466539ebfc8"
                    },
                ] -> (known after apply)
                # (1 unchanged attribute hidden)
            }
        
          # aws_elasticsearch_domain.test will be updated in-place
          ~ resource "aws_elasticsearch_domain" "test" {
                id                    = "arn:aws:es:us-west-2:*******:domain/test-es-3701786318374044886"
              ~ tags                  = {
                  + "Domain" = "TestDomain"
                }
              ~ tags_all              = {
                  + "Domain" = "TestDomain"
                }
                # (8 unchanged attributes hidden)
        
        
        
        
        
        
        
        
        
        
                # (10 unchanged blocks hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccElasticsearchDomainDataSource_Data_advanced (2031.73s)

@github-actions github-actions bot added the size/XS Managed by automation to categorize the size of a PR. label Nov 11, 2021
@anGie44 anGie44 changed the title r/elasticsearch_domin: use tags as KeyValueTags type instead of as []*elasticsearch.Tag in UpdateTags r/elasticsearch_domin: use tags as KeyValueTags type instead of as []*elasticsearchservice.Tag in UpdateTags Nov 11, 2021
@anGie44 anGie44 added the bug Addresses a defect in current functionality. label Nov 11, 2021
@ewbankkit
Copy link
Contributor

Needs a CHANGELOG entry.

@anGie44
Copy link
Contributor Author

anGie44 commented Nov 11, 2021

Acceptance Testing (in progress):

--- PASS: TestAccElasticsearchDomain_duplicate (708.83s)
--- PASS: TestAccElasticsearchDomainPolicy_basic (1134.97s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_indexSlowLogs (1241.30s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_searchSlowLogs (1385.91s)
--- PASS: TestAccElasticsearchDomain_v23 (1394.53s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_iam (1497.77s)
--- PASS: TestAccElasticsearchDomain_vpc (1640.35s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_disabled (1659.14s)
--- PASS: TestAccElasticsearchDomainDataSource_Data_basic (1717.60s)
--- PASS: TestAccElasticsearchDomainDataSource_Data_advanced (1872.08s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_userDB (1964.74s)
--- PASS: TestAccElasticsearchDomain_requireHTTPS (2115.81s)
--- PASS: TestAccElasticsearchDomain_basic (2423.64s)
--- PASS: TestAccElasticsearchDomain_customEndpoint (2540.00s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_auditLogs (1607.33s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestSpecify_key (1196.21s)
--- PASS: TestAccElasticsearchDomain_policy (1442.25s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_esApplicationLogs (2128.15s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestDefault_key (1448.71s)
--- PASS: TestAccElasticsearchDomain_tags (1254.02s)
--- PASS: TestAccElasticsearchDomain_WithVolumeType_missing (1021.67s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsCreateAndRemove (1767.09s)
--- PASS: TestAccElasticsearchDomain_VPC_update (3080.73s)
--- PASS: TestAccElasticsearchDomain_nodeToNodeEncryption (1495.13s)
--- PASS: TestAccElasticsearchDomain_withDedicatedMaster (3163.47s)

--- FAIL: TestAccElasticsearchDomain_UpdateVolume_type (1540.75s) -- looks unrelated (advanced options drift)
--- FAIL: TestAccElasticsearchDomain_complex (1897.82s) -- looks unrelated (advanced options drift)

Test failures linked to #21318

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

@anGie44 anGie44 added the service/elasticsearch Issues and PRs that pertain to the elasticsearch service. label Nov 11, 2021
@anGie44 anGie44 added this to the v3.65.0 milestone Nov 11, 2021
@anGie44 anGie44 merged commit 46a70eb into main Nov 11, 2021
@anGie44 anGie44 deleted the elasticsearch-domain-tags-test branch November 11, 2021 21:13
github-actions bot pushed a commit that referenced this pull request Nov 11, 2021
@github-actions
Copy link

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

@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
bug Addresses a defect in current functionality. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_elasticsearch_domain resource is created without tags
2 participants