Skip to content

Commit cf32252

Browse files
authored
Add support for zonal shift configuration (#243)
1 parent 5a6095f commit cf32252

File tree

9 files changed

+69
-39
lines changed

9 files changed

+69
-39
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,14 @@ Available targets:
349349
| Name | Version |
350350
|------|---------|
351351
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
352-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.34.0 |
352+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.74.0 |
353353
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | >= 3.1.0, != 4.0.0 |
354354

355355
## Providers
356356

357357
| Name | Version |
358358
|------|---------|
359-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.34.0 |
359+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.74.0 |
360360
| <a name="provider_tls"></a> [tls](#provider\_tls) | >= 3.1.0, != 4.0.0 |
361361

362362
## Modules
@@ -454,6 +454,7 @@ Available targets:
454454
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | A list of subnet IDs to launch the cluster in | `list(string)` | n/a | yes |
455455
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br/>Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
456456
| <a name="input_tenant"></a> [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
457+
| <a name="input_zonal_shift_config"></a> [zonal\_shift\_config](#input\_zonal\_shift\_config) | Configuration block with zonal shift configuration for the cluster | <pre>object({<br/> enabled = optional(bool, null)<br/> })</pre> | `null` | no |
457458

458459
## Outputs
459460

docs/terraform.md

Lines changed: 36 additions & 35 deletions
Large diffs are not rendered by default.

examples/complete/fixtures.us-east-2.tfvars

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,7 @@ addons = [
4949
service_account_role_arn = null
5050
},
5151
]
52+
53+
zonal_shift_config = {
54+
enabled = true
55+
}

examples/complete/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ module "eks_cluster" {
113113
addons = local.addons
114114
addons_depends_on = [module.eks_node_group]
115115
bootstrap_self_managed_addons_enabled = var.bootstrap_self_managed_addons_enabled
116+
zonal_shift_config = var.zonal_shift_config
116117

117118
access_entry_map = local.access_entry_map
118119
access_config = {

examples/complete/variables.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,14 @@ variable "bootstrap_self_managed_addons_enabled" {
115115
default = null
116116
}
117117

118+
variable "zonal_shift_config" {
119+
type = object({
120+
enabled = optional(bool, null)
121+
})
122+
description = "Configuration block with zonal shift configuration for the cluster"
123+
default = null
124+
}
125+
118126
variable "private_ipv6_enabled" {
119127
type = bool
120128
default = false

examples/complete/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.34"
7+
version = ">= 5.74"
88
}
99
kubernetes = {
1010
source = "hashicorp/kubernetes"

main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ resource "aws_eks_cluster" "default" {
110110
}
111111
}
112112

113+
dynamic "zonal_shift_config" {
114+
for_each = var.zonal_shift_config != null ? [var.zonal_shift_config] : []
115+
content {
116+
enabled = zonal_shift_config.value.enabled
117+
}
118+
}
119+
113120
depends_on = [
114121
aws_iam_role.default,
115122
aws_iam_role_policy_attachment.cluster_elb_service_role,

variables.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ variable "bootstrap_self_managed_addons_enabled" {
203203
default = null
204204
}
205205

206+
variable "zonal_shift_config" {
207+
type = object({
208+
enabled = optional(bool, null)
209+
})
210+
description = "Configuration block with zonal shift configuration for the cluster"
211+
default = null
212+
}
213+
206214
variable "cluster_attributes" {
207215
type = list(string)
208216
description = "Override label module default cluster attributes"

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.34.0"
7+
version = ">= 5.74.0"
88
}
99
tls = {
1010
source = "hashicorp/tls"

0 commit comments

Comments
 (0)