Had an issue recently using the terraform-aws-eks
module where we wanted to create the aws-auth
config map and set the mapRoles
and mapAccounts
fields in the module but manage the mapUsers
elsewhere.
kubernetes_config_map_v1_data
seemed tailor made for this but we kept running into conflict issues where the fields created by kubernetes_config_map_v1_data
kept wanting to get destroyed by the kubernetes_config_map
resource.
We found a solution and put the answer below to anybody else having this issue.
terraform-aws-eks module version
17
within the terraform module
aws-auth.tf
:From another repo: