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/aws_elasticache_cluster: require one of engine or replication_group_id #20482

Merged
merged 11 commits into from
Feb 3, 2022

Conversation

GavinWu1991
Copy link
Contributor

@GavinWu1991 GavinWu1991 commented Aug 8, 2021

…ired

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 #18514

Output from acceptance testing:

make testacc TESTARGS='-run=TestAccAWSElasticacheCluster_*'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSElasticacheCluster_* -timeout 180m
=== RUN   TestAccAWSElasticacheCluster_Engine_Memcached
=== PAUSE TestAccAWSElasticacheCluster_Engine_Memcached
=== RUN   TestAccAWSElasticacheCluster_Engine_Redis
=== PAUSE TestAccAWSElasticacheCluster_Engine_Redis
=== RUN   TestAccAWSElasticacheCluster_Engine_None
=== PAUSE TestAccAWSElasticacheCluster_Engine_None
=== RUN   TestAccAWSElasticacheCluster_Port_Redis_Default
=== PAUSE TestAccAWSElasticacheCluster_Port_Redis_Default
=== RUN   TestAccAWSElasticacheCluster_ParameterGroupName_Default
=== PAUSE TestAccAWSElasticacheCluster_ParameterGroupName_Default
=== RUN   TestAccAWSElasticacheCluster_Port
=== PAUSE TestAccAWSElasticacheCluster_Port
=== RUN   TestAccAWSElasticacheCluster_SecurityGroup_Ec2Classic
=== PAUSE TestAccAWSElasticacheCluster_SecurityGroup_Ec2Classic
=== RUN   TestAccAWSElasticacheCluster_snapshotsWithUpdates
=== PAUSE TestAccAWSElasticacheCluster_snapshotsWithUpdates
=== RUN   TestAccAWSElasticacheCluster_NumCacheNodes_Decrease
=== PAUSE TestAccAWSElasticacheCluster_NumCacheNodes_Decrease
=== RUN   TestAccAWSElasticacheCluster_NumCacheNodes_Increase
=== PAUSE TestAccAWSElasticacheCluster_NumCacheNodes_Increase
=== RUN   TestAccAWSElasticacheCluster_NumCacheNodes_IncreaseWithPreferredAvailabilityZones
=== PAUSE TestAccAWSElasticacheCluster_NumCacheNodes_IncreaseWithPreferredAvailabilityZones
=== RUN   TestAccAWSElasticacheCluster_vpc
=== PAUSE TestAccAWSElasticacheCluster_vpc
=== RUN   TestAccAWSElasticacheCluster_multiAZInVpc
=== PAUSE TestAccAWSElasticacheCluster_multiAZInVpc
=== RUN   TestAccAWSElasticacheCluster_AZMode_Memcached
=== PAUSE TestAccAWSElasticacheCluster_AZMode_Memcached
=== RUN   TestAccAWSElasticacheCluster_AZMode_Redis
=== PAUSE TestAccAWSElasticacheCluster_AZMode_Redis
=== RUN   TestAccAWSElasticacheCluster_EngineVersion_Memcached
=== PAUSE TestAccAWSElasticacheCluster_EngineVersion_Memcached
=== RUN   TestAccAWSElasticacheCluster_EngineVersion_Redis
=== PAUSE TestAccAWSElasticacheCluster_EngineVersion_Redis
=== RUN   TestAccAWSElasticacheCluster_NodeTypeResize_Memcached
=== PAUSE TestAccAWSElasticacheCluster_NodeTypeResize_Memcached
=== RUN   TestAccAWSElasticacheCluster_NodeTypeResize_Redis
=== PAUSE TestAccAWSElasticacheCluster_NodeTypeResize_Redis
=== RUN   TestAccAWSElasticacheCluster_NumCacheNodes_Redis
=== PAUSE TestAccAWSElasticacheCluster_NumCacheNodes_Redis
=== RUN   TestAccAWSElasticacheCluster_ReplicationGroupID_AvailabilityZone
=== PAUSE TestAccAWSElasticacheCluster_ReplicationGroupID_AvailabilityZone
=== RUN   TestAccAWSElasticacheCluster_ReplicationGroupID_SingleReplica
=== PAUSE TestAccAWSElasticacheCluster_ReplicationGroupID_SingleReplica
=== RUN   TestAccAWSElasticacheCluster_ReplicationGroupID_MultipleReplica
=== PAUSE TestAccAWSElasticacheCluster_ReplicationGroupID_MultipleReplica
=== RUN   TestAccAWSElasticacheCluster_Memcached_FinalSnapshot
=== PAUSE TestAccAWSElasticacheCluster_Memcached_FinalSnapshot
=== RUN   TestAccAWSElasticacheCluster_Redis_FinalSnapshot
=== PAUSE TestAccAWSElasticacheCluster_Redis_FinalSnapshot
=== CONT  TestAccAWSElasticacheCluster_Engine_Memcached
=== CONT  TestAccAWSElasticacheCluster_AZMode_Memcached
=== CONT  TestAccAWSElasticacheCluster_ReplicationGroupID_SingleReplica
=== CONT  TestAccAWSElasticacheCluster_Port_Redis_Default
=== CONT  TestAccAWSElasticacheCluster_snapshotsWithUpdates
=== CONT  TestAccAWSElasticacheCluster_multiAZInVpc
=== CONT  TestAccAWSElasticacheCluster_vpc
=== CONT  TestAccAWSElasticacheCluster_NumCacheNodes_IncreaseWithPreferredAvailabilityZones
=== CONT  TestAccAWSElasticacheCluster_NumCacheNodes_Increase
=== CONT  TestAccAWSElasticacheCluster_NumCacheNodes_Decrease
=== CONT  TestAccAWSElasticacheCluster_ParameterGroupName_Default
=== CONT  TestAccAWSElasticacheCluster_SecurityGroup_Ec2Classic
=== CONT  TestAccAWSElasticacheCluster_ReplicationGroupID_AvailabilityZone
=== CONT  TestAccAWSElasticacheCluster_ReplicationGroupID_MultipleReplica
=== CONT  TestAccAWSElasticacheCluster_Port
=== CONT  TestAccAWSElasticacheCluster_Engine_None
=== CONT  TestAccAWSElasticacheCluster_Memcached_FinalSnapshot
=== CONT  TestAccAWSElasticacheCluster_EngineVersion_Redis
=== CONT  TestAccAWSElasticacheCluster_EngineVersion_Memcached
=== CONT  TestAccAWSElasticacheCluster_AZMode_Redis
=== CONT  TestAccAWSElasticacheCluster_SecurityGroup_Ec2Classic
    ec2_classic_test.go:54: this test can only run in EC2-Classic, platforms available in us-east-1: ["VPC"]
