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

Add user_group_ids field to elasticache replication group #20406

Merged
merged 15 commits into from
Jan 26, 2022

Conversation

jamesglennan
Copy link

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

Output from acceptance testing:

$ make test TESTARGS='-run=TestAccAWSElasticacheReplicationGroup'
ok      github.com/terraform-providers/terraform-provider-aws/aws       1.884s
$ make testacc TESTARGS='-run=TestAccAWSElasticacheReplicationGroup'

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/elasticache Issues and PRs that pertain to the elasticache service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/S Managed by automation to categorize the size of a PR. labels Aug 2, 2021
@jamesglennan
Copy link
Author

jamesglennan commented Aug 2, 2021

When I put this PR together, I had thought that a set of ids could be accepted, but upon testing it turns out that it accepts an array of strings, but will only accept one.

Should I leave this as it is user_group_ids= ['test'] , or should i modify it to something more like user_group_id = 'test'

I'm thinking AWS would have made is this way for a reason, perhaps to support it in the future?

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @jamesglennan 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Aug 2, 2021
@hpdobrica
Copy link

Hey @jamesglennan, I needed multiple user groups provided to the replication group, and am currently using null resource for this, so i came at the same issue as you did.

Take a look at this, it seems that taking only single-element array as input is an error within documentation, rather than error with the implementation:
aws/aws-cli#6178

@jamesglennan
Copy link
Author

@hpdobrica That issue looks related to multiple users to a user group, not multiple user groups to a replication group as far as i can tell?

@hpdobrica
Copy link

hpdobrica commented Aug 23, 2021

oh sorry, my bad, just confirmed that cli indeed throws this error when i try to add more:

An error occurred (InvalidParameterValue) when calling the ModifyReplicationGroup operation: Max number of user groups per replication group allowed is 1.

@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Aug 31, 2021
@renan
Copy link

renan commented Sep 15, 2021

Yes, please! This would be a good addition now since we can define groups and users would be nice to associate it with the replication group itself!

@kmai
Copy link

kmai commented Sep 28, 2021

Any news on this?

@ricardo-aspira
Copy link

Hello guys,

When are you guys planning to release this version ?

@wilkesreid
Copy link

Bump. I have run into a need for this, and unfortunately will have to fall back to using redis AUTH instead of RBAC until this is merged in. Thanks for all your work, @jamesglennan!

@daniel-laszlo
Copy link

Bump, I would also need this.

@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.

@drarnold
Copy link

drarnold commented Oct 26, 2021

Hey @jamesglennan !
Thank you for picking this up and running with it. I created the MR for the aws_elasticache_user_groups and aws_elasticache_users. Let me know if there are any questions on getting this updated and past the finish line.

Also, to answer your question, I believe that there is a potential opportunity for multiple group IDs to be added to 1 replication_group, so I would keep it as an array/list.

Everything I looked at seems to be working very smoothly via my initial code review.

Thanks again for your commitment!

@jamesglennan
Copy link
Author

Apologies everyone, I have been a little busy, I will try and carve out some time later today or tomorrow to finish this up- thanks for patience!

@drarnold
Copy link

I know the feeling! If you need any help, let the community know and we can pitch in!

@jamesglennan jamesglennan force-pushed the elasticacheUsergroup branch 2 times, most recently from 14e0100 to eb32087 Compare October 27, 2021 13:55
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Nov 1, 2021
@jamesglennan
Copy link
Author

@drarnold @zhelding I have updated my code and i created a new test for this function- not sure what the process from here is?

@nari1021
Copy link

nari1021 commented Jan 7, 2022

Plz, release to this ASAP...!!

@edbighead
Copy link

yeah, having aws_elasticache_user_group doesn't do much sense without this feature. waiting for review 🙄 and merge

@nari1021
Copy link

@ewbankkit @jamesglennan @breathingdust Could you give us a piece of advice about this issue?

@jamesglennan
Copy link
Author

jamesglennan commented Jan 25, 2022

@zhelding Is there any chance i can get a review on this, seems like a lot of folks are keen to get this in? Thanks in advance- I know i asked before, just wanted to see if there was any movement?

@YakDriver YakDriver self-assigned this Jan 26, 2022
@YakDriver
Copy link
Member

@jamesglennan Thank you for your work on this and noticing something the community really wants!

