diff options
author | pmikus <pmikus@cisco.com> | 2021-09-07 09:27:29 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2021-09-07 09:29:42 +0000 |
commit | 3d781d7e6add31fc3729de3ad7fed1e720c8756d (patch) | |
tree | c5dd84f6d88af9078d7bf7c311ec5e0906d76690 /resources | |
parent | 80a4b408b1bec92f51813c5b758d7b2739f665ed (diff) |
Terraform: Add job name as VPC ID
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: I82819c924012c966ba91fdf39ffba500ee0ce6b0
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/bash/function/common.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index ff632a2e97..e56799e63c 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -606,6 +606,7 @@ function prepare_topology () { # Prepare virtual testbed topology if needed based on flavor. # Variables read: + # - TEST_CODE - String affecting test selection, usually jenkins job name. # - NODENESS - Node multiplicity of testbed, either "2n" or "3n". # - FLAVOR - Node flavor string, e.g. "clx" or "skx". # Functions called: @@ -618,10 +619,12 @@ function prepare_topology () { case_text="${NODENESS}_${FLAVOR}" case "${case_text}" in "2n_aws") + export TF_VAR_testbed_name="${TEST_CODE}" terraform_init || die "Failed to call terraform init." terraform_apply || die "Failed to call terraform apply." ;; "3n_aws") + export TF_VAR_testbed_name="${TEST_CODE}" terraform_init || die "Failed to call terraform init." terraform_apply || die "Failed to call terraform apply." ;; |