diff --git a/CHANGELOG.md b/CHANGELOG.md index 32c0dba..5c188bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +## [7.5.0](https://github.com/terraform-aws-modules/terraform-aws-autoscaling/compare/v7.4.1...v7.5.0) (2024-05-28) + + +### Features + +* Add `allowed_instance_types` to `instance_requirements` ([#267](https://github.com/terraform-aws-modules/terraform-aws-autoscaling/issues/267)) ([09d8e0f](https://github.com/terraform-aws-modules/terraform-aws-autoscaling/commit/09d8e0fcd4536bd05208ad9226076bccf9b6178a)), closes [#265](https://github.com/terraform-aws-modules/terraform-aws-autoscaling/issues/265) + ## [7.4.1](https://github.com/terraform-aws-modules/terraform-aws-autoscaling/compare/v7.4.0...v7.4.1) (2024-03-07) diff --git a/README.md b/README.md index 811c5c1..8c9be96 100644 --- a/README.md +++ b/README.md @@ -392,6 +392,9 @@ No modules. | [launch\_template\_name](#output\_launch\_template\_name) | The name of the launch template | +## Notes +- A refresh will not start if `launch_template_version` is set to `$Latest` when using an external launch template. To trigger the refresh when the external launch template is changed, set this to `latest_version` of that `aws_launch_template resource`. + ## Authors Module is maintained by [Anton Babenko](https://github.com/antonbabenko) with help from [these awesome contributors](https://github.com/terraform-aws-modules/terraform-aws-autoscaling/graphs/contributors). diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 39fd13f..42af079 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -512,14 +512,17 @@ module "instance_requirements" { accelerator_manufacturers = [] accelerator_names = [] accelerator_types = [] + # If you specify allowed_instance_types, you can't specify excluded_instance_types + # allowed_instance_types = ["m*"] baseline_ebs_bandwidth_mbps = { min = 400 max = 1600 } - burstable_performance = "excluded" - cpu_manufacturers = ["amazon-web-services", "amd", "intel"] + burstable_performance = "excluded" + cpu_manufacturers = ["amazon-web-services", "amd", "intel"] + # If you specify excluded_instance_types, you can't specify allowed_instance_types excluded_instance_types = ["t*"] instance_generations = ["current"] local_storage_types = ["ssd", "hdd"] diff --git a/main.tf b/main.tf index d94ba04..888b719 100644 --- a/main.tf +++ b/main.tf @@ -178,8 +178,9 @@ resource "aws_launch_template" "this" { } } - accelerator_types = try(instance_requirements.value.accelerator_types, []) - bare_metal = try(instance_requirements.value.bare_metal, null) + accelerator_types = try(instance_requirements.value.accelerator_types, []) + allowed_instance_types = try(instance_requirements.value.allowed_instance_types, null) + bare_metal = try(instance_requirements.value.bare_metal, null) dynamic "baseline_ebs_bandwidth_mbps" { for_each = try([instance_requirements.value.baseline_ebs_bandwidth_mbps], []) @@ -191,7 +192,7 @@ 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, []) + 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, [])