Skip to content

Commit

Permalink
Merge pull request #157 from uktrade/feat/allow-multiple-secrets-airflow
Browse files Browse the repository at this point in the history
feat: allow multiple secrets for Airflow teams
  • Loading branch information
michalc authored Nov 12, 2024
2 parents 45b0ba2 + a37f6e0 commit 393eedd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion infra/airflow_dag_processor.tf
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,20 @@ data "aws_iam_policy_document" "airflow_team" {
]

resources = [
"arn:aws:secretsmanager:${data.aws_region.aws_region.name}:${data.aws_caller_identity.aws_caller_identity.account_id}:secret:${var.prefix}/airflow/${var.airflow_dag_processors[count.index].name}-*"
"arn:aws:secretsmanager:${data.aws_region.aws_region.name}:${data.aws_caller_identity.aws_caller_identity.account_id}:secret:${var.prefix}/airflow/${var.airflow_dag_processors[count.index].name}-*",
"arn:aws:secretsmanager:${data.aws_region.aws_region.name}:${data.aws_caller_identity.aws_caller_identity.account_id}:secret:${var.prefix}/airflow/${var.airflow_dag_processors[count.index].name}_2-*"
]
}

# This just gives a permission to call BatchGetSecretValue, but doesn't actually give permission
# to look at any secret values themselves - secretsmanager:GetSecretValue does that
statement {
actions = [
"secretsmanager:BatchGetSecretValue"
]

resources = [
"*"
]
}

Expand Down

0 comments on commit 393eedd

Please sign in to comment.