From a12846d9af484fb32d7e6f4808ff7db4f6d50cb4 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Wed, 5 Oct 2022 14:59:55 -0400 Subject: [PATCH] refact(enos): Increase clarity in module variable name This variable defines the IP address of a target used in tests. We should pass in the address itself instead of a list of addresses that will get converted to a single address eventually anyways. --- enos/enos-scenario-e2e-credential-vault.hcl | 2 +- enos/enos-scenario-e2e-host-static.hcl | 2 +- enos/modules/test_e2e/main.tf | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/enos/enos-scenario-e2e-credential-vault.hcl b/enos/enos-scenario-e2e-credential-vault.hcl index 9e52c3e013..12806e1a62 100644 --- a/enos/enos-scenario-e2e-credential-vault.hcl +++ b/enos/enos-scenario-e2e-credential-vault.hcl @@ -131,7 +131,7 @@ scenario "e2e_credential_vault" { auth_password = step.create_boundary_cluster.auth_password local_boundary_dir = local.local_boundary_dir aws_ssh_private_key_path = local.aws_ssh_private_key_path - target_ips = step.create_target.target_ips + target_ip = step.create_target.target_ips[0] target_user = "ubuntu" vault_addr = step.create_vault_cluster.instance_public_ips[0] vault_root_token = step.create_vault_cluster.vault_root_token diff --git a/enos/enos-scenario-e2e-host-static.hcl b/enos/enos-scenario-e2e-host-static.hcl index a5e0ff5d91..77db938c24 100644 --- a/enos/enos-scenario-e2e-host-static.hcl +++ b/enos/enos-scenario-e2e-host-static.hcl @@ -108,7 +108,7 @@ scenario "e2e_host_static" { auth_password = step.create_boundary_cluster.auth_password local_boundary_dir = local.local_boundary_dir aws_ssh_private_key_path = local.aws_ssh_private_key_path - target_ips = step.create_target.target_ips + target_ip = step.create_target.target_ips[0] target_user = "ubuntu" } } diff --git a/enos/modules/test_e2e/main.tf b/enos/modules/test_e2e/main.tf index dcfe0fb220..e5bb23be93 100644 --- a/enos/modules/test_e2e/main.tf +++ b/enos/modules/test_e2e/main.tf @@ -38,10 +38,10 @@ variable "aws_ssh_private_key_path" { description = "Local Path to key used to SSH onto created hosts" type = string } -variable "target_ips" { - description = "List of IP Addresses of created hosts" - type = list(string) - default = [""] +variable "target_ip" { + description = "IP address of target" + type = string + default = "" } variable "vault_addr" { description = "URL of Vault instance" @@ -101,7 +101,7 @@ resource "enos_local_exec" "run_e2e_test" { E2E_PASSWORD_AUTH_METHOD_ID = var.auth_method_id, E2E_PASSWORD_ADMIN_LOGIN_NAME = var.auth_login_name, E2E_PASSWORD_ADMIN_PASSWORD = var.auth_password, - E2E_TARGET_IP = var.target_ips[0], + E2E_TARGET_IP = var.target_ip, E2E_SSH_USER = var.target_user, E2E_SSH_KEY_PATH = local.aws_ssh_private_key_path, VAULT_ADDR = local.vault_addr,