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

provider/aws: Fix issue finding db subnets #1377

Merged
merged 1 commit into from
Apr 3, 2015

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Apr 3, 2015

AWS seems to lower case DB Subnet Group names, causing a failure in TF if your
name isn't all lower case.

This PR covers:

  • lower casing both our saved ID and the name we get back from AWS, and then makes the comparison.
  • range over all db subnets returned to look for the one in question
  • changes the test to use upper case

AWS seems to lower case DB Subnet Group names, causing a failure in TF if your
name isn't all lower case.
@phinze
Copy link
Contributor

phinze commented Apr 3, 2015

Nice catch! Does this work okay given a fresh not-yet-created config and running terraform refresh? I can't remember whether the provider skips Read in that case. I was trying to think through it for the case where d.Id() == "", but maybe that's unnecessary.

@catsby
Copy link
Contributor Author

catsby commented Apr 3, 2015

Fixes #1376

@catsby
Copy link
Contributor Author

catsby commented Apr 3, 2015

Does this work okay given a fresh not-yet-created config and running terraform refresh

Running terraform refresh before the plan is applied returns nothing, so, yes?

@phinze
Copy link
Contributor

phinze commented Apr 3, 2015

Worked it out in chat - Read is not required to handle a case where d.Id() == "", that's handled at a higher level. So LGTM!

catsby added a commit that referenced this pull request Apr 3, 2015
@catsby catsby merged commit 0cff04a into master Apr 3, 2015
@mitchellh mitchellh deleted the b-aws-fix-db-subnet-group-check branch June 26, 2015 22:50
@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.

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

2 participants