Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify the backup vault access policies that contain restrictive clau…
…ses to prevent their deletion This commit fixes the following error when trying to delete backup vault access policies for vaults (`aws/efs/automatic-backup-vault`) automatically created when EFS backup is enabled. ``` time="2023-10-05T15:37:07Z" level=error msg="AccessDeniedException: User: arn:aws:sts::X:assumed-role/XRole/SAAssumedRoleSession is not authorized to perform: backup:DeleteBackupVaultAccessPolicy on resource: arn:aws:backup:us-east-1:X:backup-vault:aws/efs/automatic-backup-vault with an explicit deny in a resource-based policy ``` The module before attempting to delete the backup vault access policy, sets a permissive policy to ensure the `backup:DeleteBackupVaultAccessPolicy` is allowed. The operation to put a policy to allow `backup:DeleteBackupVaultAccessPolicy` was silently failing due to an error: ``` The specified policy cannot be added to the vault due to cross-account sharing restrictions. Amend the policy or the vault's settings, then retry request ``` This commit updates the policy, to use the default as a template, but excluding delete actions. Signed-off-by: Gabriela S. Soria <gsoria@oreilly.com>
- Loading branch information