Skip to content

Commit

Permalink
fix aws_auth_configmap_yaml rolearn
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaji committed Jan 31, 2022
1 parent 16f46db commit 2766fd7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ locals {
groups:
- system:bootstrappers
- system:nodes
- rolearn: ${module.fargate_profile.fargate_profile_arn}
- rolearn: ${module.fargate_profile.iam_role_arn}
username: system:node:{{SessionName}}
groups:
- system:bootstrappers
Expand Down
5 changes: 5 additions & 0 deletions modules/fargate-profile/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ output "fargate_profile_status" {
description = "Status of the EKS Fargate Profile"
value = try(aws_eks_fargate_profile.this[0].status, "")
}

output "fargate_profile_pod_execution_role_arn" {
description = "Amazon Resource Name (ARN) of the EKS Fargate Profile Pod execution role ARN"
value = try(aws_eks_fargate_profile.this[0].pod_execution_role_arn, "")
}
1 change: 1 addition & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ output "aws_auth_configmap_yaml" {
self_managed_role_arns = [for group in module.self_managed_node_group : group.iam_role_arn if group.platform != "windows"]
win32_self_managed_role_arns = [for group in module.self_managed_node_group : group.iam_role_arn if group.platform == "windows"]
fargate_profile_arns = [for group in module.fargate_profile : group.fargate_profile_arn]
pod_execution_role_arns = [for group in module.fargate_profile : group.fargate_profile_pod_execution_role_arn]
}
)
}
2 changes: 1 addition & 1 deletion templates/aws_auth_cm.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data:
- system:bootstrappers
- system:nodes
%{ endfor ~}
%{ for role in fargate_profile_arns ~}
%{ for role in pod_execution_role_arns ~}
- rolearn: ${role}
username: system:node:{{SessionName}}
groups:
Expand Down

0 comments on commit 2766fd7

Please sign in to comment.