diff --git a/humanitec-resource-defs/k8s/service-account/main.tf b/humanitec-resource-defs/k8s/service-account/main.tf index 1e44941..4552067 100644 --- a/humanitec-resource-defs/k8s/service-account/main.tf +++ b/humanitec-resource-defs/k8s/service-account/main.tf @@ -23,7 +23,7 @@ serviceaccount.yaml: metadata: name: $${resources.aws-role.outputs.k8s_service_account_name} annotations: - {{- if "$${resources.aws-role.outputs.role_arn}}" } + {{- if "$${resources.aws-role.outputs.role_arn}}" }} eks.amazonaws.com/role-arn: $${resources.aws-role.outputs.role_arn} {{- end }} context: {{trimPrefix "modules." "$${context.res.id}"}} diff --git a/modules/iam-role/service-account/outputs.tf b/modules/iam-role/service-account/outputs.tf index 4fa66b2..9515f56 100644 --- a/modules/iam-role/service-account/outputs.tf +++ b/modules/iam-role/service-account/outputs.tf @@ -1,5 +1,5 @@ output "role_arn" { - value = length(var.policy_arns) > 0 ? aws_iam_role.main[0].arn : null + value = length(var.policy_arns) > 0 ? aws_iam_role.main[0].arn : "" } output "k8s_service_account_name" {