Skip to content

Commit

Permalink
fix: The block_duration_minutes attribute under launch template `sp…
Browse files Browse the repository at this point in the history
…ot_options` is not a required (#1847)
  • Loading branch information
bryantbiggs authored Feb 4, 2022
1 parent 2f01a36 commit ccc4747
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ module "eks_managed_node_group" {

vpc_id = module.vpc.vpc_id
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" })
}
Expand Down
2 changes: 1 addition & 1 deletion modules/eks-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ resource "aws_launch_template" "this" {
dynamic "spot_options" {
for_each = lookup(instance_market_options.value, "spot_options", null) != null ? [instance_market_options.value.spot_options] : []
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)
max_price = lookup(spot_options.value, "max_price", null)
spot_instance_type = lookup(spot_options.value, "spot_instance_type", null)
Expand Down
2 changes: 1 addition & 1 deletion modules/self-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ resource "aws_launch_template" "this" {
dynamic "spot_options" {
for_each = lookup(instance_market_options.value, "spot_options", null) != null ? [instance_market_options.value.spot_options] : []
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)
max_price = lookup(spot_options.value, "max_price", null)
spot_instance_type = lookup(spot_options.value, "spot_instance_type", null)
Expand Down

0 comments on commit ccc4747

Please sign in to comment.