terraform-aws-rds-cluster icon indicating copy to clipboard operation
terraform-aws-rds-cluster copied to clipboard

Cannot restore cluster from snapshot without removing auto-scaling profile

Open davejrocks opened this issue 5 years ago • 1 comments

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.

davejrocks avatar Oct 05 '20 20:10 davejrocks

If you have jenkins permission to rds:DeleteDBInstance, wouldnt that be enough to allow jenkins to delete the read replica on your behalf?

nitrocode avatar Aug 16 '21 19:08 nitrocode