From 9703c7448dd1298d6ec91d8cabe138e270a34289 Mon Sep 17 00:00:00 2001 From: Fan Ting Wei Date: Fri, 24 Nov 2023 15:54:53 +0800 Subject: [PATCH] add metadata_options --- modules/nomad-cluster/main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/nomad-cluster/main.tf b/modules/nomad-cluster/main.tf index 9212d4f9..a7edf692 100644 --- a/modules/nomad-cluster/main.tf +++ b/modules/nomad-cluster/main.tf @@ -76,6 +76,12 @@ resource "aws_launch_configuration" "launch_configuration" { spot_price = var.spot_price user_data = var.user_data + metadata_options { + http_endpoint = "enabled" + http_tokens = "required" + http_put_response_hop_limit = 3 + } + iam_instance_profile = aws_iam_instance_profile.instance_profile.name key_name = var.ssh_key_name