Add support for copy_tags_to_snapshot in aws_docdb_cluster_instance resource
hassanzhd opened this issue · 0 comments
hassanzhd commented
Describe the Feature
Please add support for copy_tags_to_snapshot argument in aws_docdb_cluster_instance resource so that tags are copied to snapshots created for documentdb clusters
Expected Behavior
There is no support for copy_tags_to_snapshot argument in aws_docdb_cluster_instance resource which was added by AWS in version 5.21.0.
Use Case
The reason why we need this is because, snapshots generated for document_db clusters are untagged which in our case needs to be same as the ones provided on cluster_instance
Describe Ideal Solution
Update the resource as follows:
resource "aws_docdb_cluster_instance" "default" {
count = module.this.enabled ? var.cluster_size : 0
identifier = "${module.this.id}-${count.index + 1}"
cluster_identifier = join("", aws_docdb_cluster.default[*].id)
apply_immediately = var.apply_immediately
preferred_maintenance_window = var.preferred_maintenance_window
instance_class = var.instance_class
engine = var.engine
auto_minor_version_upgrade = var.auto_minor_version_upgrade
enable_performance_insights = var.enable_performance_insights
ca_cert_identifier = var.ca_cert_identifier
tags = module.this.tags
copy_tags_to_snapshot = true
}
Alternatives Considered
No response
Additional Context
No response