Skip to content

Commit

Permalink
Merge pull request #19 from truefoundry/cap-iam-prefix-length
Browse files Browse the repository at this point in the history
Cap iam role prefix length
  • Loading branch information
DeeAjayi authored Nov 20, 2024
2 parents 194ad56 + 6b75ad6 commit 5706e7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ resource "aws_iam_role" "truefoundry_platform_feature_iam_role" {
count = var.platform_user_enabled ? 0 : 1
name = var.platform_role_enable_override ? var.platform_role_override_name : null
description = "IAM role for TrueFoundry platform to access S3 bucket, SSM, ECR and EKS"
name_prefix = var.platform_role_enable_override ? null : "${local.truefoundry_unique_name}-iam-role-"
name_prefix = var.platform_role_enable_override ? null : local.iam_role_name_prefix
force_detach_policies = true

assume_role_policy = jsonencode({
Expand Down
3 changes: 2 additions & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ locals {
]
truefoundry_platform_policy_arns = [for arn in local.policy_arns : tostring(arn) if arn != null]
oidc_provider_url = replace(data.aws_eks_cluster.cluster.identity[0].oidc[0].issuer, "https://", "")
oidc_provider_url = replace(data.aws_eks_cluster.cluster.identity[0].oidc[0].issuer, "https://", "")
iam_role_name_prefix = trimsuffix(substr("${local.truefoundry_unique_name}-iam-role-", 0, 37), "-")
}

0 comments on commit 5706e7d

Please sign in to comment.