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

aws_elasticache_replication_group: modify before scale in #34819

Conversation

chris-peterson
Copy link
Contributor

@chris-peterson chris-peterson commented Dec 8, 2023

Description

When scaling in a aws_elasticache_replication_group (i.e. reducing node count), resize after making other modifications.

This avoid an invalid parameter error in certain conditions, e.g. if reducing from 2 to 1 while also disabling multi_az_enabled and/or automatic_failover_enabled, the cluster configuration has to be applied before reducing node count (otherwise results in an error like this):

InvalidParameterValue: Must have at least 1 replica for Multi-AZ enabled Replication Group

I've left the scale out path alone to avoid issues in the other direction (e.g. enabling automatic_failover_enabled while scaling from 1 to 2)

Copy link

github-actions bot commented Dec 8, 2023

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. service/elasticache Issues and PRs that pertain to the elasticache service. labels Dec 8, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 8, 2023
When scaling in (i.e. reducing node count), apply change _after_ making other modifications.  This avoid an invalid parameter error in certain conditions, e.g. if reducing from 2 to 1 while also disabling multi_az_enabled and/or automatic_failover_enabled, the configuration has to be applied before reducing node count (otherwise an error like 'InvalidParameterValue: Must have at least 1 replica for Multi-AZ enabled Replication Group' is generated

To avoid issues in the other direction, continue to apply scale _out_s prior to other modifications
@chris-peterson chris-peterson force-pushed the elasticache-scale-in-ordering-tweak branch from 3467ab5 to bf0d10b Compare December 8, 2023 17:13
@chris-peterson chris-peterson changed the title Change order of operations for applying elasticache modifications aws_elasticache_replication_group: modify before scale in Dec 8, 2023
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 @chris-peterson 👋

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 CONTRIBUTOR 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! 😃

@justinretzolk justinretzolk added 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 Dec 12, 2023
ewbankkit added a commit that referenced this pull request Apr 30, 2024
Copy link

github-actions bot commented Jun 2, 2024

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 2, 2024
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/elasticache Issues and PRs that pertain to the elasticache service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants