зеркало из https://github.com/microsoft/AzureTRE.git
Make uses destroy script (#1392)
* make uses destroy script * bug fix * fix field typo
This commit is contained in:
Родитель
35e04819dc
Коммит
8c6bc851cd
4
Makefile
4
Makefile
|
@ -178,9 +178,7 @@ tre-destroy:
|
|||
&& . ./devops/scripts/check_dependencies.sh nodocker \
|
||||
&& . ./devops/scripts/load_env.sh ./templates/core/.env \
|
||||
&& . ./devops/scripts/load_env.sh ./devops/.env \
|
||||
&& . ./devops/scripts/load_terraform_env.sh ./devops/.env \
|
||||
&& . ./devops/scripts/load_terraform_env.sh ./templates/core/.env \
|
||||
&& cd ./templates/core/terraform/ && ./destroy.sh
|
||||
&& . ./devops/scripts/destroy_env_no_terraform.sh
|
||||
|
||||
terraform-deploy:
|
||||
$(call target_title, "Deploying ${DIR} with Terraform") \
|
||||
|
|
|
@ -56,11 +56,12 @@ elif [[ "$1" == *"stop"* ]]; then
|
|||
fi
|
||||
|
||||
# Report final FW status
|
||||
PUBLIC_IP=$(az network firewall ip-config list -f "fw-$TRE_ID" -g "rg-$TRE_ID" --query "[0].publicIpAddress" -o tsv)
|
||||
if [ -n "$PUBLIC_IP" ]; then
|
||||
FW_STATE="Running"
|
||||
else
|
||||
FW_STATE="Stopped"
|
||||
FW_STATE="Stopped"
|
||||
if [[ $(az network firewall list --query "[?resourceGroup=='rg-${TRE_ID}'&&name=='fw-${TRE_ID}'] | length(@)") != 0 ]]; then
|
||||
PUBLIC_IP=$(az network firewall ip-config list -f "fw-$TRE_ID" -g "rg-$TRE_ID" --query "[0].publicIpAddress" -o tsv)
|
||||
if [ -n "$PUBLIC_IP" ]; then
|
||||
FW_STATE="Running"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Report final AGW status
|
||||
|
|
|
@ -23,11 +23,6 @@ USAGE
|
|||
exit 1
|
||||
}
|
||||
|
||||
# if no arguments are provided, return usage function
|
||||
if [ $# -eq 0 ]; then
|
||||
usage # run usage function
|
||||
fi
|
||||
|
||||
no_wait=false
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
|
@ -96,7 +91,7 @@ az resource list --resource-group ${core_tre_rg} --query '[].[id]' -o tsv | xarg
|
|||
|
||||
# purge keyvault if possible (makes it possible to reuse the same tre_id later)
|
||||
# this has to be done before we delete the resource group since we don't wait for it to complete
|
||||
if [[ $(az keyvault list --resource-group ${core_tre_rg} --query '[?proterties.enablePurgeProtection==null] | length (@)') != 0 ]]; then
|
||||
if [[ $(az keyvault list --resource-group ${core_tre_rg} --query '[?properties.enablePurgeProtection==null] | length (@)') != 0 ]]; then
|
||||
tre_id=${core_tre_rg#"rg-"}
|
||||
keyvault_name="kv-${tre_id}"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче