Skip to content

Commit d3d6697

Browse files
authored
feat: Add support for Provisioned Control Plane (#3597)
* feat: Add support for Provisioned Control Plane * update README * update karpenter example
1 parent b8bbba8 commit d3d6697

File tree

5 files changed

+61
-0
lines changed

5 files changed

+61
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,39 @@ module "eks" {
100100
}
101101
```
102102

103+
### EKS Provisioned Control Plane
104+
105+
EKS Provisioned Control Plane allows you to provision a control plane with increased capacity for larger workloads. Valid tier values are `standard`, `tier-xl`, `tier-2xl`, and `tier-4xl`.
106+
107+
```hcl
108+
module "eks" {
109+
source = "terraform-aws-modules/eks/aws"
110+
version = "~> 21.0"
111+
112+
name = "my-cluster"
113+
kubernetes_version = "1.33"
114+
115+
# Optional
116+
endpoint_public_access = true
117+
118+
# Optional: Adds the current caller identity as an administrator via cluster access entry
119+
enable_cluster_creator_admin_permissions = true
120+
121+
# EKS Provisioned Control Plane configuration
122+
control_plane_scaling_config = {
123+
tier = "tier-xl"
124+
}
125+
126+
vpc_id = "vpc-1234556abcdef"
127+
subnet_ids = ["subnet-abcde012", "subnet-bcde012a", "subnet-fghi345a"]
128+
129+
tags = {
130+
Environment = "dev"
131+
Terraform = "true"
132+
}
133+
}
134+
```
135+
103136
### EKS Managed Node Group
104137

105138
```hcl
@@ -437,6 +470,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
437470
| <a name="input_cloudwatch_log_group_tags"></a> [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags) | A map of additional tags to add to the cloudwatch log group created | `map(string)` | `{}` | no |
438471
| <a name="input_cluster_tags"></a> [cluster\_tags](#input\_cluster\_tags) | A map of additional tags to add to the cluster | `map(string)` | `{}` | no |
439472
| <a name="input_compute_config"></a> [compute\_config](#input\_compute\_config) | Configuration block for the cluster compute configuration | <pre>object({<br/> enabled = optional(bool, false)<br/> node_pools = optional(list(string))<br/> node_role_arn = optional(string)<br/> })</pre> | `null` | no |
473+
| <a name="input_control_plane_scaling_config"></a> [control\_plane\_scaling\_config](#input\_control\_plane\_scaling\_config) | Configuration block for the EKS Provisioned Control Plane scaling tier. Valid values for tier are `standard`, `tier-xl`, `tier-2xl`, and `tier-4xl` | <pre>object({<br/> tier = string<br/> })</pre> | `null` | no |
440474
| <a name="input_control_plane_subnet_ids"></a> [control\_plane\_subnet\_ids](#input\_control\_plane\_subnet\_ids) | A list of subnet IDs where the EKS cluster control plane (ENIs) will be provisioned. Used for expanding the pool of subnets used by nodes/node groups without replacing the EKS control plane | `list(string)` | `[]` | no |
441475
| <a name="input_create"></a> [create](#input\_create) | Controls if resources should be created (affects nearly all resources) | `bool` | `true` | no |
442476
| <a name="input_create_auto_mode_iam_resources"></a> [create\_auto\_mode\_iam\_resources](#input\_create\_auto\_mode\_iam\_resources) | Determines whether to create/attach IAM resources for EKS Auto Mode. Useful for when using only custom node pools and not built-in EKS Auto Mode node pools | `bool` | `false` | no |
@@ -539,6 +573,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
539573
| <a name="output_cluster_addons"></a> [cluster\_addons](#output\_cluster\_addons) | Map of attribute maps for all EKS cluster addons enabled |
540574
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The Amazon Resource Name (ARN) of the cluster |
541575
| <a name="output_cluster_certificate_authority_data"></a> [cluster\_certificate\_authority\_data](#output\_cluster\_certificate\_authority\_data) | Base64 encoded certificate data required to communicate with the cluster |
576+
| <a name="output_cluster_control_plane_scaling_tier"></a> [cluster\_control\_plane\_scaling\_tier](#output\_cluster\_control\_plane\_scaling\_tier) | The EKS Provisioned Control Plane scaling tier for the cluster |
542577
| <a name="output_cluster_dualstack_oidc_issuer_url"></a> [cluster\_dualstack\_oidc\_issuer\_url](#output\_cluster\_dualstack\_oidc\_issuer\_url) | Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider |
543578
| <a name="output_cluster_endpoint"></a> [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for your Kubernetes API server |
544579
| <a name="output_cluster_iam_role_arn"></a> [cluster\_iam\_role\_arn](#output\_cluster\_iam\_role\_arn) | Cluster IAM role ARN |

examples/karpenter/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ module "eks" {
5757
enable_cluster_creator_admin_permissions = true
5858
endpoint_public_access = true
5959

60+
# EKS Provisioned Control Plane configuration
61+
control_plane_scaling_config = {
62+
tier = "standard"
63+
}
64+
6065
addons = {
6166
coredns = {}
6267
eks-pod-identity-agent = {

main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ resource "aws_eks_cluster" "this" {
5757
bootstrap_cluster_creator_admin_permissions = false
5858
}
5959

60+
dynamic "control_plane_scaling_config" {
61+
for_each = var.control_plane_scaling_config != null ? [var.control_plane_scaling_config] : []
62+
63+
content {
64+
tier = control_plane_scaling_config.value.tier
65+
}
66+
}
67+
6068
dynamic "compute_config" {
6169
for_each = var.compute_config != null ? [var.compute_config] : []
6270

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ output "cluster_ip_family" {
8888
value = try(aws_eks_cluster.this[0].kubernetes_network_config[0].ip_family, null)
8989
}
9090

91+
output "cluster_control_plane_scaling_tier" {
92+
description = "The EKS Provisioned Control Plane scaling tier for the cluster"
93+
value = try(aws_eks_cluster.this[0].control_plane_scaling_config[0].tier, null)
94+
}
95+
9196
################################################################################
9297
# Access Entry
9398
################################################################################

variables.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ variable "compute_config" {
7272
default = null
7373
}
7474

75+
variable "control_plane_scaling_config" {
76+
description = "Configuration block for the EKS Provisioned Control Plane scaling tier. Valid values for tier are `standard`, `tier-xl`, `tier-2xl`, and `tier-4xl`"
77+
type = object({
78+
tier = string
79+
})
80+
default = null
81+
}
82+
7583
variable "upgrade_policy" {
7684
description = "Configuration block for the cluster upgrade policy"
7785
type = object({

0 commit comments

Comments
 (0)