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: Force lowercasing for DB Option group name or name_prefix #14366

Merged
merged 1 commit into from
May 10, 2017

Conversation

catsby
Copy link
Contributor

@catsby catsby commented May 10, 2017

Continue #14192 and require users to specify name and name_prefix as lower case strings, to match AWS style. Currently the DB Option Group tests are failing because the name attribute is also used as the id, however the id is not receiving the lowercasing. As a result, the id locally used for lookups does not match the casing used to create the resource, so lookup fails.

Here we modify the validation to error at the plan stage if non-lowercase is used. As it stands, I believe any upper or mixed case name or name_prefix is hitting #11040

The strings.ToLower may be superfluous with the validation, but it felt like good measure 👍

TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBOptionGroup -timeout 120m
=== RUN   TestAccAWSDBOptionGroup_importBasic
--- PASS: TestAccAWSDBOptionGroup_importBasic (14.92s)
=== RUN   TestAccAWSDBOptionGroup_basic
--- PASS: TestAccAWSDBOptionGroup_basic (11.15s)
=== RUN   TestAccAWSDBOptionGroup_namePrefix
--- PASS: TestAccAWSDBOptionGroup_namePrefix (11.58s)
=== RUN   TestAccAWSDBOptionGroup_generatedName
k--- PASS: TestAccAWSDBOptionGroup_generatedName (11.31s)
=== RUN   TestAccAWSDBOptionGroup_defaultDescription
--- PASS: TestAccAWSDBOptionGroup_defaultDescription (11.75s)
=== RUN   TestAccAWSDBOptionGroup_basicDestroyWithInstance
--- PASS: TestAccAWSDBOptionGroup_basicDestroyWithInstance (556.28s)
=== RUN   TestAccAWSDBOptionGroup_OptionSettings
--- PASS: TestAccAWSDBOptionGroup_OptionSettings (20.26s)
=== RUN   TestAccAWSDBOptionGroup_sqlServerOptionsUpdate
--- PASS: TestAccAWSDBOptionGroup_sqlServerOptionsUpdate (20.02s)
=== RUN   TestAccAWSDBOptionGroup_multipleOptions
--- PASS: TestAccAWSDBOptionGroup_multipleOptions (11.75s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    669.051s

Copy link
Contributor

@grubernaut grubernaut left a comment

Choose a reason for hiding this comment

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

LGTM

@catsby catsby merged commit 24e00af into master May 10, 2017
@catsby catsby deleted the b-aws-db-ops-name-id-case branch May 10, 2017 20:42
@ghost
Copy link

ghost commented Apr 12, 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 Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants