Skip to content

Commit

Permalink
add ip address when manage_aws_auth is true and public_access is false
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Davis committed Mar 18, 2020
1 parent a1ee41b commit 6fdb380
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ terraform {
template = ">= 2.1"
random = ">= 2.1"
kubernetes = ">= 1.6.2"
http = ">= 1.1"
}
}

0 comments on commit 6fdb380

Please sign in to comment.