2023-03-15 16:00:52 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
2023-09-18 21:10:37 +00:00
|
|
|
# SPDX-License-Identifier: BUSL-1.1
|
2023-03-15 16:00:52 +00:00
|
|
|
|
2022-11-16 19:23:58 +00:00
|
|
|
|
|
|
|
terraform {
|
|
|
|
required_providers {
|
|
|
|
enos = {
|
|
|
|
source = "app.terraform.io/hashicorp-qti/enos"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
locals {
|
|
|
|
instances = {
|
|
|
|
for idx in range(var.vault_instance_count) : idx => {
|
|
|
|
public_ip = values(var.vault_instances)[idx].public_ip
|
|
|
|
private_ip = values(var.vault_instances)[idx].private_ip
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "enos_remote_exec" "smoke-verify-ui" {
|
|
|
|
for_each = local.instances
|
|
|
|
|
2023-09-27 16:53:12 +00:00
|
|
|
environment = {
|
|
|
|
VAULT_ADDR = var.vault_addr,
|
|
|
|
}
|
|
|
|
|
|
|
|
scripts = [abspath("${path.module}/scripts/smoke-verify-ui.sh")]
|
2022-11-16 19:23:58 +00:00
|
|
|
|
|
|
|
transport = {
|
|
|
|
ssh = {
|
|
|
|
host = each.value.public_ip
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|