mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-16 08:37:18 +01:00
19 lines
654 B
HCL
19 lines
654 B
HCL
resource "local_file" "config_map_aws_auth" {
|
|
content = "${data.template_file.config_map_aws_auth.rendered}"
|
|
filename = "${var.config_output_path}/config-map-aws-auth.yaml"
|
|
count = "${var.manage_aws_auth ? 1 : 0}"
|
|
}
|
|
|
|
resource "null_resource" "configure_kubectl" {
|
|
provisioner "local-exec" {
|
|
command = "kubectl apply -f ${var.config_output_path}/config-map-aws-auth.yaml --kubeconfig ${var.config_output_path}/kubeconfig"
|
|
}
|
|
|
|
triggers {
|
|
config_map_rendered = "${data.template_file.config_map_aws_auth.rendered}"
|
|
kubeconfig_rendered = "${data.template_file.kubeconfig.rendered}"
|
|
}
|
|
|
|
count = "${var.manage_aws_auth ? 1 : 0}"
|
|
}
|