chore: updated ec2 configurations to require imdsv2 (#6005)

This commit is contained in:
Pradeep Sekar authored and GitHub committed 2025-09-30 13:40:18 -04:00
1 parent 7ceedbc208
commit fac22dfc4a
9 files changed
+32 -1

No files matched your search

@@ -26,6 +26,11 @@ resource "aws_instance" "controller" {
encrypted = true
}
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
}
tags = merge(local.common_tags,
{
Name = "${local.name_prefix}-boundary-controller-${count.index}-${split(":", data.aws_caller_identity.current.user_id)[1]}"
@@ -54,6 +59,11 @@ resource "aws_instance" "worker" {
encrypted = true
}
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
}
tags = merge(local.common_tags,
{
Name = "${local.name_prefix}-boundary-worker-${count.index}-${split(":", data.aws_caller_identity.current.user_id)[1]}",
@@ -302,6 +302,7 @@ resource "aws_instance" "domain_controller" {
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true
@@ -234,6 +234,7 @@ ${var.domain_admin_password}
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true
@@ -251,6 +251,7 @@ ${var.domain_admin_password}
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true
+6 -1
View File
@@ -126,13 +126,18 @@ resource "aws_instance" "target" {
"Type" : "target",
"Project" : "Enos",
"Project Name" : "qti-enos-boundary",
"Environment" : var.environment
"Environment" : var.environment,
"Enos User" : var.enos_user,
})
root_block_device {
encrypted = true
}
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
}
}
resource "enos_remote_exec" "wait" {
@@ -17,6 +17,11 @@ resource "aws_instance" "vault_instance" {
Type = local.vault_cluster_tag
},
)
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
}
}
resource "enos_remote_exec" "install_dependencies" {
+1
View File
@@ -253,6 +253,7 @@ resource "aws_instance" "client" {
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true
+5
View File
@@ -161,6 +161,11 @@ resource "aws_instance" "worker" {
Name = "${var.name_prefix}-boundary-worker-${split(":", data.aws_caller_identity.current.user_id)[1]}",
},
)
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
}
}
resource "enos_bundle_install" "worker" {