From 486e70048f898b4abdc579aa2e73a72f864325a9 Mon Sep 17 00:00:00 2001 From: "waqas.yousaf" Date: Thu, 2 May 2024 13:58:28 +0200 Subject: [PATCH 1/2] OPS-5920: Enable MetaData V2 --- modules/consul-cluster/main.tf | 4 ++++ modules/vault-cluster/main.tf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/modules/consul-cluster/main.tf b/modules/consul-cluster/main.tf index af3e8cf..dd823e3 100644 --- a/modules/consul-cluster/main.tf +++ b/modules/consul-cluster/main.tf @@ -53,6 +53,10 @@ resource "aws_launch_configuration" "launch_configuration" { iam_instance_profile = aws_iam_instance_profile.instance_profile.name placement_tenancy = var.tenancy + metadata_options { + http_tokens = "required" + } + security_groups = [ module.lc_security_group.security_group_id, module.attach_security_group.security_group_id, diff --git a/modules/vault-cluster/main.tf b/modules/vault-cluster/main.tf index 064f430..9842fc4 100644 --- a/modules/vault-cluster/main.tf +++ b/modules/vault-cluster/main.tf @@ -53,6 +53,10 @@ resource "aws_launch_configuration" "launch_configuration" { module.attach_security_group.security_group_id, ] + metadata_options { + http_tokens = "required" + } + associate_public_ip_address = false ebs_optimized = var.root_volume_ebs_optimized From 92b9e9607eb7a4c2d7897c5db8f76eb6ea434811 Mon Sep 17 00:00:00 2001 From: "waqas.yousaf" Date: Thu, 2 May 2024 15:12:04 +0200 Subject: [PATCH 2/2] OPS-5920: lint fix --- modules/consul-cluster/main.tf | 2 +- modules/vault-cluster/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/consul-cluster/main.tf b/modules/consul-cluster/main.tf index dd823e3..000489d 100644 --- a/modules/consul-cluster/main.tf +++ b/modules/consul-cluster/main.tf @@ -56,7 +56,7 @@ resource "aws_launch_configuration" "launch_configuration" { metadata_options { http_tokens = "required" } - + security_groups = [ module.lc_security_group.security_group_id, module.attach_security_group.security_group_id, diff --git a/modules/vault-cluster/main.tf b/modules/vault-cluster/main.tf index 9842fc4..bdaad21 100644 --- a/modules/vault-cluster/main.tf +++ b/modules/vault-cluster/main.tf @@ -56,7 +56,7 @@ resource "aws_launch_configuration" "launch_configuration" { metadata_options { http_tokens = "required" } - + associate_public_ip_address = false ebs_optimized = var.root_volume_ebs_optimized