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.
This commit is contained in:
Tim Gross
2025-03-04 11:11:02 -05:00
committed by GitHub
parent 5605f9630d
commit 9cc0e2eae0
3 changed files with 8 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ scenario "upgrade" {
] ]
locals { 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" linux_count = matrix.os == "linux" ? "4" : "0"
windows_count = matrix.os == "windows" ? "4" : "0" windows_count = matrix.os == "windows" ? "4" : "0"
arch = matrix.arch arch = matrix.arch

View File

@@ -1,6 +1,12 @@
# Copyright (c) HashiCorp, Inc. # Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1 # SPDX-License-Identifier: BUSL-1.1
variable "prefix" {
type = string
description = "Prefix for the cluster name"
default = "upgrade"
}
# Variables for the fetch_artifactory module # Variables for the fetch_artifactory module
variable "artifactory_username" { variable "artifactory_username" {
type = string type = string

View File

@@ -1,6 +1,7 @@
# Copyright (c) HashiCorp, Inc. # Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1 # SPDX-License-Identifier: BUSL-1.1
prefix = "<your initials or name>"
artifactory_username = "<your email address>" artifactory_username = "<your email address>"
artifactory_token = "<your ARTIFACTORY_TOKEN from above>" artifactory_token = "<your ARTIFACTORY_TOKEN from above>"
product_version = "1.8.9" # starting version product_version = "1.8.9" # starting version