FYI, we do like to see acceptance tests run for PRs. (It's not required since some are unable to.) To run the relevant acceptance tests, use the command below. However, even without the results, I'm beginning a review and will let you know if we need anything else from you.

% make testacc TESTS=TestAccElastiCacheReplicationGroup_ PKG=elasticache

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Jan 26, 2022
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

Looks great! 🎉

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

% make testacc TESTS='TestAccElastiCacheReplicationGroup_[A-Z]' PKG=elasticache
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticache/... -v -count 1 -parallel 20 -run='TestAccElastiCacheReplicationGroup_[A-Z]'  -timeout 180m
--- PASS: TestAccElastiCacheReplicationGroup_Validation_noNodeType (12.68s)
--- PASS: TestAccElastiCacheReplicationGroup_Validation_globalReplicationGroupIdAndNodeType (889.51s)
--- PASS: TestAccElastiCacheReplicationGroup_ClusterMode_singleNode (1129.69s)
--- PASS: TestAccElastiCacheReplicationGroup_GlobalReplicationGroupIDClusterModeValidation_numNodeGroupsOnSecondary (1246.18s)
--- PASS: TestAccElastiCacheReplicationGroup_NumberCacheClustersMemberClusterDisappears_noChange (1452.11s)
--- PASS: TestAccElastiCacheReplicationGroup_ValidationMultiAz_noAutomaticFailover (1.49s)
--- PASS: TestAccElastiCacheReplicationGroup_NumberCacheClustersMemberClusterDisappearsRemoveMemberCluster_atTargetSize (1469.56s)
--- PASS: TestAccElastiCacheReplicationGroup_NumberCacheClusters_multiAZEnabled (1593.53s)
--- PASS: TestAccElastiCacheReplicationGroup_NumberCacheClustersFailover_autoFailoverDisabled (1821.60s)
--- PASS: TestAccElastiCacheReplicationGroup_ClusterMode_updateReplicasPerNodeGroup (1889.17s)
--- PASS: TestAccElastiCacheReplicationGroup_ClusterMode_nonClusteredParameterGroup (786.58s)
--- PASS: TestAccElastiCacheReplicationGroup_NumberCacheClustersMemberClusterDisappears_addMemberCluster (2090.06s)
--- PASS: TestAccElastiCacheReplicationGroup_ClusterMode_basic (1035.07s)
--- PASS: TestAccElastiCacheReplicationGroup_ClusterModeUpdateNumNodeGroups_scaleUp (2275.45s)
--- PASS: TestAccElastiCacheReplicationGroup_GlobalReplicationGroupID_basic (2276.63s)
--- PASS: TestAccElastiCacheReplicationGroup_NumberCacheClusters_basic (2491.00s)
--- PASS: TestAccElastiCacheReplicationGroup_GlobalReplicationGroupID_disappears (2493.97s)
--- PASS: TestAccElastiCacheReplicationGroup_NumberCacheClustersMemberClusterDisappearsRemoveMemberCluster_scaleDown (2609.05s)
--- PASS: TestAccElastiCacheReplicationGroup_ClusterModeUpdateNumNodeGroupsAndReplicasPerNodeGroup_scaleUp (2955.18s)
--- PASS: TestAccElastiCacheReplicationGroup_NumberCacheClustersFailover_autoFailoverEnabled (3006.77s)
--- PASS: TestAccElastiCacheReplicationGroup_GlobalReplicationGroupID_full (3442.08s)
--- PASS: TestAccElastiCacheReplicationGroup_EngineVersion_update (3452.59s)
--- PASS: TestAccElastiCacheReplicationGroup_GlobalReplicationGroupIDClusterMode_basic (3478.27s)
--- PASS: TestAccElastiCacheReplicationGroup_ClusterModeUpdateNumNodeGroupsAndReplicasPerNodeGroup_scaleDown (3528.34s)
--- PASS: TestAccElastiCacheReplicationGroup_ClusterModeUpdateNumNodeGroups_scaleDown (3031.39s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticache	3922.781s
% make testacc TESTS='TestAccElastiCacheReplicationGroup_[a-z]' PKG=elasticache
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticache/... -v -count 1 -parallel 20 -run='TestAccElastiCacheReplicationGroup_[a-z]'  -timeout 180m
--- PASS: TestAccElastiCacheReplicationGroup_clusteringAndCacheNodesCausesError (3.30s)
--- PASS: TestAccElastiCacheReplicationGroup_disappears (638.38s)
--- PASS: TestAccElastiCacheReplicationGroup_basic (706.11s)
--- PASS: TestAccElastiCacheReplicationGroup_updateDescription (785.69s)
--- PASS: TestAccElastiCacheReplicationGroup_finalSnapshot (891.78s)
--- PASS: TestAccElastiCacheReplicationGroup_updateParameterGroup (908.46s)
--- PASS: TestAccElastiCacheReplicationGroup_dataTiering (1035.29s)
--- PASS: TestAccElastiCacheReplicationGroup_multiAzInVPC (1056.22s)
--- PASS: TestAccElastiCacheReplicationGroup_vpc (1097.61s)
--- PASS: TestAccElastiCacheReplicationGroup_redisClusterInVPC2 (1348.10s)
--- PASS: TestAccElastiCacheReplicationGroup_tags (1369.43s)
--- PASS: TestAccElastiCacheReplicationGroup_enableAtRestEncryption (1410.00s)
--- PASS: TestAccElastiCacheReplicationGroup_updateMaintenanceWindow (1412.73s)
--- PASS: TestAccElastiCacheReplicationGroup_useCMKKMSKeyID (1429.09s)
--- PASS: TestAccElastiCacheReplicationGroup_uppercase (1701.32s)
--- PASS: TestAccElastiCacheReplicationGroup_enableAuthTokenTransitEncryption (1764.73s)
--- PASS: TestAccElastiCacheReplicationGroup_enableSnapshotting (1766.84s)
--- PASS: TestAccElastiCacheReplicationGroup_updateAuthToken (1783.41s)
--- PASS: TestAccElastiCacheReplicationGroup_multiAzNotInVPC (2033.28s)
--- PASS: TestAccElastiCacheReplicationGroup_updateNodeSize (2238.57s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticache	2239.974s

@YakDriver YakDriver merged commit a91804e into hashicorp:main Jan 26, 2022
@github-actions github-actions bot added this to the v3.74.0 milestone Jan 26, 2022
@github-actions
Copy link

This functionality has been released in v3.74.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 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/elasticache Issues and PRs that pertain to the elasticache 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add user_group argument to aws_elasticache_replication_group