-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jacob Woffenden <[email protected]>
- Loading branch information
1 parent
2538d4a
commit f550d2d
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
terraform/aws/analytical-platform-data-production/airflow-service/iam-roles.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module "mojap_compute_external_secrets_iam_role" { | ||
#checkov:skip=CKV_TF_1:Module registry does not support commit hashes for versions | ||
#checkov:skip=CKV_TF_2:Module registry does not support tags for versions | ||
|
||
for_each = local.analytical_platform_compute_environments | ||
|
||
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks" | ||
version = "5.52.2" | ||
|
||
role_name = "mojap-compute-${each.key}-external-secrets" | ||
attach_external_secrets_policy = true | ||
external_secrets_kms_key_arns = [ | ||
module.secrets_manager_kms.key_arn, | ||
module.secrets_manager_eu_west_1_replica_kms.key_arn, | ||
] | ||
external_secrets_secrets_manager_arns = formatlist("arn:aws:secretsmanager:%s:${var.account_ids["analytical-platform-data-production"]}:secret:/airflow/${each.key}/*", ["eu-west-2", "eu-west-1"]) | ||
|
||
oidc_providers = { | ||
main = { | ||
provider_arn = data.aws_iam_openid_connect_provider.eks_oidc[each.key].arn | ||
namespace_service_accounts = ["mwaa:external-secrets-analytical-platform-data-production"] | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
terraform/aws/analytical-platform-data-production/airflow-service/local.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
locals { | ||
analytical_platform_compute_environments = { | ||
development = { | ||
eks_oidc_id = "1972AFFBD0701A0D1FD291E34F7D1287" | ||
} | ||
test = { | ||
eks_oidc_id = "9FAFCA50C4DA68A8E75FD21EA53A4F2B" | ||
} | ||
production = { | ||
eks_oidc_id = "801920EDEF91E3CAB03E04C03A2DE2BB" | ||
} | ||
} | ||
} |