test(e2e): Differentiate between public and private vault addresses (#5553)

This commit is contained in:
Michael Li authored and GitHub committed 2025-02-20 10:27:43 -05:00
1 parent 99f4bc092f
commit 14808d197f
15 files changed
+56 -49

No files matched your search

+8 -13
View File
@@ -66,13 +66,14 @@ variable "target_port" {
type = string
default = ""
}
variable "vault_addr" {
description = "External network address of Vault. Will be converted to a URL below"
variable "vault_addr_public" {
description = "Public address to a vault instance"
type = string
default = ""
}
variable "vault_addr_internal" {
description = "Internal network address of Vault (i.e. within a docker network). Will be converted to a URL below"
variable "vault_addr_private" {
description = "Private address to a vault instance"
type = string
default = ""
}
@@ -81,11 +82,6 @@ variable "vault_root_token" {
type = string
default = ""
}
variable "vault_port" {
description = "External Port that vault instance is attached to (outside of docker network)"
type = string
default = "8200"
}
variable "aws_access_key_id" {
description = "Access Key Id for AWS IAM user used in dynamic host catalogs"
type = string
@@ -174,8 +170,6 @@ variable "ip_version" {
locals {
aws_ssh_private_key_path = abspath(var.aws_ssh_private_key_path)
vault_addr = var.vault_addr != "" ? "http://${var.vault_addr}:${var.vault_port}" : ""
vault_addr_internal = var.vault_addr_internal != "" ? "http://${var.vault_addr_internal}:8200" : local.vault_addr
aws_host_set_ips1 = jsonencode(var.aws_host_set_ips1)
aws_host_set_ips2 = jsonencode(var.aws_host_set_ips2)
package_name = reverse(split("/", var.test_package))[0]
@@ -194,9 +188,10 @@ resource "enos_local_exec" "run_e2e_test" {
E2E_SSH_USER = var.target_user
E2E_SSH_KEY_PATH = local.aws_ssh_private_key_path
E2E_SSH_CA_KEY = ""
VAULT_ADDR = local.vault_addr
VAULT_ADDR = var.vault_addr_public
VAULT_TOKEN = var.vault_root_token
E2E_VAULT_ADDR = local.vault_addr_internal
E2E_VAULT_ADDR_PUBLIC = var.vault_addr_public
E2E_VAULT_ADDR_PRIVATE = var.vault_addr_private
E2E_AWS_ACCESS_KEY_ID = var.aws_access_key_id
E2E_AWS_SECRET_ACCESS_KEY = var.aws_secret_access_key
E2E_AWS_HOST_SET_FILTER = var.aws_host_set_filter1