From df309a81ace553164cb44bf8d14f1c5601c60dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Stru=C3=9F?= <31846129+applike-ss@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:42:18 +0200 Subject: [PATCH] feat: added IMDSv2 as default for EC2 instances (#63) ## Description ## Motivation and Context ## Breaking Changes ## How Has This Been Tested? - [ ] I have updated at least one of the `examples/*` to demonstrate and validate my change(s) - [ ] I have tested and validated these changes using one or more of the provided `examples/*` projects - [ ] I have executed `pre-commit run -a` on my pull request --- README.md | 14 +++++++------- examples/cluster/versions.tf | 4 ++-- main.tf | 5 +++++ versions.tf | 6 +++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 9db7c7f..c5a005a 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,18 @@ Terraform module which creates an spotinst ocean ecs cluster | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3.0 | -| [aws](#requirement\_aws) | >= 4.67 | -| [spotinst](#requirement\_spotinst) | >= 1.87.1 | -| [tls](#requirement\_tls) | >= 4.0.4 | +| [aws](#requirement\_aws) | >= 5.52.0 | +| [spotinst](#requirement\_spotinst) | >= 1.175.0 | +| [tls](#requirement\_tls) | >= 4.0.5 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.67 | -| [aws.owner](#provider\_aws.owner) | >= 4.67 | -| [spotinst](#provider\_spotinst) | >= 1.87.1 | -| [tls](#provider\_tls) | >= 4.0.4 | +| [aws](#provider\_aws) | >= 5.52.0 | +| [aws.owner](#provider\_aws.owner) | >= 5.52.0 | +| [spotinst](#provider\_spotinst) | >= 1.175.0 | +| [tls](#provider\_tls) | >= 4.0.5 | ## Modules diff --git a/examples/cluster/versions.tf b/examples/cluster/versions.tf index 3757f56..a9ca3de 100644 --- a/examples/cluster/versions.tf +++ b/examples/cluster/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.67" + version = ">= 5.52.0" configuration_aliases = [ aws.owner, ] @@ -10,7 +10,7 @@ terraform { spotinst = { source = "spotinst/spotinst" - version = "1.140.0" + version = "1.175.0" } } diff --git a/main.tf b/main.tf index b074109..6d32f48 100644 --- a/main.tf +++ b/main.tf @@ -38,6 +38,11 @@ EOF draining_timeout = 300 ebs_optimized = true + instance_metadata_options { + http_tokens = "required" + http_put_response_hop_limit = 2 + } + autoscaler { is_enabled = true is_auto_config = local.is_auto_config diff --git a/versions.tf b/versions.tf index 5c8008b..aa27bd9 100644 --- a/versions.tf +++ b/versions.tf @@ -5,15 +5,15 @@ terraform { configuration_aliases = [ aws.owner, ] - version = ">= 4.67" + version = ">= 5.52.0" } spotinst = { source = "spotinst/spotinst" - version = ">= 1.87.1" + version = ">= 1.175.0" } tls = { source = "hashicorp/tls" - version = ">= 4.0.4" + version = ">= 4.0.5" } } required_version = ">= 1.3.0"