From c26f01141abd8d2443d6aae622e71ccd6d8e2acc Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 17 Dec 2025 16:07:05 -0500 Subject: [PATCH] update e2e_database scenario --- enos/enos-scenario-e2e-database.hcl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/enos/enos-scenario-e2e-database.hcl b/enos/enos-scenario-e2e-database.hcl index a71adf6975..3efb18fc79 100644 --- a/enos/enos-scenario-e2e-database.hcl +++ b/enos/enos-scenario-e2e-database.hcl @@ -10,7 +10,6 @@ scenario "e2e_database" { ] locals { - aws_ssh_private_key_path = abspath(var.aws_ssh_private_key_path) local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic")) @@ -31,6 +30,14 @@ scenario "e2e_database" { } } + step "generate_ssh_key" { + module = module.aws_ssh_keypair + + variables { + enos_user = var.enos_user + } + } + step "find_azs" { module = module.aws_az_finder @@ -76,11 +83,12 @@ scenario "e2e_database" { step "create_targets_with_tag" { module = module.aws_target - depends_on = [step.create_base_infra] + depends_on = [step.create_base_infra, step.generate_ssh_key] variables { ami_id = step.create_base_infra.ami_ids["ubuntu"]["amd64"] - aws_ssh_keypair_name = var.aws_ssh_keypair_name + ssh_aws_keypair = step.generate_ssh_key.key_pair_name + ssh_private_key = step.generate_ssh_key.private_key_pem enos_user = var.enos_user instance_type = var.target_instance_type vpc_id = step.create_base_infra.vpc_id @@ -114,7 +122,8 @@ scenario "e2e_database" { module = module.test_e2e depends_on = [ step.create_targets_with_tag, - step.iam_setup + step.iam_setup, + step.generate_ssh_key ] variables { @@ -123,7 +132,7 @@ scenario "e2e_database" { boundary_license = var.boundary_edition != "oss" ? step.read_license.license : "" local_boundary_dir = local.local_boundary_dir target_user = "ubuntu" - aws_ssh_private_key_path = local.aws_ssh_private_key_path + aws_ssh_private_key_path = step.generate_ssh_key.private_key_path aws_access_key_id = step.iam_setup.access_key_id aws_secret_access_key = step.iam_setup.secret_access_key aws_host_set_filter1 = step.create_tag_inputs.tag_string