Skip to content

Commit ec2da8e

Browse files
committed
refactor.
1 parent be2fd9b commit ec2da8e

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

infra-iac/terraform/main.tf

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,13 @@ resource "aws_launch_template" "server" {
416416
name = aws_iam_instance_profile.ec2_instance_profile.name
417417
}
418418

419+
metadata_options {
420+
http_endpoint = "enabled"
421+
http_tokens = "required"
422+
http_put_response_hop_limit = 1
423+
instance_metadata_tags = "enabled"
424+
}
425+
419426
block_device_mappings {
420427
device_name = "/dev/sda1"
421428

@@ -552,7 +559,7 @@ resource "aws_launch_template" "client" {
552559

553560
metadata_options {
554561
http_endpoint = "enabled"
555-
http_tokens = "optional"
562+
http_tokens = "required"
556563
http_put_response_hop_limit = 1
557564
instance_metadata_tags = "enabled"
558565
}
@@ -992,6 +999,13 @@ resource "aws_launch_template" "api" {
992999
name = aws_iam_instance_profile.ec2_instance_profile.name
9931000
}
9941001

1002+
metadata_options {
1003+
http_endpoint = "enabled"
1004+
http_tokens = "required"
1005+
http_put_response_hop_limit = 1
1006+
instance_metadata_tags = "enabled"
1007+
}
1008+
9951009
block_device_mappings {
9961010
device_name = "/dev/sda1"
9971011

@@ -1145,6 +1159,13 @@ resource "aws_launch_template" "build" {
11451159
name = aws_iam_instance_profile.ec2_instance_profile.name
11461160
}
11471161

1162+
metadata_options {
1163+
http_endpoint = "enabled"
1164+
http_tokens = "required"
1165+
http_put_response_hop_limit = 1
1166+
instance_metadata_tags = "enabled"
1167+
}
1168+
11481169
block_device_mappings {
11491170
device_name = "/dev/sda1"
11501171

0 commit comments

Comments
 (0)