Terraform v0.12.0
kubernetes_config_map
On this block
resource "kubernetes_config_map" "aws_auth_configmap" {
metadata {
name = "aws-auth"
namespace = "kube-system"
}
data {
mapRoles = <<YAML
- rolearn: ${data.aws_iam_role.eks_cluster_iam_role.arn}
username: system:node:{{EC2PrivateDNSName}}
groups:
- system:bootstrappers
- system:nodes
- rolearn: ${data.aws_iam_role.bastion_role.arn}
username: kubectl-access-user
groups:
- system:masters
YAML
}
}
I'm having this error
Error: Unsupported block type
on ../modules/eks/kubectl_caller_permission_fix.tf line 17, in resource "kubernetes_config_map" "aws_auth_configmap":
17: data {
Blocks of type "data" are not expected here. Did you mean to define argument
"data"? If so, use the equals sign to assign it a value.
Data block should not throw an error
Seems the data block inside the kubernetes provider is not well recognized ?
Thanks for helping out !
I think I found out.
Simply replace "data {" by "data = {"
Looks like a crutch
Most helpful comment
I think I found out.
Simply replace "data {" by "data = {"