Skip to content

Commit

Permalink
secret rotation now depends on the permissions
Browse files Browse the repository at this point in the history
This fixes a bug where if you deploy the components one by one with parallelism=1, deploying the secret rotation fails because of a lack of permission to call the rotation lambda.
  • Loading branch information
iress-ac authored Oct 14, 2022
1 parent 2b9e826 commit 3946160
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions infra/terraform/modules/_auth/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ resource "aws_secretsmanager_secret_rotation" "key_pair" {
rotation_rules {
automatically_after_days = var.key_pair_rotation_period_days
}

# Secrets manager requires the access to the rotation lambda to be applied
depends_on = [
aws_lambda_permission.allow_secrets_manager
]
}

0 comments on commit 3946160

Please sign in to comment.