chore: updated ec2 configurations to require imdsv2

pull/6005/head
Pradeep Sekar 7 months ago
parent bd4dd9808a
commit e0ef9be90f

@ -66,6 +66,8 @@ following lines
127.0.0.1 localhost worker
127.0.0.1 localhost vault
```
### AWS Credentials
Copy the AWS Account credentials from doormat and set it in the terminal, where the enos commands are run.
## Executing Scenarios
From the `enos` directory:

@ -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]}",

@ -281,6 +281,7 @@ resource "aws_instance" "domain_controller" {
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true

@ -207,6 +207,7 @@ ${var.domain_admin_password}
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true

@ -222,6 +222,7 @@ ${var.domain_admin_password}
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true

@ -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" {

@ -247,6 +247,7 @@ resource "aws_instance" "client" {
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true

@ -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" {

Loading…
Cancel
Save