to avoid template: main.auto.tfvars.tpl:56:24: executing "main.auto.tfvars.tpl" at <.spec.kubernetes.awsAuth.additionalAccounts>: map has no entry for key "additionalAccounts"
{{- if hasKeyAny .spec.kubernetes "awsAuth" }}
{{- if gt (len .spec.kubernetes.awsAuth.additionalAccounts) 0 }}
eks_map_accounts = {{ toJson .spec.kubernetes.awsAuth.additionalAccounts }}
{{- end }}
{{- if gt (len .spec.kubernetes.awsAuth.users) 0 }}
{{- $users := list }}
{{- range $u := .spec.kubernetes.awsAuth.users }}
{{- $currUser := dict "username" $u.username "userarn" $u.userarn "groups" $u.groups }}
{{- $users = append $users $currUser }}
{{- end }}
eks_map_users = {{ toPrettyJson $users | join ","}}
{{- end }}
{{- if gt (len .spec.kubernetes.awsAuth.roles) 0 }}
{{- $roles := list }}
{{- range $r := .spec.kubernetes.awsAuth.roles }}
{{- $currRole := dict "username" $r.username "rolearn" $r.rolearn "groups" $r.groups }}
{{- $roles = append $roles $currRole }}
{{- end }}
eks_map_roles = {{ toPrettyJson $roles | join "," }}
{{- end }}
{{- end }}
check for nils in
.spec.kubernetes.awsAuth.additionalAccounts .spec.kubernetes.awsAuth.users .spec.kubernetes.awsAuth.roles
to avoid
template: main.auto.tfvars.tpl:56:24: executing "main.auto.tfvars.tpl" at <.spec.kubernetes.awsAuth.additionalAccounts>: map has no entry for key "additionalAccounts"