diff --git a/infra/terraform/modules/_auth/secrets.tf b/infra/terraform/modules/_auth/secrets.tf index a47c02e..4da3181 100644 --- a/infra/terraform/modules/_auth/secrets.tf +++ b/infra/terraform/modules/_auth/secrets.tf @@ -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 + ] }