Skip to content

Commit

Permalink
add oidc (#4493)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emterry authored Jun 6, 2024
1 parent ca67679 commit 4e4f8d2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ data "aws_eks_cluster" "analytical_platform_development" {
data "tls_certificate" "analytical_platform_development_eks_oidc_issuer" {
url = data.aws_eks_cluster.analytical_platform_development.identity[0].oidc[0].issuer
}

data "tls_certificate" "airflow_dev_eks_cluster" {
url = aws_eks_cluster.airflow_dev_eks_cluster.identity[0].oidc[0].issuer
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ resource "aws_iam_openid_connect_provider" "analytical_platform_development" {
client_id_list = ["sts.amazonaws.com"]
thumbprint_list = [data.tls_certificate.analytical_platform_development_eks_oidc_issuer.certificates[0].sha1_fingerprint]
}

resource "aws_iam_openid_connect_provider" "airflow_dev" {
url = aws_eks_cluster.airflow_dev_eks_cluster.identity[0].oidc[0].issuer
client_id_list = ["sts.amazonaws.com"]
thumbprint_list = [data.tls_certificate.airflow_dev_eks_cluster.certificates[0].sha1_fingerprint]
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module "airflow_dev_monitoring_iam_role" {

oidc_providers = {
one = {
provider_arn = resource.aws_iam_openid_connect_provider.analytical_platform_development.arn
provider_arn = resource.aws_iam_openid_connect_provider.airflow_dev.arn
namespace_service_accounts = ["airflow:airflow"]
}
}
Expand Down

0 comments on commit 4e4f8d2

Please sign in to comment.