Skip to content

Commit 806edb6

Browse files
stijndehaesmax-rocket-internet
authored andcommitted
Add support for eks endpoint_private_access and endpoint_public_access (#314)
1 parent 97c7964 commit 806edb6

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
### Added
1313

14+
- Added support for eks public and private endpoints (by @stijndehaes)
1415
- Write your awesome addition here (by @you)
1516
- Added minimum inbound traffic rule to the cluster worker security group as per the [EKS security group requirements](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) (by @sc250024)
1617

cluster.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ resource "aws_eks_cluster" "this" {
44
version = "${var.cluster_version}"
55

66
vpc_config {
7-
security_group_ids = ["${local.cluster_security_group_id}"]
8-
subnet_ids = ["${var.subnets}"]
7+
security_group_ids = ["${local.cluster_security_group_id}"]
8+
subnet_ids = ["${var.subnets}"]
9+
endpoint_private_access = "${var.cluster_endpoint_private_access}"
10+
endpoint_public_access = "${var.cluster_endpoint_public_access}"
911
}
1012

1113
timeouts {

variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,13 @@ variable "iam_path" {
241241
description = "If provided, all IAM roles will be created on this path."
242242
default = "/"
243243
}
244+
245+
variable "cluster_endpoint_private_access" {
246+
description = "Indicates whether or not the Amazon EKS private API server endpoint is enabled."
247+
default = false
248+
}
249+
250+
variable "cluster_endpoint_public_access" {
251+
description = "Indicates whether or not the Amazon EKS public API server endpoint is enabled."
252+
default = true
253+
}

0 commit comments

Comments
 (0)