diff --git a/README.md b/README.md index fa565c847d..90b5eb44b2 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a | Name | Version | |------|---------| | terraform | >= 0.12.9 | -| aws | >= 2.52.0 | +| aws | >= 2.55.0 | | kubernetes | >= 1.11.1 | | local | >= 1.4 | | null | >= 2.1 | @@ -146,7 +146,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a | Name | Version | |------|---------| -| aws | >= 2.52.0 | +| aws | >= 2.55.0 | | kubernetes | >= 1.11.1 | | local | >= 1.4 | | null | >= 2.1 | diff --git a/local.tf b/local.tf index febf6f742d..b4d8a729ab 100644 --- a/local.tf +++ b/local.tf @@ -75,15 +75,18 @@ locals { platform = "linux" # Platform of workers. either "linux" or "windows" additional_ebs_volumes = [] # A list of additional volumes to be attached to the instances on this Auto Scaling group. Each volume should be an object with the following: block_device_name (required), volume_size, volume_type, iops, encrypted, kms_key_id (only on launch-template), delete_on_termination. Optional values are grabbed from root volume or from defaults # Settings for launch templates - root_block_device_name = data.aws_ami.eks_worker.root_device_name # Root device name for workers. If non is provided, will assume default AMI was used. - root_kms_key_id = "" # The KMS key to use when encrypting the root storage device - launch_template_version = "$Latest" # The lastest version of the launch template to use in the autoscaling group - launch_template_placement_tenancy = "default" # The placement tenancy for instances - launch_template_placement_group = null # The name of the placement group into which to launch the instances, if any. - root_encrypted = false # Whether the volume should be encrypted or not - eni_delete = true # Delete the Elastic Network Interface (ENI) on termination (if set to false you will have to manually delete before destroying) - cpu_credits = "standard" # T2/T3 unlimited mode, can be 'standard' or 'unlimited'. Used 'standard' mode as default to avoid paying higher costs - market_type = null + root_block_device_name = data.aws_ami.eks_worker.root_device_name # Root device name for workers. If non is provided, will assume default AMI was used. + root_kms_key_id = "" # The KMS key to use when encrypting the root storage device + launch_template_version = "$Latest" # The lastest version of the launch template to use in the autoscaling group + launch_template_placement_tenancy = "default" # The placement tenancy for instances + launch_template_placement_group = null # The name of the placement group into which to launch the instances, if any. + root_encrypted = false # Whether the volume should be encrypted or not + eni_delete = true # Delete the Elastic Network Interface (ENI) on termination (if set to false you will have to manually delete before destroying) + cpu_credits = "standard" # T2/T3 unlimited mode, can be 'standard' or 'unlimited'. Used 'standard' mode as default to avoid paying higher costs + market_type = null + metadata_http_endpoint = "enabled" # The state of the metadata service: enabled, disabled. + metadata_http_tokens = "optional" # If session tokens are required: optional, required. + metadata_http_put_response_hop_limit = null # The desired HTTP PUT response hop limit for instance metadata requests. # Settings for launch templates with mixed instances policy override_instance_types = ["m5.large", "m5a.large", "m5d.large", "m5ad.large"] # A list of override instance types for mixed instances policy on_demand_allocation_strategy = null # Strategy to use when launching on-demand instances. Valid values: prioritized. diff --git a/versions.tf b/versions.tf index 64f92a5d23..f87acd8e5b 100644 --- a/versions.tf +++ b/versions.tf @@ -2,7 +2,7 @@ terraform { required_version = ">= 0.12.9" required_providers { - aws = ">= 2.52.0" + aws = ">= 2.55.0" local = ">= 1.4" null = ">= 2.1" template = ">= 2.1" diff --git a/workers_launch_template.tf b/workers_launch_template.tf index 2e0bd9759d..e0eb9e6ef8 100644 --- a/workers_launch_template.tf +++ b/workers_launch_template.tf @@ -278,6 +278,24 @@ resource "aws_launch_template" "workers_launch_template" { ) ) + metadata_options { + http_endpoint = lookup( + var.worker_groups_launch_template[count.index], + "metadata_http_endpoint", + local.workers_group_defaults["metadata_http_endpoint"], + ) + http_tokens = lookup( + var.worker_groups_launch_template[count.index], + "metadata_http_tokens", + local.workers_group_defaults["metadata_http_tokens"], + ) + http_put_response_hop_limit = lookup( + var.worker_groups_launch_template[count.index], + "metadata_http_put_response_hop_limit", + local.workers_group_defaults["metadata_http_put_response_hop_limit"], + ) + } + credit_specification { cpu_credits = lookup( var.worker_groups_launch_template[count.index],