--- SKIP: TestAccAWSElasticacheCluster_SecurityGroup_Ec2Classic (6.60s)
=== CONT  TestAccAWSElasticacheCluster_NodeTypeResize_Memcached
--- PASS: TestAccAWSElasticacheCluster_Engine_None (141.42s)
=== CONT  TestAccAWSElasticacheCluster_NumCacheNodes_Redis
--- PASS: TestAccAWSElasticacheCluster_Memcached_FinalSnapshot (142.44s)
=== CONT  TestAccAWSElasticacheCluster_NodeTypeResize_Redis
--- PASS: TestAccAWSElasticacheCluster_NumCacheNodes_Redis (76.00s)
=== CONT  TestAccAWSElasticacheCluster_Redis_FinalSnapshot
--- PASS: TestAccAWSElasticacheCluster_AZMode_Memcached (573.21s)
=== CONT  TestAccAWSElasticacheCluster_Engine_Redis
--- PASS: TestAccAWSElasticacheCluster_Engine_Memcached (604.41s)
--- PASS: TestAccAWSElasticacheCluster_Port (628.26s)
--- PASS: TestAccAWSElasticacheCluster_Port_Redis_Default (640.91s)
--- PASS: TestAccAWSElasticacheCluster_AZMode_Redis (641.17s)
--- PASS: TestAccAWSElasticacheCluster_ParameterGroupName_Default (645.82s)
--- PASS: TestAccAWSElasticacheCluster_vpc (647.13s)
--- PASS: TestAccAWSElasticacheCluster_snapshotsWithUpdates (689.58s)
--- PASS: TestAccAWSElasticacheCluster_multiAZInVpc (711.13s)
--- PASS: TestAccAWSElasticacheCluster_NumCacheNodes_IncreaseWithPreferredAvailabilityZones (880.05s)
--- PASS: TestAccAWSElasticacheCluster_NumCacheNodes_Decrease (889.16s)
--- PASS: TestAccAWSElasticacheCluster_Redis_FinalSnapshot (771.04s)
--- PASS: TestAccAWSElasticacheCluster_NumCacheNodes_Increase (1041.92s)
--- PASS: TestAccAWSElasticacheCluster_Engine_Redis (498.51s)
--- PASS: TestAccAWSElasticacheCluster_NodeTypeResize_Memcached (1132.55s)
--- PASS: TestAccAWSElasticacheCluster_ReplicationGroupID_AvailabilityZone (1265.56s)
--- PASS: TestAccAWSElasticacheCluster_EngineVersion_Memcached (1282.64s)
--- PASS: TestAccAWSElasticacheCluster_ReplicationGroupID_MultipleReplica (1312.40s)
--- PASS: TestAccAWSElasticacheCluster_ReplicationGroupID_SingleReplica (1327.16s)
--- PASS: TestAccAWSElasticacheCluster_NodeTypeResize_Redis (1223.83s)
--- PASS: TestAccAWSElasticacheCluster_EngineVersion_Redis (1816.63s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1818.654s
...

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/elasticache Issues and PRs that pertain to the elasticache service. needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 8, 2021
@GavinWu1991 GavinWu1991 marked this pull request as draft August 8, 2021 11:49
@GavinWu1991 GavinWu1991 marked this pull request as ready for review August 8, 2021 13:05
@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Aug 8, 2021
@breathingdust breathingdust added breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 27, 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 Jan 27, 2022
@anGie44 anGie44 added this to the v4.0.0 milestone Jan 27, 2022
@anGie44 anGie44 changed the base branch from main to release/4.x January 27, 2022 19:26
@anGie44 anGie44 force-pushed the f-aws-elasticache-engine-required branch from 8457f26 to 61bda9c Compare January 27, 2022 20:02
@anGie44 anGie44 force-pushed the release/4.x branch 6 times, most recently from e1f74b5 to 585486e Compare January 31, 2022 20:08
@anGie44 anGie44 deleted the branch hashicorp:main January 31, 2022 23:00
@anGie44 anGie44 closed this Jan 31, 2022
@anGie44 anGie44 reopened this Feb 2, 2022
@anGie44 anGie44 changed the base branch from release/4.x to main February 2, 2022 15:22
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. and removed size/S Managed by automation to categorize the size of a PR. labels Feb 2, 2022
anGie44 added a commit to GavinWu1991/terraform-provider-aws that referenced this pull request Feb 3, 2022
@anGie44 anGie44 force-pushed the f-aws-elasticache-engine-required branch from 30c6deb to fc2b3fc Compare February 3, 2022 03:26
anGie44 added a commit to GavinWu1991/terraform-provider-aws that referenced this pull request Feb 3, 2022
anGie44 added a commit to GavinWu1991/terraform-provider-aws that referenced this pull request Feb 3, 2022
@anGie44 anGie44 force-pushed the f-aws-elasticache-engine-required branch from fc2b3fc to b8ef71c Compare February 3, 2022 15:37
anGie44 added a commit to GavinWu1991/terraform-provider-aws that referenced this pull request Feb 3, 2022
anGie44 added a commit to GavinWu1991/terraform-provider-aws that referenced this pull request Feb 3, 2022
@anGie44 anGie44 force-pushed the f-aws-elasticache-engine-required branch from b8ef71c to ba739ff Compare February 3, 2022 20:37
anGie44 added a commit to GavinWu1991/terraform-provider-aws that referenced this pull request Feb 3, 2022
anGie44 added a commit to GavinWu1991/terraform-provider-aws that referenced this pull request Feb 3, 2022
@anGie44 anGie44 force-pushed the f-aws-elasticache-engine-required branch from ba739ff to 003bd82 Compare February 3, 2022 20:40
@anGie44 anGie44 force-pushed the f-aws-elasticache-engine-required branch from 003bd82 to 2267802 Compare February 3, 2022 20:41
@anGie44
Copy link
Contributor

anGie44 commented Feb 3, 2022

Output of new acceptance test:

--- PASS: TestAccElastiCacheCluster_Engine_None (2.32s)

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.

Hi @GavinWu1991 , thanks so much for your original contributions! I made an adjustment to the schema to enforce the engine param otherwise LGTM 🚀

Output of acceptance tests:

--- PASS: TestAccElastiCacheClusterDataSource_Data_basic (483.59s)
--- PASS: TestAccElastiCacheCluster_AZMode_memcached (481.27s)
--- PASS: TestAccElastiCacheCluster_AZMode_redis (509.77s)
--- PASS: TestAccElastiCacheCluster_EngineVersion_memcached (1093.48s)
--- PASS: TestAccElastiCacheCluster_EngineVersion_redis (1639.29s)
--- PASS: TestAccElastiCacheCluster_Engine_None (13.44s)
--- PASS: TestAccElastiCacheCluster_Engine_memcached (486.08s)
--- PASS: TestAccElastiCacheCluster_Engine_redis (542.94s)
--- PASS: TestAccElastiCacheCluster_Memcached_finalSnapshot (1.94s)
--- PASS: TestAccElastiCacheCluster_NodeTypeResize_memcached (985.35s)
--- PASS: TestAccElastiCacheCluster_NodeTypeResize_redis (1199.95s)
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_decrease (698.26s)
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_increase (866.20s)
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_increaseWithPreferredAvailabilityZones (763.12s)
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_redis (17.54s)
--- PASS: TestAccElastiCacheCluster_ParameterGroupName_default (486.53s)
--- PASS: TestAccElastiCacheCluster_PortRedis_default (521.44s)
--- PASS: TestAccElastiCacheCluster_Redis_finalSnapshot (695.35s)
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_availabilityZone (1208.57s)
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_multipleReplica (1181.01s)
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_singleReplica (1252.51s)
--- PASS: TestAccElastiCacheCluster_multiAZInVPC (776.71s)
--- PASS: TestAccElastiCacheCluster_port (485.13s)
--- PASS: TestAccElastiCacheCluster_snapshotsWithUpdates (543.75s)
--- PASS: TestAccElastiCacheCluster_vpc (500.45s)
--- SKIP: TestAccElastiCacheCluster_SecurityGroup_ec2Classic (1.66s)

@anGie44 anGie44 merged commit 7eb1e1b into hashicorp:main Feb 3, 2022
anGie44 added a commit that referenced this pull request Feb 4, 2022
@github-actions
Copy link

This functionality has been released in v4.0.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 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/elasticache Issues and PRs that pertain to the elasticache service. size/M Managed by automation to categorize the size of a PR. 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_elasticache_cluster: engine parameter should be required
4 participants