test(e2e): Provide public ca key to UI tests (#4478)
This commit is contained in:
1 parent
72d4f1142b
commit
ad6893e039
3 files changed
+20
-2
No files matched your search
@@ -100,7 +100,7 @@ scenario "e2e_ui_docker" {
|
||||
}
|
||||
|
||||
step "create_host" {
|
||||
module = module.docker_openssh_server
|
||||
module = module.docker_openssh_server_ca_key
|
||||
depends_on = [
|
||||
step.create_docker_network
|
||||
]
|
||||
@@ -166,6 +166,8 @@ scenario "e2e_ui_docker" {
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
target_user = "ubuntu"
|
||||
target_ca_key = step.create_host.ca_key_private
|
||||
target_ca_key_public = step.create_host.ca_key_public
|
||||
vault_addr = step.create_vault.address
|
||||
vault_addr_internal = step.create_vault.address_internal
|
||||
vault_root_token = step.create_vault.token
|
||||
|
||||
@@ -120,6 +120,10 @@ output "port" {
|
||||
value = "2222"
|
||||
}
|
||||
|
||||
output "ca_key" {
|
||||
output "ca_key_private" {
|
||||
value = base64encode(tls_private_key.ca_key.private_key_openssh)
|
||||
}
|
||||
|
||||
output "ca_key_public" {
|
||||
value = base64encode(local.ca_public_key)
|
||||
}
|
||||
@@ -63,6 +63,16 @@ variable "target_port" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
variable "target_ca_key" {
|
||||
description = "CA Private Key (base64 encoded)"
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
variable "target_ca_key_public" {
|
||||
description = "CA Public Key (base64 encoded)"
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
variable "vault_addr" {
|
||||
description = "External network address of Vault. Will be converted to a URL below"
|
||||
type = string
|
||||
@@ -161,6 +171,8 @@ resource "enos_local_exec" "run_e2e_test" {
|
||||
E2E_TARGET_PORT = var.target_port
|
||||
E2E_SSH_USER = var.target_user
|
||||
E2E_SSH_KEY_PATH = local.aws_ssh_private_key_path
|
||||
E2E_SSH_CA_KEY = var.target_ca_key
|
||||
E2E_SSH_CA_KEY_PUBLIC = var.target_ca_key_public
|
||||
VAULT_ADDR = local.vault_addr
|
||||
VAULT_TOKEN = var.vault_root_token
|
||||
E2E_VAULT_ADDR = local.vault_addr_internal
|
||||
|
||||
Reference in new issue
Block a user