From 6fdb38061e71554b6070be65eef9ac400f78b1e5 Mon Sep 17 00:00:00 2001 From: Brian Davis Date: Thu, 20 Feb 2020 17:26:45 -0500 Subject: [PATCH] add ip address when manage_aws_auth is true and public_access is false --- cluster.tf | 12 ++++++++++++ versions.tf | 1 + 2 files changed, 13 insertions(+) diff --git a/cluster.tf b/cluster.tf index cd5e6cd5c7..52b3ecaff2 100644 --- a/cluster.tf +++ b/cluster.tf @@ -45,15 +45,27 @@ resource "aws_eks_cluster" "this" { ] } +<<<<<<< HEAD resource "aws_security_group_rule" "cluster_private_access" { count = var.create_eks && var.manage_aws_auth && var.cluster_endpoint_private_access && var.cluster_endpoint_public_access == false ? 1 : 0 +======= +resource "aws_security_group_rule" "eks_cluster_add_access" { + count = var.create_eks && var.manage_aws_auth == true && var.cluster_endpoint_public_access == false ? 1 : 0 +>>>>>>> 94a29f4... add ip address when manage_aws_auth is true and public_access is false type = "ingress" from_port = 443 to_port = 443 protocol = "tcp" +<<<<<<< HEAD cidr_blocks = var.cluster_endpoint_private_access_cidrs security_group_id = aws_eks_cluster.this[0].vpc_config[0].cluster_security_group_id +======= + cidr_blocks = ["${chomp(data.http.myip.body)}/32"] + + security_group_id = aws_eks_cluster.this[0].vpc_config.cluster_security_group_id + depends_on = [aws_eks_cluster.this[0]] +>>>>>>> 94a29f4... add ip address when manage_aws_auth is true and public_access is false } diff --git a/versions.tf b/versions.tf index f73abd331e..f16d7ad286 100644 --- a/versions.tf +++ b/versions.tf @@ -8,5 +8,6 @@ terraform { template = ">= 2.1" random = ">= 2.1" kubernetes = ">= 1.6.2" + http = ">= 1.1" } }