From 486e70048f898b4abdc579aa2e73a72f864325a9 Mon Sep 17 00:00:00 2001 From: "waqas.yousaf" Date: Thu, 2 May 2024 13:58:28 +0200 Subject: [PATCH] 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