mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-19 01:57:35 +01:00
Co-authored-by: Simon Gurcke <simon@gurcke.de> Co-authored-by: Daniel Piddock <33028589+dpiddockcmp@users.noreply.github.com>
18 lines
498 B
HCL
18 lines
498 B
HCL
data "aws_iam_policy_document" "eks_fargate_pod_assume_role" {
|
|
count = local.create_eks && var.create_fargate_pod_execution_role ? 1 : 0
|
|
statement {
|
|
effect = "Allow"
|
|
actions = ["sts:AssumeRole"]
|
|
|
|
principals {
|
|
type = "Service"
|
|
identifiers = ["eks-fargate-pods.amazonaws.com"]
|
|
}
|
|
}
|
|
}
|
|
|
|
data "aws_iam_role" "custom_fargate_iam_role" {
|
|
count = local.create_eks && ! var.create_fargate_pod_execution_role ? 1 : 0
|
|
name = var.fargate_pod_execution_role_name
|
|
}
|