From 1dd6b6f2e966df88df937e9e72f41e510ff97a54 Mon Sep 17 00:00:00 2001 From: Robert de Veen Date: Mon, 25 Mar 2024 13:42:25 +0100 Subject: [PATCH] Remove commented out code and conditionally set secret with key WZ_PAT --- .../02-deploy-control-plane.sh | 6 +++--- .../01-deploy-sap-workload-zone.sh | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/deploy/automation/01-deploy-control-plane/02-deploy-control-plane.sh b/deploy/automation/01-deploy-control-plane/02-deploy-control-plane.sh index ddeb456e11..d258d1f6b8 100755 --- a/deploy/automation/01-deploy-control-plane/02-deploy-control-plane.sh +++ b/deploy/automation/01-deploy-control-plane/02-deploy-control-plane.sh @@ -451,9 +451,9 @@ if [ 0 == $return_code ]; then # if [[ -n "${ARM_SUBSCRIPTION_ID}" ]]; then # set_value_with_key "Terraform_Remote_Storage_Subscription" ${ARM_SUBSCRIPTION_ID} fi # fi - if [[ -n "${deployerfolder}" ]]; then - set_value_with_key "Deployer_State_FileName" ${deployerfolder}.terraform.tfstate - fi + # # # if [[ -n "${deployerfolder}" ]]; then + # # # set_value_with_key "Deployer_State_FileName" ${deployerfolder}.terraform.tfstate + # # # fi # if [[ -n "${file_key_vault}" ]]; then # set_value_with_key "Deployer_Key_Vault" ${file_key_vault} fi # fi diff --git a/deploy/automation/02-deploy-sap-workload-zone/01-deploy-sap-workload-zone.sh b/deploy/automation/02-deploy-sap-workload-zone/01-deploy-sap-workload-zone.sh index 917144040e..3df45c85d2 100755 --- a/deploy/automation/02-deploy-sap-workload-zone/01-deploy-sap-workload-zone.sh +++ b/deploy/automation/02-deploy-sap-workload-zone/01-deploy-sap-workload-zone.sh @@ -456,13 +456,13 @@ fi start_group "Adding variables to platform variable group" if [ -n $VARIABLE_GROUP_ID ]; then - set_value_with_key "Terraform_Remote_Storage_Account_Name" ${REMOTE_STATE_SA} + #set_value_with_key "Terraform_Remote_Storage_Account_Name" ${REMOTE_STATE_SA} - set_value_with_key "Terraform_Remote_Storage_Subscription" ${STATE_SUBSCRIPTION} + #set_value_with_key "Terraform_Remote_Storage_Subscription" ${STATE_SUBSCRIPTION} - set_value_with_key "Deployer_State_FileName" ${deployer_tfstate_key} + #set_value_with_key "Deployer_State_FileName" ${deployer_tfstate_key} - set_value_with_key "Deployer_Key_Vault" ${key_vault} + #set_value_with_key "Deployer_Key_Vault" ${key_vault} set_value_with_key "Workload_Key_Vault" ${workload_key_vault} @@ -472,7 +472,9 @@ if [ -n $VARIABLE_GROUP_ID ]; then set_value_with_key "Workload_Zone_State_FileName" ${landscape_tfstate_key} - set_secret_with_key "WZ_PAT" $AZURE_DEVOPS_EXT_PAT + if [[ $(get_platform) = devops ]]; then + set_secret_with_key "WZ_PAT" $AZURE_DEVOPS_EXT_PAT + fi fi if [ 0 != $return_code ]; then