mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-15 08:14:12 +01:00
chore: Fix terraform format for TF 0.14 (#1157)
This commit is contained in:
committed by
GitHub
parent
942a88e18f
commit
ea2f6982d5
@@ -27,7 +27,7 @@ resource "aws_eks_cluster" "this" {
|
||||
delete = var.cluster_delete_timeout
|
||||
}
|
||||
|
||||
dynamic encryption_config {
|
||||
dynamic "encryption_config" {
|
||||
for_each = toset(var.cluster_encryption_config)
|
||||
|
||||
content {
|
||||
|
||||
@@ -12,6 +12,6 @@ data "aws_iam_policy_document" "eks_fargate_pod_assume_role" {
|
||||
}
|
||||
|
||||
data "aws_iam_role" "custom_fargate_iam_role" {
|
||||
count = local.create_eks && ! var.create_fargate_pod_execution_role ? 1 : 0
|
||||
count = local.create_eks && !var.create_fargate_pod_execution_role ? 1 : 0
|
||||
name = var.fargate_pod_execution_role_name
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ resource "aws_autoscaling_group" "workers" {
|
||||
"value", tag_value,
|
||||
"propagate_at_launch", "true"
|
||||
)
|
||||
if tag_key != "Name" && ! contains([for tag in lookup(var.worker_groups[count.index], "tags", local.workers_group_defaults["tags"]) : tag["key"]], tag_key)
|
||||
if tag_key != "Name" && !contains([for tag in lookup(var.worker_groups[count.index], "tags", local.workers_group_defaults["tags"]) : tag["key"]], tag_key)
|
||||
],
|
||||
lookup(
|
||||
var.worker_groups[count.index],
|
||||
@@ -194,7 +194,7 @@ resource "aws_launch_configuration" "workers" {
|
||||
ebs_optimized = lookup(
|
||||
var.worker_groups[count.index],
|
||||
"ebs_optimized",
|
||||
! contains(
|
||||
!contains(
|
||||
local.ebs_optimized_not_supported,
|
||||
lookup(
|
||||
var.worker_groups[count.index],
|
||||
|
||||
@@ -93,7 +93,7 @@ resource "aws_autoscaling_group" "workers_launch_template" {
|
||||
local.workers_group_defaults["health_check_grace_period"]
|
||||
)
|
||||
|
||||
dynamic mixed_instances_policy {
|
||||
dynamic "mixed_instances_policy" {
|
||||
iterator = item
|
||||
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]) : []
|
||||
|
||||
@@ -157,7 +157,7 @@ resource "aws_autoscaling_group" "workers_launch_template" {
|
||||
}
|
||||
}
|
||||
|
||||
dynamic launch_template {
|
||||
dynamic "launch_template" {
|
||||
iterator = item
|
||||
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])
|
||||
|
||||
@@ -209,7 +209,7 @@ resource "aws_autoscaling_group" "workers_launch_template" {
|
||||
"value", tag_value,
|
||||
"propagate_at_launch", "true"
|
||||
)
|
||||
if tag_key != "Name" && ! contains([for tag in lookup(var.worker_groups_launch_template[count.index], "tags", local.workers_group_defaults["tags"]) : tag["key"]], tag_key)
|
||||
if tag_key != "Name" && !contains([for tag in lookup(var.worker_groups_launch_template[count.index], "tags", local.workers_group_defaults["tags"]) : tag["key"]], tag_key)
|
||||
],
|
||||
lookup(
|
||||
var.worker_groups_launch_template[count.index],
|
||||
@@ -289,7 +289,7 @@ resource "aws_launch_template" "workers_launch_template" {
|
||||
ebs_optimized = lookup(
|
||||
var.worker_groups_launch_template[count.index],
|
||||
"ebs_optimized",
|
||||
! contains(
|
||||
!contains(
|
||||
local.ebs_optimized_not_supported,
|
||||
lookup(
|
||||
var.worker_groups_launch_template[count.index],
|
||||
@@ -336,7 +336,7 @@ resource "aws_launch_template" "workers_launch_template" {
|
||||
)
|
||||
}
|
||||
|
||||
dynamic placement {
|
||||
dynamic "placement" {
|
||||
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"])] : []
|
||||
|
||||
content {
|
||||
@@ -349,7 +349,7 @@ resource "aws_launch_template" "workers_launch_template" {
|
||||
}
|
||||
}
|
||||
|
||||
dynamic instance_market_options {
|
||||
dynamic "instance_market_options" {
|
||||
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))
|
||||
content {
|
||||
market_type = instance_market_options.value
|
||||
@@ -458,7 +458,7 @@ resource "aws_launch_template" "workers_launch_template" {
|
||||
},
|
||||
{ for tag_key, tag_value in var.tags :
|
||||
tag_key => tag_value
|
||||
if tag_key != "Name" && ! contains([for tag in lookup(var.worker_groups_launch_template[count.index], "tags", local.workers_group_defaults["tags"]) : tag["key"]], tag_key)
|
||||
if tag_key != "Name" && !contains([for tag in lookup(var.worker_groups_launch_template[count.index], "tags", local.workers_group_defaults["tags"]) : tag["key"]], tag_key)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user