Skip to content

Commit

Permalink
move flyteadmin from controlplane to dataplane role (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahjax authored Apr 1, 2024
1 parent 818e183 commit 02e826f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions modules/flyte/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ resource "aws_iam_role" "flyte_controlplane" {
"${trimprefix(local.oidc_provider_url, "https://")}:aud" : "sts.amazonaws.com",
"${trimprefix(local.oidc_provider_url, "https://")}:sub" : [
"system:serviceaccount:${var.platform_namespace}:${var.serviceaccount_names.datacatalog}",
"system:serviceaccount:${var.platform_namespace}:${var.serviceaccount_names.flyteadmin}",
"system:serviceaccount:${var.platform_namespace}:${var.serviceaccount_names.flytepropeller}",
]
}
Expand Down Expand Up @@ -76,7 +75,22 @@ resource "aws_iam_role" "flyte_dataplane" {
]
}
}
}
},
{
Action = "sts:AssumeRoleWithWebIdentity"
Effect = "Allow"
Principal = {
Federated = local.oidc_provider_arn
}
Condition : {
StringEquals : {
"${trimprefix(local.oidc_provider_url, "https://")}:aud" : "sts.amazonaws.com",
"${trimprefix(local.oidc_provider_url, "https://")}:sub" : [
"system:serviceaccount:${var.platform_namespace}:${var.serviceaccount_names.flyteadmin}",
]
}
}
},
]
})
}
Expand Down

0 comments on commit 02e826f

Please sign in to comment.