hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.83k stars 9.18k forks source link

[Enhancement]: aws_db_cluster_snapshot_copy for copying Aurora snapshots #39230

Open eyedvabny opened 2 months ago

eyedvabny commented 2 months ago

Description

The provider has support for aws_db_snapshot_copy for copying and sharing non-Aurora RDS snapshots but unfortunately that resource doesn't work for Aurora.

The existing resource uses uses CopyDBSnapshot command from AWS Go SDS and for cluster snapshots we would need CopyDBClusterSnapshot. Otherwise the two resources would be virtually identical in structure and behavior.

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "aws_db_cluster_snapshot_copy" "example" {
  source_db_cluster_snapshot_identifier = aws_db_cluster_snapshot.example.db_snapshot_arn
  target_db_cluster_snapshot_identifier = "testsnapshot1234-copy"
}

References

https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CopyDBClusterSnapshot.html https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/rds#Client.CopyDBClusterSnapshot

Would you like to implement a fix?

Going to try

github-actions[bot] commented 2 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue