terraform-aws-rds-cluster
terraform-aws-rds-cluster copied to clipboard
Cannot restore cluster from snapshot without removing auto-scaling profile
We are using this module to provision an auto-scaling read replica and it is working well. However when we try to rebuild the cluster from a snapshot the apply process fails with the following error.
Error: error deleting Database Instance "db-instance-1": AccessDenied: User: arn:aws:sts::xxxxxxxxxxxx:assumed-role/jenkins is not authorized to perform: rds:DeleteDBInstance on resource: arn:aws:rds:us-east-2:xxxxxxxxxxx:db:db-instance-1 status code: 403, request id: a43bf094-e294-4ecd-ad51-6d7ad78689b8
In order to allow this to work we need to remove read replicas and auto-scaling profile of Aurora cluster before restoring RDS from snapshot.
If you have jenkins permission to rds:DeleteDBInstance, wouldnt that be enough to allow jenkins to delete the read replica on your behalf?