2023-03-15 16:00:52 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
2023-11-16 19:59:47 +00:00
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
2023-03-15 16:00:52 +00:00
|
|
|
|
2022-08-23 19:53:41 +00:00
|
|
|
scenario "autopilot" {
|
|
|
|
matrix {
|
2023-01-20 15:25:14 +00:00
|
|
|
arch = ["amd64", "arm64"]
|
|
|
|
artifact_source = ["local", "crt", "artifactory"]
|
|
|
|
artifact_type = ["bundle", "package"]
|
|
|
|
distro = ["ubuntu", "rhel"]
|
2023-09-27 16:53:12 +00:00
|
|
|
edition = ["ce", "ent", "ent.fips1402", "ent.hsm", "ent.hsm.fips1402"]
|
|
|
|
// NOTE: when backporting, make sure that our initial versions are less than that
|
|
|
|
// release branch's version.
|
|
|
|
initial_version = ["1.11.12", "1.12.11", "1.13.6", "1.14.2"]
|
2023-01-20 15:25:14 +00:00
|
|
|
seal = ["awskms", "shamir"]
|
2023-10-26 21:36:50 +00:00
|
|
|
seal_ha_beta = ["true", "false"]
|
2023-01-13 16:43:26 +00:00
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
# Our local builder always creates bundles
|
|
|
|
exclude {
|
|
|
|
artifact_source = ["local"]
|
|
|
|
artifact_type = ["package"]
|
|
|
|
}
|
2023-09-08 19:31:09 +00:00
|
|
|
|
|
|
|
# HSM and FIPS 140-2 are only supported on amd64
|
|
|
|
exclude {
|
|
|
|
arch = ["arm64"]
|
|
|
|
edition = ["ent.fips1402", "ent.hsm", "ent.hsm.fips1402"]
|
|
|
|
}
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
terraform_cli = terraform_cli.default
|
|
|
|
terraform = terraform.default
|
|
|
|
providers = [
|
|
|
|
provider.aws.default,
|
|
|
|
provider.enos.ubuntu,
|
|
|
|
provider.enos.rhel
|
|
|
|
]
|
|
|
|
|
|
|
|
locals {
|
2023-09-08 19:31:09 +00:00
|
|
|
artifact_path = matrix.artifact_source != "artifactory" ? abspath(var.vault_artifact_path) : null
|
2022-08-23 19:53:41 +00:00
|
|
|
enos_provider = {
|
|
|
|
rhel = provider.enos.rhel
|
|
|
|
ubuntu = provider.enos.ubuntu
|
|
|
|
}
|
2023-09-08 19:31:09 +00:00
|
|
|
manage_service = matrix.artifact_type == "bundle"
|
|
|
|
vault_install_dir = matrix.artifact_type == "bundle" ? var.vault_install_dir : global.vault_install_dir_packages[matrix.distro]
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
step "build_vault" {
|
2022-10-17 23:47:37 +00:00
|
|
|
module = "build_${matrix.artifact_source}"
|
2022-08-23 19:53:41 +00:00
|
|
|
|
|
|
|
variables {
|
2023-09-08 19:31:09 +00:00
|
|
|
build_tags = var.vault_local_build_tags != null ? var.vault_local_build_tags : global.build_tags[matrix.edition]
|
|
|
|
artifact_path = local.artifact_path
|
2022-11-16 19:23:58 +00:00
|
|
|
goarch = matrix.arch
|
|
|
|
goos = "linux"
|
|
|
|
artifactory_host = matrix.artifact_source == "artifactory" ? var.artifactory_host : null
|
|
|
|
artifactory_repo = matrix.artifact_source == "artifactory" ? var.artifactory_repo : null
|
|
|
|
artifactory_username = matrix.artifact_source == "artifactory" ? var.artifactory_username : null
|
|
|
|
artifactory_token = matrix.artifact_source == "artifactory" ? var.artifactory_token : null
|
|
|
|
arch = matrix.artifact_source == "artifactory" ? matrix.arch : null
|
|
|
|
product_version = var.vault_product_version
|
|
|
|
artifact_type = matrix.artifact_type
|
|
|
|
distro = matrix.artifact_source == "artifactory" ? matrix.distro : null
|
|
|
|
edition = matrix.artifact_source == "artifactory" ? matrix.edition : null
|
|
|
|
revision = var.vault_revision
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-22 22:14:22 +00:00
|
|
|
step "ec2_info" {
|
|
|
|
module = module.ec2_info
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
step "create_vpc" {
|
2023-06-22 22:14:22 +00:00
|
|
|
module = module.create_vpc
|
2022-08-23 19:53:41 +00:00
|
|
|
|
|
|
|
variables {
|
2023-09-08 19:31:09 +00:00
|
|
|
common_tags = global.tags
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-26 21:36:50 +00:00
|
|
|
step "create_seal_key" {
|
|
|
|
module = "seal_key_${matrix.seal}"
|
|
|
|
|
|
|
|
variables {
|
|
|
|
cluster_id = step.create_vpc.cluster_id
|
|
|
|
common_tags = global.tags
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-23 19:53:41 +00:00
|
|
|
step "read_license" {
|
|
|
|
module = module.read_license
|
|
|
|
|
|
|
|
variables {
|
2023-09-08 19:31:09 +00:00
|
|
|
file_name = global.vault_license_path
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
step "create_vault_cluster_targets" {
|
2023-06-26 22:54:39 +00:00
|
|
|
module = module.target_ec2_instances
|
2023-04-13 19:44:43 +00:00
|
|
|
depends_on = [step.create_vpc]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-10-26 21:36:50 +00:00
|
|
|
ami_id = step.ec2_info.ami_ids[matrix.arch][matrix.distro][global.distro_version[matrix.distro]]
|
|
|
|
cluster_tag_key = global.vault_tag_key
|
|
|
|
common_tags = global.tags
|
|
|
|
seal_key_names = step.create_seal_key.resource_names
|
|
|
|
vpc_id = step.create_vpc.id
|
2023-04-13 19:44:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-23 19:53:41 +00:00
|
|
|
step "create_vault_cluster" {
|
|
|
|
module = module.vault_cluster
|
|
|
|
depends_on = [
|
|
|
|
step.build_vault,
|
2023-04-13 19:44:43 +00:00
|
|
|
step.create_vault_cluster_targets
|
2022-08-23 19:53:41 +00:00
|
|
|
]
|
2023-04-13 19:44:43 +00:00
|
|
|
|
2022-08-23 19:53:41 +00:00
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-10-26 21:36:50 +00:00
|
|
|
cluster_name = step.create_vault_cluster_targets.cluster_name
|
|
|
|
enable_audit_devices = var.vault_enable_audit_devices
|
|
|
|
install_dir = local.vault_install_dir
|
|
|
|
license = matrix.edition != "ce" ? step.read_license.license : null
|
|
|
|
packages = concat(global.packages, global.distro_packages[matrix.distro])
|
2023-09-27 16:53:12 +00:00
|
|
|
release = {
|
|
|
|
edition = matrix.edition
|
|
|
|
version = matrix.initial_version
|
|
|
|
}
|
2023-10-26 21:36:50 +00:00
|
|
|
seal_ha_beta = matrix.seal_ha_beta
|
|
|
|
seal_key_name = step.create_seal_key.resource_name
|
|
|
|
seal_type = matrix.seal
|
2023-09-27 16:53:12 +00:00
|
|
|
storage_backend = "raft"
|
2022-08-23 19:53:41 +00:00
|
|
|
storage_backend_addl_config = {
|
2023-09-27 16:53:12 +00:00
|
|
|
autopilot_upgrade_version = matrix.initial_version
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
2023-10-26 21:36:50 +00:00
|
|
|
target_hosts = step.create_vault_cluster_targets.hosts
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-04 20:08:26 +00:00
|
|
|
step "get_local_metadata" {
|
2022-10-17 23:47:37 +00:00
|
|
|
skip_step = matrix.artifact_source != "local"
|
2022-10-04 20:08:26 +00:00
|
|
|
module = module.get_local_metadata
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-01-13 16:43:26 +00:00
|
|
|
step "get_vault_cluster_ips" {
|
|
|
|
module = module.vault_get_cluster_ips
|
|
|
|
depends_on = [step.create_vault_cluster]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-09-27 16:53:12 +00:00
|
|
|
vault_hosts = step.create_vault_cluster.target_hosts
|
2023-01-13 16:43:26 +00:00
|
|
|
vault_install_dir = local.vault_install_dir
|
2023-04-13 19:44:43 +00:00
|
|
|
vault_root_token = step.create_vault_cluster.root_token
|
2023-01-13 16:43:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
step "verify_write_test_data" {
|
|
|
|
module = module.vault_verify_write_data
|
|
|
|
depends_on = [
|
|
|
|
step.create_vault_cluster,
|
|
|
|
step.get_vault_cluster_ips
|
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
|
|
|
leader_public_ip = step.get_vault_cluster_ips.leader_public_ip
|
|
|
|
leader_private_ip = step.get_vault_cluster_ips.leader_private_ip
|
2023-06-06 21:34:55 +00:00
|
|
|
vault_instances = step.create_vault_cluster.target_hosts
|
2023-01-13 16:43:26 +00:00
|
|
|
vault_install_dir = local.vault_install_dir
|
2023-04-13 19:44:43 +00:00
|
|
|
vault_root_token = step.create_vault_cluster.root_token
|
2023-01-13 16:43:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-23 19:53:41 +00:00
|
|
|
step "create_autopilot_upgrade_storageconfig" {
|
2022-10-04 20:08:26 +00:00
|
|
|
module = module.autopilot_upgrade_storageconfig
|
2022-08-23 19:53:41 +00:00
|
|
|
|
|
|
|
variables {
|
2022-10-17 23:47:37 +00:00
|
|
|
vault_product_version = matrix.artifact_source == "local" ? step.get_local_metadata.version : var.vault_product_version
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
step "create_vault_cluster_upgrade_targets" {
|
2023-06-26 22:54:39 +00:00
|
|
|
module = module.target_ec2_instances
|
2023-04-13 19:44:43 +00:00
|
|
|
depends_on = [step.create_vpc]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-10-26 21:36:50 +00:00
|
|
|
ami_id = step.ec2_info.ami_ids[matrix.arch][matrix.distro][global.distro_version[matrix.distro]]
|
|
|
|
common_tags = global.tags
|
|
|
|
cluster_name = step.create_vault_cluster_targets.cluster_name
|
|
|
|
seal_key_names = step.create_seal_key.resource_names
|
|
|
|
vpc_id = step.create_vpc.id
|
2023-04-13 19:44:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-23 19:53:41 +00:00
|
|
|
step "upgrade_vault_cluster_with_autopilot" {
|
|
|
|
module = module.vault_cluster
|
|
|
|
depends_on = [
|
2022-10-17 23:47:37 +00:00
|
|
|
step.build_vault,
|
2023-01-13 16:43:26 +00:00
|
|
|
step.create_vault_cluster,
|
2022-08-23 19:53:41 +00:00
|
|
|
step.create_autopilot_upgrade_storageconfig,
|
2023-01-13 16:43:26 +00:00
|
|
|
step.verify_write_test_data
|
2022-08-23 19:53:41 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-06-22 22:14:22 +00:00
|
|
|
artifactory_release = matrix.artifact_source == "artifactory" ? step.build_vault.vault_artifactory_release : null
|
2023-10-26 21:36:50 +00:00
|
|
|
enable_audit_devices = var.vault_enable_audit_devices
|
2023-06-22 22:14:22 +00:00
|
|
|
cluster_name = step.create_vault_cluster_targets.cluster_name
|
|
|
|
log_level = var.vault_log_level
|
2023-04-13 19:44:43 +00:00
|
|
|
force_unseal = matrix.seal == "shamir"
|
|
|
|
initialize_cluster = false
|
|
|
|
install_dir = local.vault_install_dir
|
2023-09-27 16:53:12 +00:00
|
|
|
license = matrix.edition != "ce" ? step.read_license.license : null
|
2023-09-08 19:31:09 +00:00
|
|
|
local_artifact_path = local.artifact_path
|
|
|
|
manage_service = local.manage_service
|
2023-09-18 21:10:37 +00:00
|
|
|
packages = concat(global.packages, global.distro_packages[matrix.distro])
|
2023-04-13 19:44:43 +00:00
|
|
|
root_token = step.create_vault_cluster.root_token
|
2023-10-26 21:36:50 +00:00
|
|
|
seal_ha_beta = matrix.seal_ha_beta
|
|
|
|
seal_key_name = step.create_seal_key.resource_name
|
|
|
|
seal_type = matrix.seal
|
2023-04-13 19:44:43 +00:00
|
|
|
shamir_unseal_keys = matrix.seal == "shamir" ? step.create_vault_cluster.unseal_keys_hex : null
|
2022-08-23 19:53:41 +00:00
|
|
|
storage_backend = "raft"
|
|
|
|
storage_backend_addl_config = step.create_autopilot_upgrade_storageconfig.storage_addl_config
|
2023-04-13 19:44:43 +00:00
|
|
|
storage_node_prefix = "upgrade_node"
|
|
|
|
target_hosts = step.create_vault_cluster_upgrade_targets.hosts
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-20 15:25:14 +00:00
|
|
|
step "verify_vault_unsealed" {
|
|
|
|
module = module.vault_verify_unsealed
|
2023-01-13 16:43:26 +00:00
|
|
|
depends_on = [
|
|
|
|
step.create_vault_cluster,
|
2023-04-13 19:44:43 +00:00
|
|
|
step.create_vault_cluster_upgrade_targets,
|
2023-01-20 15:25:14 +00:00
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
2023-01-13 16:43:26 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-01-20 15:25:14 +00:00
|
|
|
vault_install_dir = local.vault_install_dir
|
2023-06-06 21:34:55 +00:00
|
|
|
vault_instances = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
2023-01-13 16:43:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-20 15:25:14 +00:00
|
|
|
step "verify_raft_auto_join_voter" {
|
|
|
|
module = module.vault_verify_raft_auto_join_voter
|
2022-12-19 20:44:38 +00:00
|
|
|
depends_on = [
|
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
2023-01-20 15:25:14 +00:00
|
|
|
step.verify_vault_unsealed
|
2022-12-19 20:44:38 +00:00
|
|
|
]
|
2022-08-23 19:53:41 +00:00
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2022-12-19 20:44:38 +00:00
|
|
|
vault_install_dir = local.vault_install_dir
|
2023-06-06 21:34:55 +00:00
|
|
|
vault_instances = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
2023-04-13 19:44:43 +00:00
|
|
|
vault_root_token = step.upgrade_vault_cluster_with_autopilot.root_token
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-20 15:25:14 +00:00
|
|
|
step "verify_autopilot_await_server_removal_state" {
|
|
|
|
module = module.vault_verify_autopilot
|
2022-08-23 19:53:41 +00:00
|
|
|
depends_on = [
|
2023-04-13 19:44:43 +00:00
|
|
|
step.create_vault_cluster_upgrade_targets,
|
2022-08-23 19:53:41 +00:00
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
2023-01-20 15:25:14 +00:00
|
|
|
step.verify_raft_auto_join_voter
|
2022-08-23 19:53:41 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-01-20 15:25:14 +00:00
|
|
|
vault_autopilot_upgrade_version = matrix.artifact_source == "local" ? step.get_local_metadata.version : var.vault_product_version
|
|
|
|
vault_autopilot_upgrade_status = "await-server-removal"
|
|
|
|
vault_install_dir = local.vault_install_dir
|
2023-06-07 01:12:53 +00:00
|
|
|
vault_instances = step.create_vault_cluster.target_hosts
|
2023-04-13 19:44:43 +00:00
|
|
|
vault_root_token = step.upgrade_vault_cluster_with_autopilot.root_token
|
2023-01-20 15:25:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-27 16:53:12 +00:00
|
|
|
step "wait_for_leader_in_upgrade_targets" {
|
|
|
|
module = module.vault_wait_for_leader
|
|
|
|
depends_on = [
|
|
|
|
step.create_vault_cluster,
|
|
|
|
step.create_vault_cluster_upgrade_targets,
|
|
|
|
step.get_vault_cluster_ips,
|
|
|
|
step.upgrade_vault_cluster_with_autopilot
|
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
|
|
|
vault_install_dir = local.vault_install_dir
|
|
|
|
vault_root_token = step.create_vault_cluster.root_token
|
|
|
|
vault_hosts = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-20 15:25:14 +00:00
|
|
|
step "get_updated_vault_cluster_ips" {
|
|
|
|
module = module.vault_get_cluster_ips
|
|
|
|
depends_on = [
|
|
|
|
step.create_vault_cluster,
|
2023-04-13 19:44:43 +00:00
|
|
|
step.create_vault_cluster_upgrade_targets,
|
2023-01-20 15:25:14 +00:00
|
|
|
step.get_vault_cluster_ips,
|
2023-09-27 16:53:12 +00:00
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
|
|
|
step.wait_for_leader_in_upgrade_targets,
|
2023-01-20 15:25:14 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-09-27 16:53:12 +00:00
|
|
|
vault_hosts = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
|
|
|
vault_install_dir = local.vault_install_dir
|
|
|
|
vault_root_token = step.create_vault_cluster.root_token
|
2023-01-13 16:43:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
step "verify_read_test_data" {
|
|
|
|
module = module.vault_verify_read_data
|
|
|
|
depends_on = [
|
|
|
|
step.get_updated_vault_cluster_ips,
|
|
|
|
step.verify_write_test_data,
|
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
|
|
|
step.verify_raft_auto_join_voter
|
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
|
|
|
node_public_ips = step.get_updated_vault_cluster_ips.follower_public_ips
|
|
|
|
vault_instance_count = 6
|
|
|
|
vault_install_dir = local.vault_install_dir
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-20 15:25:14 +00:00
|
|
|
step "raft_remove_peers" {
|
|
|
|
module = module.vault_raft_remove_peer
|
|
|
|
depends_on = [
|
2023-04-13 19:44:43 +00:00
|
|
|
step.create_vault_cluster_upgrade_targets,
|
2023-01-20 15:25:14 +00:00
|
|
|
step.get_updated_vault_cluster_ips,
|
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
|
|
|
step.verify_autopilot_await_server_removal_state
|
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
|
|
|
operator_instance = step.get_updated_vault_cluster_ips.leader_public_ip
|
2023-06-06 21:34:55 +00:00
|
|
|
remove_vault_instances = step.create_vault_cluster.target_hosts
|
2023-04-13 19:44:43 +00:00
|
|
|
vault_install_dir = local.vault_install_dir
|
2023-01-20 15:25:14 +00:00
|
|
|
vault_instance_count = 3
|
2023-04-13 19:44:43 +00:00
|
|
|
vault_root_token = step.create_vault_cluster.root_token
|
2023-01-20 15:25:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
step "remove_old_nodes" {
|
|
|
|
module = module.shutdown_multiple_nodes
|
|
|
|
depends_on = [
|
|
|
|
step.create_vault_cluster,
|
|
|
|
step.raft_remove_peers
|
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-06-06 21:34:55 +00:00
|
|
|
old_vault_instances = step.create_vault_cluster.target_hosts
|
2023-01-20 15:25:14 +00:00
|
|
|
vault_instance_count = 3
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
step "verify_autopilot_idle_state" {
|
2022-12-19 20:44:38 +00:00
|
|
|
module = module.vault_verify_autopilot
|
2022-08-23 19:53:41 +00:00
|
|
|
depends_on = [
|
2023-04-13 19:44:43 +00:00
|
|
|
step.create_vault_cluster_upgrade_targets,
|
2022-08-23 19:53:41 +00:00
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
2023-01-20 15:25:14 +00:00
|
|
|
step.verify_raft_auto_join_voter,
|
|
|
|
step.remove_old_nodes
|
2022-08-23 19:53:41 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2022-12-19 20:44:38 +00:00
|
|
|
vault_autopilot_upgrade_version = matrix.artifact_source == "local" ? step.get_local_metadata.version : var.vault_product_version
|
2023-01-20 15:25:14 +00:00
|
|
|
vault_autopilot_upgrade_status = "idle"
|
2022-12-19 20:44:38 +00:00
|
|
|
vault_install_dir = local.vault_install_dir
|
2023-06-06 21:34:55 +00:00
|
|
|
vault_instances = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
2023-04-13 19:44:43 +00:00
|
|
|
vault_root_token = step.create_vault_cluster.root_token
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-27 16:53:12 +00:00
|
|
|
step "verify_replication" {
|
|
|
|
module = module.vault_verify_replication
|
|
|
|
depends_on = [
|
|
|
|
step.create_vault_cluster_upgrade_targets,
|
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
|
|
|
step.verify_raft_auto_join_voter,
|
|
|
|
step.remove_old_nodes
|
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
|
|
|
vault_edition = matrix.edition
|
|
|
|
vault_install_dir = local.vault_install_dir
|
|
|
|
vault_instances = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
step "verify_vault_version" {
|
|
|
|
module = module.vault_verify_version
|
|
|
|
depends_on = [
|
|
|
|
step.create_vault_cluster_upgrade_targets,
|
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
|
|
|
step.verify_raft_auto_join_voter,
|
|
|
|
step.remove_old_nodes
|
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
|
|
|
vault_instances = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
|
|
|
vault_edition = matrix.edition
|
|
|
|
vault_install_dir = local.vault_install_dir
|
|
|
|
vault_product_version = matrix.artifact_source == "local" ? step.get_local_metadata.version : var.vault_product_version
|
|
|
|
vault_revision = matrix.artifact_source == "local" ? step.get_local_metadata.revision : var.vault_revision
|
|
|
|
vault_build_date = matrix.artifact_source == "local" ? step.get_local_metadata.build_date : var.vault_build_date
|
|
|
|
vault_root_token = step.create_vault_cluster.root_token
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
step "verify_ui" {
|
|
|
|
module = module.vault_verify_ui
|
|
|
|
depends_on = [
|
|
|
|
step.create_vault_cluster_upgrade_targets,
|
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
|
|
|
step.verify_raft_auto_join_voter,
|
|
|
|
step.remove_old_nodes
|
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
|
|
|
vault_instances = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-16 21:51:34 +00:00
|
|
|
step "verify_undo_logs_status" {
|
2023-09-27 16:53:12 +00:00
|
|
|
skip_step = true
|
|
|
|
# NOTE: temporarily disable undo logs checking until it is fixed. See VAULT-20259
|
|
|
|
# skip_step = semverconstraint(var.vault_product_version, "<1.13.0-0")
|
|
|
|
module = module.vault_verify_undo_logs
|
2022-12-16 21:51:34 +00:00
|
|
|
depends_on = [
|
2023-04-13 19:44:43 +00:00
|
|
|
step.create_vault_cluster_upgrade_targets,
|
2023-01-20 15:25:14 +00:00
|
|
|
step.remove_old_nodes,
|
2022-12-16 21:51:34 +00:00
|
|
|
step.upgrade_vault_cluster_with_autopilot,
|
2023-01-20 15:25:14 +00:00
|
|
|
step.verify_autopilot_idle_state
|
2022-12-16 21:51:34 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
providers = {
|
|
|
|
enos = local.enos_provider[matrix.distro]
|
|
|
|
}
|
|
|
|
|
|
|
|
variables {
|
2023-01-20 15:25:14 +00:00
|
|
|
vault_install_dir = local.vault_install_dir
|
2023-06-06 21:34:55 +00:00
|
|
|
vault_instances = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
2023-04-13 19:44:43 +00:00
|
|
|
vault_root_token = step.create_vault_cluster.root_token
|
2022-12-16 21:51:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-26 21:36:50 +00:00
|
|
|
output "audit_device_file_path" {
|
|
|
|
description = "The file path for the file audit device, if enabled"
|
|
|
|
value = step.create_vault_cluster.audit_device_file_path
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "cluster_name" {
|
|
|
|
description = "The Vault cluster name"
|
|
|
|
value = step.create_vault_cluster.cluster_name
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "hosts" {
|
|
|
|
description = "The Vault cluster target hosts"
|
|
|
|
value = step.create_vault_cluster.target_hosts
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "private_ips" {
|
|
|
|
description = "The Vault cluster private IPs"
|
|
|
|
value = step.create_vault_cluster.private_ips
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "public_ips" {
|
|
|
|
description = "The Vault cluster public IPs"
|
|
|
|
value = step.create_vault_cluster.public_ips
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "root_token" {
|
|
|
|
description = "The Vault cluster root token"
|
|
|
|
value = step.create_vault_cluster.root_token
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "recovery_key_shares" {
|
2023-01-13 16:43:26 +00:00
|
|
|
description = "The Vault cluster recovery key shares"
|
2023-04-13 19:44:43 +00:00
|
|
|
value = step.create_vault_cluster.recovery_key_shares
|
2023-01-13 16:43:26 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "recovery_keys_b64" {
|
2023-01-13 16:43:26 +00:00
|
|
|
description = "The Vault cluster recovery keys b64"
|
2023-04-13 19:44:43 +00:00
|
|
|
value = step.create_vault_cluster.recovery_keys_b64
|
2023-01-13 16:43:26 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "recovery_keys_hex" {
|
2023-01-13 16:43:26 +00:00
|
|
|
description = "The Vault cluster recovery keys hex"
|
2023-04-13 19:44:43 +00:00
|
|
|
value = step.create_vault_cluster.recovery_keys_hex
|
2023-01-13 16:43:26 +00:00
|
|
|
}
|
|
|
|
|
2023-10-26 21:36:50 +00:00
|
|
|
output "seal_key_name" {
|
|
|
|
description = "The Vault cluster seal key name"
|
|
|
|
value = step.create_seal_key.resource_name
|
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "unseal_keys_b64" {
|
|
|
|
description = "The Vault cluster unseal keys"
|
|
|
|
value = step.create_vault_cluster.unseal_keys_b64
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "unseal_keys_hex" {
|
|
|
|
description = "The Vault cluster unseal keys hex"
|
|
|
|
value = step.create_vault_cluster.unseal_keys_hex
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "upgrade_hosts" {
|
|
|
|
description = "The Vault cluster target hosts"
|
|
|
|
value = step.upgrade_vault_cluster_with_autopilot.target_hosts
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "upgrade_private_ips" {
|
|
|
|
description = "The Vault cluster private IPs"
|
|
|
|
value = step.upgrade_vault_cluster_with_autopilot.private_ips
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
|
2023-04-13 19:44:43 +00:00
|
|
|
output "upgrade_public_ips" {
|
|
|
|
description = "The Vault cluster public IPs"
|
|
|
|
value = step.upgrade_vault_cluster_with_autopilot.public_ips
|
2022-08-23 19:53:41 +00:00
|
|
|
}
|
|
|
|
}
|