mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-25 02:41:03 +01:00
Fixed issue with 'workers_group_defaults_defaults.iam_role_id' and added explicit depends_on for 'update_config_map_aws_auth' (#147)
* fix worker default 'iam_role_id' dependency * Add explicit depends_on to eks cluster for 'update_config_map_aws_auth'
This commit is contained in:
committed by
Max Williams
parent
0ee9d633d3
commit
cd7e56c821
@@ -5,6 +5,8 @@ resource "local_file" "config_map_aws_auth" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "null_resource" "update_config_map_aws_auth" {
|
resource "null_resource" "update_config_map_aws_auth" {
|
||||||
|
depends_on = ["aws_eks_cluster.this"]
|
||||||
|
|
||||||
provisioner "local-exec" {
|
provisioner "local-exec" {
|
||||||
command = "kubectl apply -f ${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}kubeconfig_${var.cluster_name}"
|
command = "kubectl apply -f ${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}kubeconfig_${var.cluster_name}"
|
||||||
}
|
}
|
||||||
|
|||||||
3
local.tf
3
local.tf
@@ -6,6 +6,7 @@ locals {
|
|||||||
cluster_security_group_id = "${coalesce(join("", aws_security_group.cluster.*.id), var.cluster_security_group_id)}"
|
cluster_security_group_id = "${coalesce(join("", aws_security_group.cluster.*.id), var.cluster_security_group_id)}"
|
||||||
|
|
||||||
worker_security_group_id = "${coalesce(join("", aws_security_group.workers.*.id), var.worker_security_group_id)}"
|
worker_security_group_id = "${coalesce(join("", aws_security_group.workers.*.id), var.worker_security_group_id)}"
|
||||||
|
default_iam_role_id = "${element(concat(aws_iam_role.workers.*.id, list("")), 0)}"
|
||||||
kubeconfig_name = "${var.kubeconfig_name == "" ? "eks_${var.cluster_name}" : var.kubeconfig_name}"
|
kubeconfig_name = "${var.kubeconfig_name == "" ? "eks_${var.cluster_name}" : var.kubeconfig_name}"
|
||||||
|
|
||||||
workers_group_defaults_defaults = {
|
workers_group_defaults_defaults = {
|
||||||
@@ -30,7 +31,7 @@ locals {
|
|||||||
autoscaling_enabled = false # Sets whether policy and matching tags will be added to allow autoscaling.
|
autoscaling_enabled = false # Sets whether policy and matching tags will be added to allow autoscaling.
|
||||||
additional_security_group_ids = "" # A comman delimited list of additional security group ids to include in worker launch config
|
additional_security_group_ids = "" # A comman delimited list of additional security group ids to include in worker launch config
|
||||||
protect_from_scale_in = false # Prevent AWS from scaling in, so that cluster-autoscaler is solely responsible.
|
protect_from_scale_in = false # Prevent AWS from scaling in, so that cluster-autoscaler is solely responsible.
|
||||||
iam_role_id = "${aws_iam_role.workers.id}" # Use the specified IAM role if set.
|
iam_role_id = "${local.default_iam_role_id}" # Use the specified IAM role if set.
|
||||||
}
|
}
|
||||||
|
|
||||||
workers_group_defaults = "${merge(local.workers_group_defaults_defaults, var.workers_group_defaults)}"
|
workers_group_defaults = "${merge(local.workers_group_defaults_defaults, var.workers_group_defaults)}"
|
||||||
|
|||||||
Reference in New Issue
Block a user