Skip to content

Commit

Permalink
Pipeline hotfixes (Azure#654)
Browse files Browse the repository at this point in the history
* Refactor echo statements in deploy control plane pipeline
* Refactor install_workloadzone.sh script to reset return_value variable
* Refactor install_workloadzone.sh script to improve error handling
* feng shui
* Refactor variables_local.tf to improve readability and error handling
* Refactor deploy control plane pipeline to include deployer_tfstate_key parameter
* Refactor deploy control plane pipeline to include deployer_tfstate_key and landscape_tfstate_key parameters
* Refactor echo statement in deploy control plane pipeline
* Refactor remover script in deploy control plane pipeline
* Refactor deploy control plane pipeline to remove unnecessary use_msi flag
* Refactor deploy control plane pipeline to update default value for spn_keyvault_id
* Refactor deploy control plane pipeline to update default value for spn_key_vault_arm_id
* Refactor deploy control plane pipeline to trim deployer_tfstate_key in imports.tf
* Refactor deploy control plane pipeline to include provider for azurerm.workload in imports.tf
* Refactor deploy control plane pipeline to update storage account authentication and export TF_VAR_tfstate_resource_id
* Refactor deploy control plane pipeline to update deployer and landscape state file paths
* Refactor deploy control plane pipeline to remove unnecessary code in remover.sh
* Refactor install_workloadzone.sh to export SPN key vault ID if keyvault is provided
* Refactor tfvar_variables.tf to set default value of short_named_endpoints_nics to true
* Refactor remover.sh to consolidate terraform destroy command
* Refactor echo statements in remover.sh and remove-control-plane.yaml
* Refactor echo statements in deploy/pipelines/01-deploy-control-plane.yaml
* Refactor providers.tf to conditionally set use_msi based on var.use_spn
* Refactor echo statements in deploy/pipelines/01-deploy-control-plane.yaml to improve clarity of deployment credentials
* Refactor install_workloadzone.sh to improve argument parsing and readability
* Refactor code for improved argument parsing and readability in install_workloadzone.sh
* Refactor LandscapeModel.cs, LandscapeDetails.json, and LandscapeTemplate.txt to add prevent_deletion_if_contains_resources property
* Refactor package dependencies in os-packages.yaml
* Refactor ansible role to remove unused variable and update passlib dependency
* Refactor echo statement in install_workloadzone.sh for improved clarity

---------

Co-authored-by: Kimmo Forss <[email protected]>
  • Loading branch information
2 people authored and hdamecharla committed Nov 5, 2024
1 parent 9e1f1ba commit 7e90fe5
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions deploy/scripts/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,33 +240,31 @@ if [[ -z $STATE_SUBSCRIPTION ]]; then
STATE_SUBSCRIPTION=$ARM_SUBSCRIPTION_ID
fi

if [[ -n $STATE_SUBSCRIPTION ]]; then
echo ""
echo "#########################################################################################"
echo "# #"
echo -e "# $cyan Changing the subscription to: $STATE_SUBSCRIPTION $resetformatting #"
echo "# #"
echo "#########################################################################################"
echo ""
az account set --sub "${STATE_SUBSCRIPTION}"

return_code=$?
if [ 0 != $return_code ]; then

if [[ -n $STATE_SUBSCRIPTION ]];
then
echo ""
echo "#########################################################################################"
echo "# #"
echo -e "# $cyan Changing the subscription to: $STATE_SUBSCRIPTION $resetformatting #"
echo -e "# $boldred The deployment account (MSI or SPN) does not have access to $resetformatting #"
echo -e "# $boldred ${STATE_SUBSCRIPTION} $resetformatting #"
echo "# #"
echo "#########################################################################################"
echo ""
az account set --sub "${STATE_SUBSCRIPTION}"

return_code=$?
if [ 0 != $return_code ]; then

echo "#########################################################################################"
echo "# #"
echo -e "# $boldred The deployment account (MSI or SPN) does not have access to $resetformatting #"
echo -e "# $boldred ${STATE_SUBSCRIPTION} $resetformatting #"
echo "# #"
echo "#########################################################################################"

echo "##vso[task.logissue type=error]The deployment account (MSI or SPN) does not have access to ${STATE_SUBSCRIPTION}"
exit $return_code
fi
echo "##vso[task.logissue type=error]The deployment account (MSI or SPN) does not have access to ${STATE_SUBSCRIPTION}"
exit $return_code
fi

account_set=1
account_set=1
fi

if [[ -n $STATE_SUBSCRIPTION ]]; then
Expand Down

0 comments on commit 7e90fe5

Please sign in to comment.