-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Add support docdb cluster parameter group resource #7090
Add support docdb cluster parameter group resource #7090
Conversation
1636444
to
c1878a4
Compare
@ewbankkit @kterada0509 this is awesome and thanks for your quick turnaround!!!! long awaited feature for us |
@kterada0509 @ewbankkit does this support encryption at rest |
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.
Hey @kterada0509! Thanks for submitting this. A few minor things and should be good to go. 👍
} | ||
|
||
d.SetId(aws.StringValue(createOpts.DBClusterParameterGroupName)) | ||
log.Printf("[INFO] Neptune Cluster Parameter Group ID: %s", d.Id()) |
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.
Copypasta 🍝 and we really don't need this log line 👍
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.
Removed logging
d.SetId(aws.StringValue(createOpts.DBClusterParameterGroupName)) | ||
log.Printf("[INFO] Neptune Cluster Parameter Group ID: %s", d.Id()) | ||
|
||
d.Set("arn", resp.DBClusterParameterGroup.DBClusterParameterGroupArn) |
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.
Maintainer note: for consistency reasons with RDS/Neptune, setting arn
in the Create
here and calling Update
after Create
is okay for now -- they will all get similar fixes in the future.
|
||
describeParametersResp, err := conn.DescribeDBClusterParameters(describeParametersOpts) | ||
if err != nil { | ||
return err |
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.
Nit: It'd be nice to return error context here for operators and code maintainers
return err | |
return fmt.Errorf("error reading DocDB Cluster Parameter Group (%s) parameters: %s", d.Id(), err) |
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.
Fixed
}) | ||
|
||
if err != nil { | ||
log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) |
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.
We should return an error here instead of a debug log:
log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) | |
return fmt.Errorf("error listing tags for DocDB Cluster Parameter Group (%s): %s", d.Id(), err) |
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.
Fixed
description = "docdb cluster parameter group" | ||
|
||
parameter { | ||
name = "neptune_enable_audit_log" |
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.
Copypasta 🍝 Lets pick a DocDB one 😄 https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-parameters.html
name = "neptune_enable_audit_log" | |
name = "tls" |
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.
Fixed
|
||
parameter { | ||
name = "neptune_enable_audit_log" | ||
value = 1 |
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.
And a matching value from our testing 😉
value = 1 | |
value = "enabled" |
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.
Fixed
website/aws.erb
Outdated
<ul class="nav nav-visible"> | ||
|
||
<li<%= sidebar_current("docs-aws-resource-docdb-cluster-parameter-group") %>> | ||
<a href="/docs/providers/aws/r/docdb_cluster_parameter_group.html">aws_dax_cluster</a> |
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.
Copypasta 🍝
<a href="/docs/providers/aws/r/docdb_cluster_parameter_group.html">aws_dax_cluster</a> | |
<a href="/docs/providers/aws/r/docdb_cluster_parameter_group.html">aws_docdb_cluster_parameter_group</a> |
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.
Fixed
I'd also change your PR comment to |
c1878a4
to
a31ec1b
Compare
@okonon All kudos to @kterada0509 for this, I just opened the issue 😄. |
a31ec1b
to
940943b
Compare
@bflad |
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, @kterada0509, thanks! 🚀
--- PASS: TestAccAWSDocDBClusterParameterGroup_disappears (3.16s)
--- PASS: TestAccAWSDocDBClusterParameterGroup_generatedName (4.73s)
--- PASS: TestAccAWSDocDBClusterParameterGroup_Description (4.74s)
--- PASS: TestAccAWSDocDBClusterParameterGroup_basic (4.77s)
--- PASS: TestAccAWSDocDBClusterParameterGroup_namePrefix (4.78s)
--- PASS: TestAccAWSDocDBClusterParameterGroup_Parameter (12.20s)
--- PASS: TestAccAWSDocDBClusterParameterGroup_Tags (12.53s)
This has been released in version 1.55.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! |
Reference #7077
Changes proposed in this pull request:
aws_docdb_cluster_parameter_group
Output from acceptance testing: