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_subnet_group normalizes name to lowercase. #3120

Merged
merged 1 commit into from Sep 4, 2015
Merged

aws_elasticache_subnet_group normalizes name to lowercase. #3120

merged 1 commit into from Sep 4, 2015

Conversation

apparentlymart
Copy link
Member

This addresses the broken refresh behavior discussed in #2178.

The Elasticache API accepts a mixed-case subnet group name on create, but normalizes it to lowercase before storing it. When retrieving a subnet group, the name is treated as case-sensitive, so the lowercase version must be used.

Given that the case within subnet group names is not significant, the new StateFunc on the name attribute causes the state to reflect the lowercase version that the API uses, and changes in case alone will not show as a diff.

Given that we must look up subnet group names as lowercase, we set the instance id to be a lowercase version of the user's provided name. This then allows a later Refresh call to succeed even if the user provided a mixed-case name in the config.

Previously users could work around this by just avoiding putting uppercase letters in the name, but that is often inconvenient if e.g. the name is being constructed from variables defined elsewhere that may already have uppercase letters present.

@mzupan
Copy link
Contributor

mzupan commented Aug 29, 2015

Works great

The Elasticache API accepts a mixed-case subnet name on create, but
normalizes it to lowercase before storing it. When retrieving a subnet,
the name is treated as case-sensitive, so the lowercase version must be
used.

Given that case within subnet names is not significant, the new StateFunc
on the name attribute causes the state to reflect the lowercase version
that the API uses, and changes in case alone will not show as a diff.

Given that we must look up subnet names in lower case, we set the
instance id to be a lowercase version of the user's provided name. This
then allows a later Refresh call to succeed even if the user provided
a mixed-case name.

Previously users could work around this by just avoiding putting uppercase
letters in the name, but that is often inconvenient if e.g. the name is
being constructed from variables defined elsewhere that may already have
uppercase letters present.
@phinze
Copy link
Contributor

phinze commented Sep 4, 2015

LGTM

AWS... a surprise around every corner! 😉

@ghost
Copy link

ghost commented May 1, 2020

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators May 1, 2020
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.

None yet

3 participants