Mike Baum 98a0999010
Add an enos scenario to test vault docker images using k8s/kind/helm (#17515)
* Added a scenario to test docker artifacts using the vault helm chart and a kind cluster
* Addedt enos-k8s github workflow
2022-10-19 14:26:31 -04:00

40 lines
892 B
HCL

terraform {
required_providers {
enos = {
source = "app.terraform.io/hashicorp-qti/enos"
}
}
}
locals {
instances = toset([for idx in range(var.vault_instance_count) : tostring(idx)])
}
resource "enos_remote_exec" "replication_status" {
for_each = local.instances
inline = ["vault read -format=json sys/replication/status"]
transport = {
kubernetes = {
kubeconfig_base64 = var.kubeconfig_base64
context_name = var.context_name
pod = var.vault_pods[each.key].name
namespace = var.vault_pods[each.key].namespace
}
}
}
resource "enos_local_exec" "verify_replication_status" {
for_each = enos_remote_exec.replication_status
environment = {
STATUS = each.value.stdout
VAULT_EDITION = var.vault_edition
}
content = abspath("${path.module}/scripts/smoke-verify-replication.sh")
}