Skip to content

Commit cdedc1e

Browse files
Jordan-Williams2Jordan-Williams2
authored andcommitted
fix: files
1 parent 37566d9 commit cdedc1e

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

cra-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ CRA_TARGETS: [] # disable CRA since no SCC instance exists in the test account
1313
# # SCC_INSTANCE_ID: "" # The SCC instance ID to use to download profile for CRA scan. If not provided, a default global value will be used.
1414
# # SCC_REGION: "" # The IBM Cloud region that the SCC instance is in. If not provided, a default global value will be used.
1515
# CRA_ENVIRONMENT_VARIABLES: # An optional map of environment variables for CRA, where the key is the variable name and value is the value. Useful for providing TF_VARs.
16-
# TF_VAR_prefix: "roks-cpd"
16+
# TF_VAR_prefix: "ocp-cpd"
1717
# TF_VAR_region: "au-syd"

examples/basic/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ variable "ibmcloud_api_key" {
1111
variable "prefix" {
1212
description = "A unique identifier for resources that is prepended to resources that are provisioned. Must begin with a lowercase letter and end with a lowercase letter or number. Must be 13 or fewer characters."
1313
type = string
14-
default = "lz-roks-cp4d"
14+
default = "ocp-cp4d"
1515

1616
validation {
1717
error_message = "Prefix must begin with a letter and contain only lowercase letters, numbers, and - characters. Prefixes must end with a lowercase letter or number and be 16 or fewer characters."
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"ibmcloud_api_key": $VALIDATION_APIKEY,
3+
"cpd_entitlement_key": $SOFTWARE_ENTITLEMENT_KEY,
34
"prefix": $PREFIX,
45
"region": "us-south"
56
}

tests/pr_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func TestRunStandardSolution(t *testing.T) {
8181
assert.True(t, existErr == nil, "Init and Apply of temp existing resource failed")
8282
} else {
8383
// ------------------------------------------------------------------------------------
84-
// Deploy WatsonX Self Managed OCP DA passing using existing ROKS instance
84+
// Deploy WatsonX Self Managed OCP DA passing using existing OCP instance
8585
// ------------------------------------------------------------------------------------
8686
cpdEntitlementKey, cpdEntitlementKeyErr := GetSecretsManagerKey(
8787
permanentResources["secretsManagerGuid"].(string),
@@ -169,7 +169,7 @@ func TestRunStandardUpgradeSolution(t *testing.T) {
169169
assert.True(t, existErr == nil, "Init and Apply of temp existing resource failed")
170170
} else {
171171
// ------------------------------------------------------------------------------------
172-
// Deploy WatsonX Self Managed OCP DA passing using existing ROKS instance
172+
// Deploy WatsonX Self Managed OCP DA passing using existing OCP instance
173173
// ------------------------------------------------------------------------------------
174174
cpdEntitlementKey, cpdEntitlementKeyErr := GetSecretsManagerKey(
175175
permanentResources["secretsManagerGuid"].(string),

tests/scripts/pre-validation-deploy-ocp-instances.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,25 @@ TF_VARS_FILE="terraform.tfvars"
2727
terraform apply -input=false -auto-approve -var-file=${TF_VARS_FILE} || exit 1
2828

2929
region_var_name="region"
30+
cpd_entitlement_key_var_name="cpd_entitlement_key"
31+
cpd_entitlement_key_value="${SOFTWARE_ENTITLEMENT_KEY}"
3032
existing_cluster_name_var_name="existing_cluster_name"
3133
existing_cluster_name_value=$(terraform output -state=terraform.tfstate -raw cluster_name)
3234
existing_resource_group_name_var_name="existing_resource_group_name"
3335
existing_resource_group_name_value=$(terraform output -state=terraform.tfstate -raw cluster_resource_group_name)
3436

35-
echo "Appending '${existing_cluster_name_var_name}', '${existing_resource_group_name_var_name}', and '${region_var_name}' input variable values to ${JSON_FILE}.."
37+
echo "Appending '${existing_cluster_name_var_name}', '${existing_resource_group_name_var_name}', '${cpd_entitlement_key_var_name}', and '${region_var_name}' input variable values to ${JSON_FILE}.."
3638

3739
cd "${cwd}"
3840
jq -r --arg region_var_name "${region_var_name}" \
3941
--arg region_var_value "${REGION}" \
42+
--arg cpd_entitlement_key_var_name "${existing_cluster_name_var_name}" \
43+
--arg cpd_entitlement_key_value "${existing_cluster_name_value}" \
4044
--arg existing_cluster_name_var_name "${existing_cluster_name_var_name}" \
4145
--arg existing_cluster_name_value "${existing_cluster_name_value}" \
4246
--arg existing_resource_group_name_var_name "${existing_resource_group_name_var_name}" \
4347
--arg existing_resource_group_name_value "${existing_resource_group_name_value}" \
44-
'. + {($region_var_name): $region_var_value, ($existing_cluster_name_var_name): $existing_cluster_name_value, ($existing_resource_group_name_var_name): $existing_resource_group_name_value}' "${JSON_FILE}" > tmpfile && mv tmpfile "${JSON_FILE}" || exit 1
48+
'. + {($region_var_name): $region_var_value, ($cpd_entitlement_key_var_name): $cpd_entitlement_key_value, ($existing_cluster_name_var_name): $existing_cluster_name_value, ($existing_resource_group_name_var_name): $existing_resource_group_name_value}' "${JSON_FILE}" > tmpfile && mv tmpfile "${JSON_FILE}" || exit 1
4549

4650
echo "Pre-validation complete successfully"
4751
)

0 commit comments

Comments
 (0)