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

fix: Remove dots from inter_parameter_group_name #11

Conversation

mattsafraid
Copy link
Contributor

@mattsafraid mattsafraid commented Jul 30, 2024

Description

Fix an internal local name used to create a Parameter Group Family. Current module breaks when using older families and no declared family name, because old names contain dots in the name and this is not allowed for Parameter Group Family names.

Motivation and Context

Module can't create an internal parameter group name when using older families.

Parameter group families do not follow a very strict naming convention in AWS. There are situations like the following:
(https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html)

Redis OSS Version Family name
7 (current) redis7
6 redis6.x
5 redis5.0

Also, AWS enforces naming rules for parameter family creation. Notably, item no.5 declares:
(https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Creating.html)

Parameter group naming constraints are as follows:

  • Must begin with an ASCII letter.
  • Can only contain ASCII letters, digits, and hyphens.

So when using the module to create an ElastiCache cluster without a custom name, we get the following error:

  Error: creating ElastiCache Parameter Group (redis-dev-redis6.x-ec5a4b07c01ecf4a):
operation error ElastiCache: CreateCacheParameterGroup, https response error StatusCode: 400, 
RequestID: ****, InvalidParameterValue: The parameter CacheParameterGroupName is not a valid identifier. 
Identifiers must begin with a letter; must contain only ASCII letters, digits, and hyphens;
and must not end with a hyphen or contain two consecutive hyphens.

Breaking Changes

No breaking changes

How Has This Been Tested?

  • N/A I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@mattsafraid mattsafraid changed the title Remove dots from inter_parameter_group_name fix: Remove dots from inter_parameter_group_name Jul 30, 2024
main.tf Outdated Show resolved Hide resolved
@bryantbiggs bryantbiggs merged commit 37286d0 into terraform-aws-modules:master Aug 3, 2024
13 checks passed
antonbabenko pushed a commit that referenced this pull request Aug 3, 2024
## [1.2.1](v1.2.0...v1.2.1) (2024-08-03)

### Bug Fixes

* Remove dots from inter_parameter_group_name ([#11](#11)) ([37286d0](37286d0))
@antonbabenko
Copy link
Member

This PR is included in version 1.2.1 🎉

Copy link

github-actions bot commented Sep 4, 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 Sep 4, 2024
@mattsafraid mattsafraid deleted the fix/Internal-parameter-group-name-for-prev-parameter-group-families branch October 1, 2024 10:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants