-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
NewResource/dax_parameter_group: Support dax parameter group #4299
Conversation
atsushi-ishibashi
commented
Apr 21, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work as usual @atsushi-ishibashi! Few minor things which I'll fix on merge. 🚀
2 tests passed (all tests)
=== RUN TestAccAwsDaxParameterGroup_import
--- PASS: TestAccAwsDaxParameterGroup_import (7.15s)
=== RUN TestAccAwsDaxParameterGroup_basic
--- PASS: TestAccAwsDaxParameterGroup_basic (40.92s)
CheckDestroy: testAccCheckAwsDaxParameterGroupDestroy, | ||
Steps: []resource.TestStep{ | ||
resource.TestStep{ | ||
Config: testAccDaxParameterGroupConfig(acctest.RandString(5)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can generate an invalid name 😉
--- FAIL: TestAccAwsDaxParameterGroup_import (2.58s)
testing.go:518: Step 0 error: Error applying: 1 error(s) occurred:
* aws_dax_parameter_group.test: 1 error(s) occurred:
* aws_dax_parameter_group.test: InvalidParameterValueException: 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.
status code: 400, request id: 2707066a-46ef-11e8-8865-e1831f4bb1a0
} | ||
return err | ||
} | ||
pg := resp.ParameterGroups[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To prevent a panic, we should do a len()
check here.
if len(resp.ParameterGroups) == 0 {
log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id())
d.SetId("")
return nil
}
|
||
d.Set("name", pg.ParameterGroupName) | ||
desc := pg.Description | ||
// default description is " " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂️ Some of these APIs never cease to amaze.
This has been released in version 1.16.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |