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_domain - tag on create + refactor to use waiter and finder packages #18082

Merged
merged 18 commits into from
Dec 21, 2021

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Mar 13, 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 #20544

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSElasticSearchDomain_'
--- PASS: TestAccElasticsearchDomain_WithVolumeType_missing (877.51s)
--- PASS: TestAccElasticsearchDomain_nodeToNodeEncryption (900.18s)
--- PASS: TestAccElasticsearchDomain_policy (926.87s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_searchSlowLogs (927.84s)
--- PASS: TestAccElasticsearchDomain_duplicate (529.13s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_esApplicationLogs (989.10s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_auditLogs (1030.62s)
--- PASS: TestAccElasticsearchDomain_update (1990.95s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsUpdate (1683.11s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestSpecify_key (1201.23s)
--- PASS: TestAccElasticsearchDomain_internetToVPCEndpoint (2659.77s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsCreateAndRemove (1794.31s)
--- PASS: TestAccElasticsearchDomain_UpdateVolume_type (2708.25s)
--- PASS: TestAccElasticsearchDomain_complex (914.07s)
--- PASS: TestAccElasticsearchDomain_Update_version (2998.24s)
--- PASS: TestAccElasticsearchDomain_v23 (659.78s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_iam (1284.14s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_indexSlowLogs (1187.19s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_userDB (1388.94s)
--- PASS: TestAccElasticsearchDomain_requireHTTPS (1343.83s)
--- PASS: TestAccElasticsearchDomain_customEndpoint (1352.31s)
--- PASS: TestAccElasticsearchDomain_Cluster_zoneAwareness (4028.55s)

@ghost ghost added size/XL Managed by automation to categorize the size of a PR. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Mar 13, 2021
@DrFaust92 DrFaust92 marked this pull request as ready for review March 14, 2021 20:58
@DrFaust92 DrFaust92 requested a review from a team as a code owner March 14, 2021 20:58
@DrFaust92 DrFaust92 force-pushed the r/elasticsearch_tag_on_create branch from ec81be8 to 5cd3f9e Compare March 27, 2021 16:10
@DrFaust92 DrFaust92 force-pushed the r/elasticsearch_tag_on_create branch from 72a31fa to 8ce4010 Compare July 7, 2021 19:13
@wajdiail
Copy link

Just checking when this MR will be merged. We are waiting for this feature

@mattheidelbaugh
Copy link

Seconded we are also waiting on this

@DrFaust92 DrFaust92 added the enhancement Requests to existing resources that expand the functionality or scope. label Sep 24, 2021
@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@anGie44 anGie44 self-assigned this Nov 11, 2021
@anGie44
Copy link
Contributor

anGie44 commented Nov 15, 2021

Hi @DrFaust92 👋 do you mind fixing up the merge conflicts that came up after the service packages refactor when you have a moment?

@github-actions github-actions bot added the sweeper Pertains to changes to or issues with the sweeper. label Nov 19, 2021
@DrFaust92
Copy link
Collaborator Author

@anGie44 rebased + more fixes but didnt get to run all tests yet.

@anGie44
Copy link
Contributor

anGie44 commented Nov 19, 2021

thank you @DrFaust92 ! No worries about running the tests, I can do so on my end 👍

@DrFaust92
Copy link
Collaborator Author

@anGie44 i see something else was merged and now it created a conflict. would like me to rebase and try to take care of it or you will look into it?

@anGie44
Copy link
Contributor

anGie44 commented Dec 16, 2021

Hey @DrFaust92 -- apologies for not getting back to this sooner and the merge conflicts! i'll have a look and rebase

@anGie44 anGie44 force-pushed the r/elasticsearch_tag_on_create branch from 5f768b8 to 38c761b Compare December 17, 2021 14:12
@anGie44 anGie44 force-pushed the r/elasticsearch_tag_on_create branch from 38c761b to 6be0e46 Compare December 17, 2021 14:13
@anGie44 anGie44 force-pushed the r/elasticsearch_tag_on_create branch from 77db51f to c9fd1c3 Compare December 17, 2021 15:09
@anGie44
Copy link
Contributor

anGie44 commented Dec 17, 2021

Hi again @DrFaust92 -- so i rebased and merged back in the changes from https://github.com/hashicorp/terraform-provider-aws/pull/22157/files#diff-06ff9b94aba8bd561ec9bbcca77f52542eb0bc702f2b43c5c73f8a467797bd95 which added the new function advancedOptionsIgnoreDefault . originally, you updated the d.Set("advanced_options", ...) to use the flex packages map flattener so if you think there is a bug there do you mind creating a new PR with that change and the test config changes as it looks like TestAccElasticsearchDomain_complex (and update) are now failing as expected since the configured advanced_options are not returned in state after import.

@DrFaust92
Copy link
Collaborator Author

@anGie44 i dont recall atm why i did it but i do remember failures around that test (and others) in regards to advanced_options. ill take a look again later but if the fixes you added make the test work as expected than its probably better than my changes 👍

@anGie44
Copy link
Contributor

anGie44 commented Dec 17, 2021

Thanks @DrFaust92 -- i think for the scope of this PR, I would just recommend removing the test config additions:

  "override_main_response_version"         = "false"
    "rest.action.multi.allow_explicit_index" = "true"

and then add a changelog entry and we should be good to go 👍

@anGie44 anGie44 added this to the v3.71.0 milestone Dec 21, 2021
@anGie44
Copy link
Contributor

anGie44 commented Dec 21, 2021

Output of acceptance tests (commercial):

--- PASS: TestAccElasticsearchDomainDataSource_Data_advanced (1788.44s)
--- PASS: TestAccElasticsearchDomainDataSource_Data_basic (1046.39s)
--- PASS: TestAccElasticsearchDomainPolicy_basic (1356.43s)
--- PASS: TestAccElasticsearchDomainSamlOptions_Disabled (2650.71s)
--- PASS: TestAccElasticsearchDomainSamlOptions_Update (1878.07s)
--- PASS: TestAccElasticsearchDomainSamlOptions_basic (1983.97s)
--- PASS: TestAccElasticsearchDomainSamlOptions_disappears (1379.58s)
--- PASS: TestAccElasticsearchDomainSamlOptions_disappears_Domain (1434.56s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_disabled (1172.60s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_iam (1398.29s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_userDB (1297.78s)
--- PASS: TestAccElasticsearchDomain_AutoTuneOptions (2080.80s)
--- PASS: TestAccElasticsearchDomain_Cluster_zoneAwareness (5685.77s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestDefault_key (1438.40s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestSpecify_key (2504.77s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_auditLogs (1447.30s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_esApplicationLogs (1714.02s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_indexSlowLogs (1027.60s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_searchSlowLogs (1670.37s)
--- PASS: TestAccElasticsearchDomain_UpdateVolume_type (3735.18s)
--- PASS: TestAccElasticsearchDomain_Update_version (3839.77s)
--- PASS: TestAccElasticsearchDomain_VPC_update (2738.44s)
--- PASS: TestAccElasticsearchDomain_WithVolumeType_missing (811.79s)
--- PASS: TestAccElasticsearchDomain_basic (1043.95s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsCreateAndRemove (2284.04s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsUpdate (2069.46s)
--- PASS: TestAccElasticsearchDomain_complex (1039.04s)
--- PASS: TestAccElasticsearchDomain_customEndpoint (2823.50s)
--- PASS: TestAccElasticsearchDomain_disappears (1473.62s)
--- PASS: TestAccElasticsearchDomain_duplicate (833.60s)
--- PASS: TestAccElasticsearchDomain_internetToVPCEndpoint (2390.55s)
--- PASS: TestAccElasticsearchDomain_nodeToNodeEncryption (943.10s)
--- PASS: TestAccElasticsearchDomain_policy (1183.45s)
--- PASS: TestAccElasticsearchDomain_policyIgnoreEquivalent (960.67s)
--- PASS: TestAccElasticsearchDomain_requireHTTPS (3572.18s)
--- PASS: TestAccElasticsearchDomain_tags (853.91s)
--- PASS: TestAccElasticsearchDomain_update (2370.28s)
--- PASS: TestAccElasticsearchDomain_v23 (1258.82s)
--- PASS: TestAccElasticsearchDomain_vpc (2983.09s)
--- PASS: TestAccElasticsearchDomain_warm (5328.24s)
--- PASS: TestAccElasticsearchDomain_withDedicatedMaster (4630.98s)

Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

@DrFaust92 , i've reverted the test config back to the state of main and everything's passing again with the refactor changes. Thanks again for these changes!

@anGie44 anGie44 merged commit 687d2e2 into hashicorp:main Dec 21, 2021
@DrFaust92 DrFaust92 deleted the r/elasticsearch_tag_on_create branch December 27, 2021 11:27
@github-actions
Copy link

github-actions bot commented Jan 6, 2022

This functionality has been released in v3.71.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 May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource/aws_elasticsearch_domain: Now supports tagging on creation
5 participants