From 9cc0e2eae0cdade93f91b8dacc31906aae076ec9 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Tue, 4 Mar 2025 11:11:02 -0500 Subject: [PATCH] upgrade testing: make cluster name prefix a variable (#25281) During initial development of upgrade testing, we had a hard-coded prefix to distinguish between clusters created for this vs those created by GHA runners. Update the prefix to be a variable so that developers can add their own prefix during test workload development. --- enos/enos-scenario-upgrade.hcl | 2 +- enos/enos-vars.hcl | 6 ++++++ enos/enos.vars.example.hcl | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/enos/enos-scenario-upgrade.hcl b/enos/enos-scenario-upgrade.hcl index 5adab22e6..6b66bf711 100644 --- a/enos/enos-scenario-upgrade.hcl +++ b/enos/enos-scenario-upgrade.hcl @@ -25,7 +25,7 @@ scenario "upgrade" { ] locals { - cluster_name = "mcj-${matrix.os}-${matrix.arch}-${matrix.edition}-${var.product_version}" + cluster_name = "${var.prefix}-${matrix.os}-${matrix.arch}-${matrix.edition}-${var.product_version}" linux_count = matrix.os == "linux" ? "4" : "0" windows_count = matrix.os == "windows" ? "4" : "0" arch = matrix.arch diff --git a/enos/enos-vars.hcl b/enos/enos-vars.hcl index eeeabf423..4914515f4 100644 --- a/enos/enos-vars.hcl +++ b/enos/enos-vars.hcl @@ -1,6 +1,12 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: BUSL-1.1 +variable "prefix" { + type = string + description = "Prefix for the cluster name" + default = "upgrade" +} + # Variables for the fetch_artifactory module variable "artifactory_username" { type = string diff --git a/enos/enos.vars.example.hcl b/enos/enos.vars.example.hcl index 86ef79781..b533c64ed 100644 --- a/enos/enos.vars.example.hcl +++ b/enos/enos.vars.example.hcl @@ -1,6 +1,7 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: BUSL-1.1 +prefix = "" artifactory_username = "" artifactory_token = "" product_version = "1.8.9" # starting version