mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-29 21:51:51 +02:00
remove empty [] to mapRoles object in aws-auth (#606)
* remove empty [] to mapRoles object in aws-auth
Simply having ${yamlencode(var.map_roles)} in mapRoles for aws-auth
creates a empty [] at the end after adding the default roles.
Changing it to be added only when its not empty
* Update aws_auth.tf
This commit is contained in:
@@ -53,7 +53,7 @@ resource "kubernetes_config_map" "aws_auth" {
|
|||||||
data = {
|
data = {
|
||||||
mapRoles = <<EOF
|
mapRoles = <<EOF
|
||||||
${join("", distinct(concat(data.template_file.launch_template_worker_role_arns.*.rendered, data.template_file.worker_role_arns.*.rendered)))}
|
${join("", distinct(concat(data.template_file.launch_template_worker_role_arns.*.rendered, data.template_file.worker_role_arns.*.rendered)))}
|
||||||
${yamlencode(var.map_roles)}
|
%{if var.map_roles != []}${yamlencode(var.map_roles)}%{endif}
|
||||||
EOF
|
EOF
|
||||||
mapUsers = yamlencode(var.map_users)
|
mapUsers = yamlencode(var.map_users)
|
||||||
mapAccounts = yamlencode(var.map_accounts)
|
mapAccounts = yamlencode(var.map_accounts)
|
||||||
|
|||||||
Reference in New Issue
Block a user