diff --git a/CHANGELOG.md b/CHANGELOG.md index d1206db..323fb88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ This project uses [Semantic Versioning](https://semver.org/) - MAJOR.MINOR.PATCH # Changelog +Saltext.Azurerm 2.0.2 (2023-02-13) +================================== + +Fixed +----- + +- Fix deployment resource validation function (#21) + + Saltext.Azurerm 2.0.1 (2023-02-13) ================================== diff --git a/src/saltext/azurerm/modules/azurerm_resource.py b/src/saltext/azurerm/modules/azurerm_resource.py index 89a3af1..b2fde8b 100644 --- a/src/saltext/azurerm/modules/azurerm_resource.py +++ b/src/saltext/azurerm/modules/azurerm_resource.py @@ -415,7 +415,7 @@ def deployment_create_or_update( else: prop_kwargs["debug_setting"] = {"detail_level": debug_setting} - if deploy_params: + if deploy_params is not None: prop_kwargs["parameters"] = deploy_params else: param_uri = None @@ -446,7 +446,7 @@ def deployment_create_or_update( prop_kwargs["parameters"] = file_dict except (JSONDecodeError, TypeError) as exc: log.error(exc) - if deploy_template: + if deploy_template is not None: prop_kwargs["template"] = deploy_template else: template_uri = None @@ -680,7 +680,9 @@ def deployment_validate( resource_group_name=resource_group, parameters={"properties": deploy_model}, ) - result = deploy.as_dict() + deploy.wait() + deploy_result = deploy.result() + result = deploy_result.as_dict() except CloudError as exc: saltext.azurerm.utils.azurerm.log_cloud_error("resource", str(exc), **kwargs) result = {"error": str(exc)} diff --git a/src/saltext/azurerm/version.py b/src/saltext/azurerm/version.py index d5e035e..bd7c7ee 100644 --- a/src/saltext/azurerm/version.py +++ b/src/saltext/azurerm/version.py @@ -1,2 +1,2 @@ # pylint: disable=missing-module-docstring -__version__ = "2.0.1" +__version__ = "2.0.2"