diff --git a/main.tf b/main.tf index 59258b9..2f35316 100644 --- a/main.tf +++ b/main.tf @@ -1,10 +1,10 @@ locals { resource_name_postfix = var.aws_cluster_name - iam_role_name = "castai-eks-${local.resource_name_postfix}" + iam_role_name = "castai-eks-${substr(local.resource_name_postfix, 0, 53)}" iam_policy_name = var.create_iam_resources_per_cluster ? "CastEKSPolicy-${local.resource_name_postfix}" : "CastEKSPolicy-tf" - iam_role_policy_name = "castai-user-policy-${local.resource_name_postfix}" - instance_profile_role_name = "castai-eks-instance-${local.resource_name_postfix}" + iam_role_policy_name = "castai-user-policy-${substr(local.resource_name_postfix, 0, 45)}" + instance_profile_role_name = "castai-eks-instance-${substr(local.resource_name_postfix, 0, 44)}" iam_policy_prefix = "arn:${data.aws_partition.current.partition}:iam::aws:policy" }