11#!  /bin/bash
22
33# ###########################################################################################################
4- # # This script is used by the catalog pipeline to deploy the SLZ ROKS  and Monitoring instances,
5- # # which are the prerequisites for the Monitoring Agent extension .
4+ # # This script is used by the catalog pipeline to deploy the OCP  and Monitoring instances,
5+ # # which are the prerequisites for the Monitoring Agent DA .
66# ###########################################################################################################
77
88set  -e
@@ -16,31 +16,28 @@ TF_VARS_FILE="terraform.tfvars"
1616(
1717  cwd=$( pwd) 
1818  cd  ${TERRAFORM_SOURCE_DIR} 
19-   echo  " Provisioning prerequisite SLZ ROKS CLUSTER  and Monitoring Instances  .." 
19+   echo  " Provisioning prerequisite OCP cluster  and Monitoring Instance  .." 
2020  terraform init ||  exit  1
2121  #  $VALIDATION_APIKEY is available in the catalog runtime
2222  {
2323    echo  " ibmcloud_api_key=\" ${VALIDATION_APIKEY} \" " 
2424    echo  " region=\" ${REGION} \" " 
25-     echo  " prefix=\" slz -$( openssl rand -hex 2) \" " 
25+     echo  " prefix=\" ocp -$( openssl rand -hex 2) \" " 
2626  } >>  ${TF_VARS_FILE} 
2727  terraform apply -input=false -auto-approve -var-file=${TF_VARS_FILE}  ||  exit  1
2828
29-   region_var_name=" region" 
3029  cluster_id_var_name=" cluster_id" 
3130  cluster_id_value=$( terraform output -state=terraform.tfstate -raw cluster_id) 
3231  cluster_resource_group_id_var_name=" cluster_resource_group_id" 
3332  cluster_resource_group_id_value=$( terraform output -state=terraform.tfstate -raw cluster_resource_group_id) 
34-   cloud_monitoring_instance_region_var_name=" instance_region " 
33+   cloud_monitoring_instance_region_var_name=" cloud_monitoring_instance_region " 
3534  access_key_var_name=" access_key" 
3635  access_key_value=$( terraform output -state=terraform.tfstate -raw access_key) 
3736
38-   echo  " Appending '${cluster_id_var_name} '  and '${region_var_name } ' input variable values to ${JSON_FILE} .." 
37+   echo  " Appending '${cluster_id_var_name} ', ' ${cluster_resource_group_id_var_name} ', ' ${cloud_monitoring_instance_region_var_name} '  and '${access_key_var_name } ' input variable values to ${JSON_FILE} .." 
3938
4039  cd  " ${cwd} " 
41-   jq -r --arg region_var_name " ${region_var_name} "   \
42-         --arg region_var_value " ${REGION} "   \
43-         --arg cluster_id_var_name " ${cluster_id_var_name} "   \
40+   jq -r --arg cluster_id_var_name " ${cluster_id_var_name} "   \
4441        --arg cluster_id_value " ${cluster_id_value} "   \
4542        --arg cluster_resource_group_id_var_name " ${cluster_resource_group_id_var_name} "   \
4643        --arg cluster_resource_group_id_value " ${cluster_resource_group_id_value} "   \
0 commit comments