Skip to content

Commit

Permalink
fix deployment validation and release 2.0.2 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasmhughes authored Feb 13, 2023
1 parent 2176a56 commit 889f365
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
==================================

Expand Down
8 changes: 5 additions & 3 deletions src/saltext/azurerm/modules/azurerm_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)}
Expand Down
2 changes: 1 addition & 1 deletion src/saltext/azurerm/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# pylint: disable=missing-module-docstring
__version__ = "2.0.1"
__version__ = "2.0.2"

0 comments on commit 889f365

Please sign in to comment.