cloudposse / cloudposse/terraform-aws-documentdb-cluster
Add support for copy_tags_to_snapshot in aws_docdb_cluster_instance resource
- Dominant language
- HCL
- Stars
- 70
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
### 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_
Contributor guide
Research direction
Locate the aws_docdb_cluster_instance resource in the module and compare its supported arguments with the AWS provider's copy_tags_to_snapshot argument added in version 5.21.0. Verify the resource accepts the argument and that Terraform validation or planning succeeds; done means snapshots can inherit the instance tags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, terraform
- Domain
- cloud, databases
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100