chore(e2e): Remove aws_ssh_keypair requirement (#6583)

* chore(e2e): Remove ssh key pair variable requirement

* CR

---------

Co-authored-by: Tony <wongtonyb@gmail.com>
This commit is contained in:
Michael LiandTony authored and GitHub committed 2026-04-16 13:42:08 -04:00
1 parent 0d4ff79f0b
commit f735676657
32 files changed
+627 -275

No files matched your search

+16 -6
View File
@@ -150,7 +150,7 @@ resource "aws_instance" "worker" {
instance_type = var.worker_instance_type
vpc_security_group_ids = [aws_security_group.default.id]
subnet_id = var.create_subnet ? aws_subnet.default[0].id : var.subnet_ids[0]
key_name = var.ssh_aws_keypair
key_name = var.aws_ssh_keypair_name
iam_instance_profile = aws_iam_instance_profile.boundary_profile.name
monitoring = var.worker_monitoring
@@ -188,7 +188,9 @@ resource "enos_bundle_install" "worker" {
transport = {
ssh = {
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
user = "ubuntu"
private_key_path = abspath(var.aws_ssh_private_key_path)
}
}
}
@@ -204,7 +206,9 @@ resource "enos_remote_exec" "update_path_worker" {
transport = {
ssh = {
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
user = "ubuntu"
private_key_path = abspath(var.aws_ssh_private_key_path)
}
}
}
@@ -234,7 +238,9 @@ resource "enos_file" "worker_config" {
transport = {
ssh = {
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
user = "ubuntu"
private_key_path = abspath(var.aws_ssh_private_key_path)
}
}
}
@@ -250,7 +256,9 @@ resource "enos_boundary_start" "worker_start" {
recording_storage_path = var.recording_storage_path != "" ? var.recording_storage_path : null
transport = {
ssh = {
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
user = "ubuntu"
private_key_path = abspath(var.aws_ssh_private_key_path)
}
}
}
@@ -269,7 +277,9 @@ resource "enos_remote_exec" "create_worker_audit_log_dir" {
transport = {
ssh = {
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
host = var.ip_version == "6" ? aws_instance.worker.ipv6_addresses[0] : aws_instance.worker.public_ip
user = "ubuntu"
private_key_path = abspath(var.aws_ssh_private_key_path)
}
}
}
+8 -2
View File
@@ -34,11 +34,17 @@ variable "worker_instance_type" {
default = "t2.small"
}
variable "ssh_aws_keypair" {
description = "The name of the SSH keypair used to connect to EC2 instances"
variable "aws_ssh_keypair_name" {
description = "SSH keypair used to connect to EC2 instances"
type = string
}
variable "aws_ssh_private_key_path" {
description = "SSH private key path for connecting to instances"
type = string
sensitive = true
}
variable "worker_monitoring" {
description = "Enable detailed monitoring for workers"
type = bool