diff --git a/scripts/py/deployer.py b/scripts/py/deployer.py index 1a61233..c5bcfef 100644 --- a/scripts/py/deployer.py +++ b/scripts/py/deployer.py @@ -54,5 +54,9 @@ def deploy(self): def destroy(self): """Destroy the given resource group""" logging.info("Destroying resource group {}...".format(self.resource_group)) - self.client.resource_groups.delete(self.resource_group) + logging.info("Does it exist? {}".format( + self.client.resource_groups.check_existence(self.resource_group)) + ) + deletion_async_operation = self.client.resource_groups.delete(self.resource_group) + deletion_async_operation.wait() logging.info("Destroyed.") diff --git a/scripts/py/test_deployment.py b/scripts/py/test_deployment.py index 79c83f2..465fa18 100644 --- a/scripts/py/test_deployment.py +++ b/scripts/py/test_deployment.py @@ -9,7 +9,7 @@ # endregion # region ---- Parameters ---- -my_resource_group = 'azure-python-deployment-test' +my_resource_group = 'azure-python-deployment-test-4' my_pub_ssh_key_path = os.path.expanduser('~/.ssh/id_rsa.pub') template_path = "azure-templates/test_template.json" dns_label_prefix = Haikunator().haikunate()