-
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 Argument copy_tags_to_snapshot for aws_rds_cluster_instance #6582
Add Argument copy_tags_to_snapshot for aws_rds_cluster_instance #6582
Conversation
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.
Two little things then this should be good to go. Thanks, @kterada0509!
identifier = "tf-cluster-instance-%d" | ||
cluster_identifier = "${aws_rds_cluster.default.id}" | ||
instance_class = "db.t2.small" | ||
db_parameter_group_name = "${aws_db_parameter_group.bar.name}" |
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: Since the db_parameter_group_name
argument does not relate to copy_tags_to_snapshot
, it and the aws_db_parameter_group
resource can be omitted from the test configuration. 👍
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 it.
@@ -52,6 +52,7 @@ func TestAccAWSRDSClusterInstance_basic(t *testing.T) { | |||
testAccCheckAWSDBClusterInstanceAttributes(&v), | |||
resource.TestMatchResourceAttr("aws_rds_cluster_instance.cluster_instances", "arn", regexp.MustCompile(`^arn:[^:]+:rds:[^:]+:[^:]+:db:.+`)), | |||
resource.TestCheckResourceAttr("aws_rds_cluster_instance.cluster_instances", "auto_minor_version_upgrade", "true"), | |||
resource.TestCheckResourceAttr("aws_rds_cluster_instance", "copy_tags_to_snapshot", "false"), |
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 is missing the resource name and causes the test to fail:
--- FAIL: TestAccAWSRDSClusterInstance_basic (702.58s)
testing.go:538: Step 0 error: Check failed: Check 5/11 error: Not found: aws_rds_cluster_instance in [root]
resource.TestCheckResourceAttr("aws_rds_cluster_instance", "copy_tags_to_snapshot", "false"), | |
resource.TestCheckResourceAttr("aws_rds_cluster_instance.cluster_instances", "copy_tags_to_snapshot", "false"), |
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.
thanks.
Fixed it.
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.
LGTM, thanks @kterada0509! 🚀
--- PASS: TestAccAWSRDSClusterInstance_namePrefix (628.56s)
--- PASS: TestAccAWSRDSClusterInstance_CopyTagsToSnapshot (695.77s)
--- PASS: TestAccAWSRDSClusterInstance_withInstancePerformanceInsights (713.56s)
--- PASS: TestAccAWSRDSClusterInstance_withInstanceEnhancedMonitor (715.07s)
--- PASS: TestAccAWSRDSClusterInstance_disappears (758.99s)
--- PASS: TestAccAWSRDSClusterInstance_PubliclyAccessible (772.16s)
--- PASS: TestAccAWSRDSClusterInstance_generatedName (793.30s)
--- PASS: TestAccAWSRDSClusterInstance_kmsKey (894.70s)
--- PASS: TestAccAWSRDSClusterInstance_az (938.64s)
--- PASS: TestAccAWSRDSClusterInstance_importBasic (1276.77s)
--- PASS: TestAccAWSRDSClusterInstance_basic (1424.95s)
This has been released in version 1.51.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I've tested this and noticed that tags are not copied to automated and manual cluster snapshots, even though I have copy_tags_to_snapshots to true in aws_rds_cluster_instance. My Cluster and Cluster Instances are tagged. I don't think automated copying of cluster/cluster-instances tags in this way is supported yet by AWS. Has anyone else noticed this? I'm using terraform version 0.11.7 with aws provider v1.53.0. |
Closes #2565 |
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! |
Fixes #6355
Changes proposed in this pull request:
copy_tags_to_snapshot
argumentcopy_tags_to_snapshot
argumentOutput from acceptance testing: