From f428d32e01742a9c4a2fcf305d9e5cec6ad2f65a Mon Sep 17 00:00:00 2001 From: Guga Cavalieri Date: Tue, 9 Mar 2021 15:59:51 -0300 Subject: [PATCH] limit cluster_name when creating fargate IAM Role --- modules/fargate/fargate.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/fargate/fargate.tf b/modules/fargate/fargate.tf index 43f616315a..e88adb63bb 100644 --- a/modules/fargate/fargate.tf +++ b/modules/fargate/fargate.tf @@ -1,6 +1,6 @@ resource "aws_iam_role" "eks_fargate_pod" { count = local.create_eks && var.create_fargate_pod_execution_role ? 1 : 0 - name_prefix = format("%s-fargate", var.cluster_name) + name_prefix = format("%s-fargate", substr(var.cluster_name, 0, 24)) assume_role_policy = data.aws_iam_policy_document.eks_fargate_pod_assume_role[0].json permissions_boundary = var.permissions_boundary tags = var.tags