mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-17 17:22:13 +01:00
fix: The block_duration_minutes attribute under launch template spot_options is not a required (#1847)
This commit is contained in:
@@ -192,6 +192,10 @@ module "eks_managed_node_group" {
|
|||||||
|
|
||||||
vpc_id = module.vpc.vpc_id
|
vpc_id = module.vpc.vpc_id
|
||||||
subnet_ids = module.vpc.private_subnets
|
subnet_ids = module.vpc.private_subnets
|
||||||
|
vpc_security_group_ids = [
|
||||||
|
module.eks.cluster_primary_security_group_id,
|
||||||
|
module.eks.cluster_security_group_id,
|
||||||
|
]
|
||||||
|
|
||||||
tags = merge(local.tags, { Separate = "eks-managed-node-group" })
|
tags = merge(local.tags, { Separate = "eks-managed-node-group" })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ resource "aws_launch_template" "this" {
|
|||||||
dynamic "spot_options" {
|
dynamic "spot_options" {
|
||||||
for_each = lookup(instance_market_options.value, "spot_options", null) != null ? [instance_market_options.value.spot_options] : []
|
for_each = lookup(instance_market_options.value, "spot_options", null) != null ? [instance_market_options.value.spot_options] : []
|
||||||
content {
|
content {
|
||||||
block_duration_minutes = spot_options.value.block_duration_minutes
|
block_duration_minutes = lookup(spot_options.value, "block_duration_minutes", null)
|
||||||
instance_interruption_behavior = lookup(spot_options.value, "instance_interruption_behavior", null)
|
instance_interruption_behavior = lookup(spot_options.value, "instance_interruption_behavior", null)
|
||||||
max_price = lookup(spot_options.value, "max_price", null)
|
max_price = lookup(spot_options.value, "max_price", null)
|
||||||
spot_instance_type = lookup(spot_options.value, "spot_instance_type", null)
|
spot_instance_type = lookup(spot_options.value, "spot_instance_type", null)
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ resource "aws_launch_template" "this" {
|
|||||||
dynamic "spot_options" {
|
dynamic "spot_options" {
|
||||||
for_each = lookup(instance_market_options.value, "spot_options", null) != null ? [instance_market_options.value.spot_options] : []
|
for_each = lookup(instance_market_options.value, "spot_options", null) != null ? [instance_market_options.value.spot_options] : []
|
||||||
content {
|
content {
|
||||||
block_duration_minutes = spot_options.value.block_duration_minutes
|
block_duration_minutes = lookup(spot_options.value, block_duration_minutes, null)
|
||||||
instance_interruption_behavior = lookup(spot_options.value, "instance_interruption_behavior", null)
|
instance_interruption_behavior = lookup(spot_options.value, "instance_interruption_behavior", null)
|
||||||
max_price = lookup(spot_options.value, "max_price", null)
|
max_price = lookup(spot_options.value, "max_price", null)
|
||||||
spot_instance_type = lookup(spot_options.value, "spot_instance_type", null)
|
spot_instance_type = lookup(spot_options.value, "spot_instance_type", null)
|
||||||
|
|||||||
Reference in New Issue
Block a user