Skip to content

Commit dffb0e5

Browse files
committed
fmt with terraform 0.14
The format seems to have changed in Terraform 0.14
1 parent f410c1b commit dffb0e5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cluster.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource "aws_eks_cluster" "this" {
2727
delete = var.cluster_delete_timeout
2828
}
2929

30-
dynamic encryption_config {
30+
dynamic "encryption_config" {
3131
for_each = toset(var.cluster_encryption_config)
3232

3333
content {

local.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ locals {
1919
# Windows nodes are available from k8s 1.14. If cluster version is less than 1.14, fix ami filter to some constant to not fail on 'terraform plan'.
2020
worker_ami_name_filter_windows = (var.worker_ami_name_filter_windows != "" ?
2121
var.worker_ami_name_filter_windows : "Windows_Server-2019-English-Core-EKS_Optimized-${tonumber(var.cluster_version) >= 1.14 ? var.cluster_version : 1.14}-*"
22-
)
2322

23+
)
2424
ec2_principal = "ec2.${data.aws_partition.current.dns_suffix}"
2525
sts_principal = "sts.${data.aws_partition.current.dns_suffix}"
2626

workers_launch_template.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ resource "aws_autoscaling_group" "workers_launch_template" {
9393
local.workers_group_defaults["health_check_grace_period"]
9494
)
9595

96-
dynamic mixed_instances_policy {
96+
dynamic "mixed_instances_policy" {
9797
iterator = item
9898
for_each = (lookup(var.worker_groups_launch_template[count.index], "override_instance_types", null) != null) || (lookup(var.worker_groups_launch_template[count.index], "on_demand_allocation_strategy", local.workers_group_defaults["on_demand_allocation_strategy"]) != null) ? list(var.worker_groups_launch_template[count.index]) : []
9999

@@ -157,7 +157,7 @@ resource "aws_autoscaling_group" "workers_launch_template" {
157157
}
158158
}
159159

160-
dynamic launch_template {
160+
dynamic "launch_template" {
161161
iterator = item
162162
for_each = (lookup(var.worker_groups_launch_template[count.index], "override_instance_types", null) != null) || (lookup(var.worker_groups_launch_template[count.index], "on_demand_allocation_strategy", local.workers_group_defaults["on_demand_allocation_strategy"]) != null) ? [] : list(var.worker_groups_launch_template[count.index])
163163

@@ -336,7 +336,7 @@ resource "aws_launch_template" "workers_launch_template" {
336336
)
337337
}
338338

339-
dynamic placement {
339+
dynamic "placement" {
340340
for_each = lookup(var.worker_groups_launch_template[count.index], "launch_template_placement_group", local.workers_group_defaults["launch_template_placement_group"]) != null ? [lookup(var.worker_groups_launch_template[count.index], "launch_template_placement_group", local.workers_group_defaults["launch_template_placement_group"])] : []
341341

342342
content {
@@ -349,7 +349,7 @@ resource "aws_launch_template" "workers_launch_template" {
349349
}
350350
}
351351

352-
dynamic instance_market_options {
352+
dynamic "instance_market_options" {
353353
for_each = lookup(var.worker_groups_launch_template[count.index], "market_type", null) == null ? [] : list(lookup(var.worker_groups_launch_template[count.index], "market_type", null))
354354
content {
355355
market_type = instance_market_options.value

0 commit comments

Comments
 (0)