diff --git a/README.md b/README.md index d3e6b73..8e1f7ef 100644 --- a/README.md +++ b/README.md @@ -231,13 +231,13 @@ Note: the default behavior of the module is to create an autoscaling group and l | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.46 | +| [aws](#requirement\_aws) | >= 5.55 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.46 | +| [aws](#provider\_aws) | >= 5.55 | ## Modules diff --git a/examples/complete/README.md b/examples/complete/README.md index 787ec1a..c058d3c 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -30,13 +30,13 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.46 | +| [aws](#requirement\_aws) | >= 5.55 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.46 | +| [aws](#provider\_aws) | >= 5.55 | ## Modules diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 42af079..135f134 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -490,8 +490,9 @@ module "instance_requirements" { override = [ { instance_requirements = { - cpu_manufacturers = ["amd"] - local_storage_types = ["ssd"] + cpu_manufacturers = ["amd"] + local_storage_types = ["ssd"] + max_spot_price_as_percentage_of_optimal_on_demand_price = 60 memory_gib_per_vcpu = { min = 2 max = 4 @@ -527,6 +528,8 @@ module "instance_requirements" { instance_generations = ["current"] local_storage_types = ["ssd", "hdd"] + max_spot_price_as_percentage_of_optimal_on_demand_price = 45 + memory_gib_per_vcpu = { min = 4 max = 16 diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf index e1ed610..3617131 100644 --- a/examples/complete/versions.tf +++ b/examples/complete/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.46" + version = ">= 5.55" } } } diff --git a/main.tf b/main.tf index 888b719..824f8ee 100644 --- a/main.tf +++ b/main.tf @@ -190,12 +190,13 @@ resource "aws_launch_template" "this" { } } - burstable_performance = try(instance_requirements.value.burstable_performance, null) - cpu_manufacturers = try(instance_requirements.value.cpu_manufacturers, []) - excluded_instance_types = try(instance_requirements.value.excluded_instance_types, null) - instance_generations = try(instance_requirements.value.instance_generations, []) - local_storage = try(instance_requirements.value.local_storage, null) - local_storage_types = try(instance_requirements.value.local_storage_types, []) + burstable_performance = try(instance_requirements.value.burstable_performance, null) + cpu_manufacturers = try(instance_requirements.value.cpu_manufacturers, []) + excluded_instance_types = try(instance_requirements.value.excluded_instance_types, null) + instance_generations = try(instance_requirements.value.instance_generations, []) + local_storage = try(instance_requirements.value.local_storage, null) + local_storage_types = try(instance_requirements.value.local_storage_types, []) + max_spot_price_as_percentage_of_optimal_on_demand_price = try(instance_requirements.value.max_spot_price_as_percentage_of_optimal_on_demand_price, null) dynamic "memory_gib_per_vcpu" { for_each = try([instance_requirements.value.memory_gib_per_vcpu], []) @@ -506,12 +507,13 @@ resource "aws_autoscaling_group" "this" { } } - burstable_performance = try(instance_requirements.value.burstable_performance, null) - cpu_manufacturers = try(instance_requirements.value.cpu_manufacturers, null) - excluded_instance_types = try(instance_requirements.value.excluded_instance_types, null) - instance_generations = try(instance_requirements.value.instance_generations, null) - local_storage = try(instance_requirements.value.local_storage, null) - local_storage_types = try(instance_requirements.value.local_storage_types, null) + burstable_performance = try(instance_requirements.value.burstable_performance, null) + cpu_manufacturers = try(instance_requirements.value.cpu_manufacturers, null) + excluded_instance_types = try(instance_requirements.value.excluded_instance_types, null) + instance_generations = try(instance_requirements.value.instance_generations, null) + local_storage = try(instance_requirements.value.local_storage, null) + local_storage_types = try(instance_requirements.value.local_storage_types, null) + max_spot_price_as_percentage_of_optimal_on_demand_price = try(instance_requirements.value.max_spot_price_as_percentage_of_optimal_on_demand_price, null) dynamic "memory_gib_per_vcpu" { for_each = try([instance_requirements.value.memory_gib_per_vcpu], []) @@ -795,12 +797,13 @@ resource "aws_autoscaling_group" "idc" { } } - burstable_performance = try(instance_requirements.value.burstable_performance, null) - cpu_manufacturers = try(instance_requirements.value.cpu_manufacturers, null) - excluded_instance_types = try(instance_requirements.value.excluded_instance_types, null) - instance_generations = try(instance_requirements.value.instance_generations, null) - local_storage = try(instance_requirements.value.local_storage, null) - local_storage_types = try(instance_requirements.value.local_storage_types, null) + burstable_performance = try(instance_requirements.value.burstable_performance, null) + cpu_manufacturers = try(instance_requirements.value.cpu_manufacturers, null) + excluded_instance_types = try(instance_requirements.value.excluded_instance_types, null) + instance_generations = try(instance_requirements.value.instance_generations, null) + local_storage = try(instance_requirements.value.local_storage, null) + local_storage_types = try(instance_requirements.value.local_storage_types, null) + max_spot_price_as_percentage_of_optimal_on_demand_price = try(instance_requirements.value.max_spot_price_as_percentage_of_optimal_on_demand_price, null) dynamic "memory_gib_per_vcpu" { for_each = try([instance_requirements.value.memory_gib_per_vcpu], []) diff --git a/versions.tf b/versions.tf index e1ed610..3617131 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.46" + version = ">= 5.55" } } }