mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-31 22:43:07 +02:00
fix: add ip address when manage_aws_auth is true and public_access is false (#745)
This commit is contained in:
12
cluster.tf
12
cluster.tf
@@ -45,6 +45,18 @@ resource "aws_eks_cluster" "this" {
|
||||
]
|
||||
}
|
||||
|
||||
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
|
||||
type = "ingress"
|
||||
from_port = 443
|
||||
to_port = 443
|
||||
protocol = "tcp"
|
||||
cidr_blocks = var.cluster_endpoint_private_access_cidrs
|
||||
|
||||
security_group_id = aws_eks_cluster.this[0].vpc_config[0].cluster_security_group_id
|
||||
}
|
||||
|
||||
|
||||
resource "null_resource" "wait_for_cluster" {
|
||||
count = var.create_eks && var.manage_aws_auth ? 1 : 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user