diff --git a/bicep.makefile b/bicep.makefile index 8896e73..b7e56ef 100644 --- a/bicep.makefile +++ b/bicep.makefile @@ -5,11 +5,6 @@ ARO_CLUSTER_NAME?=aro-sapeic ARO_DOMAIN?=saponrhel.org ARO_VERSION?=4.14.16 -.PHONY: aro-remove -aro-remove: ## Remove ARO - $(call required-environment-variables,ARO_RESOURCE_GROUP) - az deployment group create --resource-group ${ARO_RESOURCE_GROUP} --template-file bicep/empty.bicep --mode Complete - .PHONY: aro-deploy aro-deploy: domain-zone-exists network-deploy ## Deploy ARO $(call required-environment-variables,ARO_RESOURCE_GROUP ARO_CLUSTER_NAME ARO_DOMAIN ARO_VERSION CLIENT_ID CLIENT_SECRET) @@ -81,3 +76,13 @@ oc-login: ## Login with oc to existing ARO cluster oc login "$(shell az aro show --name ${ARO_CLUSTER_NAME} --resource-group ${ARO_RESOURCE_GROUP} --query "apiserverProfile.url" -o tsv)" \ -u "$(shell az aro list-credentials --name ${ARO_CLUSTER_NAME} --resource-group ${ARO_RESOURCE_GROUP} --query 'kubeadminUsername' -o tsv)" \ -p "$(shell az aro list-credentials --name ${ARO_CLUSTER_NAME} --resource-group ${ARO_RESOURCE_GROUP} --query 'kubeadminPassword' -o tsv)" + +.PHONY: resource-group-delete +resource-group-delete: ## Delete the Azure resource group + $(call required-environment-variables,ARO_RESOURCE_GROUP) + az group delete --name ${ARO_RESOURCE_GROUP} --yes --no-wait + +.PHONY: aro-delete +aro-delete: ## Delete the ARO cluster + $(call required-environment-variables,ARO_RESOURCE_GROUP ARO_CLUSTER_NAME) + az aro delete --name ${ARO_CLUSTER_NAME} --resource-group ${ARO_RESOURCE_GROUP} --yes --no-wait diff --git a/bicep/empty.bicep b/bicep/empty.bicep deleted file mode 100644 index e69de29..0000000