Open kar0v opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
Hey @kar0v 👋 Thank you for taking the time to raise this! Perhaps I'm missing something (admittedly, this isn't an area of AWS that I've spent a lot of time with), but based on the API documentation, it appears that the resources
argument expects a list of ARNs, rather than a list of DB instance types. When you said you're able to do this in the AWS console, are you passing db.t3.medium
there as well?
Hello @justinretzolk, thank you for looking into this.
I did not need to provide any db.t3.medium
selection in the console. I just selected the cluster name and it worked.
I tried providing the cluster ARN/ID like data.aws_docdb_orderable_db_instance.web-apps-cluster-docdb.id
, but then terraform complained that this is not part the datasource. I've already used this aws_backup_selection
with an RDS resource, which I could provide the ARN for via
resource "aws_backup_selection" "production_aurora_cluster" {
iam_role_arn = data.aws_iam_role.production_aws_backup_default_service_role.arn
name = "production_aurora_backups"
plan_id = aws_backup_plan.aurora-backup-plan.id
resources = [
#data.terraform_remote_state.core.outputs.production_rds_aurora_cluster_arn
data.aws_rds_cluster.production_cluster_name.arn
]
}
And I do not know how to provide the DocumentDB ARN.
Terraform Core Version
1.3.7
AWS Provider Version
4.32.0
Affected Resource(s)
Cannot assign a documentdb cluster to an AWS backup plan as a resource. Although this is possible via the console, this is not possible via Terraform.
Data source:
Expected Behavior
Should have created the plan per the
terraform apply
commandActual Behavior
Did not assign the resource to the backup plan as expected. Failed to find the data source.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
try to assign a documentdb resource to a backup plan via the data source
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None