From 8a8ae799438fd5c3345746c3c5f0ac26447b4999 Mon Sep 17 00:00:00 2001 From: Hong Ooi Date: Tue, 21 May 2019 12:28:13 +1000 Subject: [PATCH] fix template deployment bug --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ R/az_template.R | 7 +++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ffec424..b4b34f9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AzureRMR Title: Interface to 'Azure Resource Manager' -Version: 2.1.1 +Version: 2.1.1.9000 Authors@R: c( person("Hong", "Ooi", , "hongooi@microsoft.com", role = c("aut", "cre")), person("Microsoft", role="cph") diff --git a/NEWS.md b/NEWS.md index b74a8ba..3fa4921 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# AzureRMR 2.1.1.9000 + +- Fix a bug in template deployment where null fields were not handled correctly. + # AzureRMR 2.1.1 * Some refactoring of login code to better handle AzureAuth options. As part of this, the `config_file` argument for `az_rm$new` has been removed; to use a configuration file, call the (recommended) `create_azure_login` function. diff --git a/R/az_template.R b/R/az_template.R index bb2df21..18927fa 100644 --- a/R/az_template.R +++ b/R/az_template.R @@ -215,8 +215,11 @@ private=list( else modifyList(properties, list(parameters=jsonlite::fromJSON(parameters, simplifyVector=FALSE))) self$name <- name - parms <- private$tpl_op(body=jsonlite::toJSON(list(properties=properties), auto_unbox=TRUE, digits=22), - encode="raw", http_verb="PUT") + parms <- private$tpl_op( + body=jsonlite::toJSON(list(properties=properties), pretty=TRUE, auto_unbox=TRUE, null="null", digits=22), + encode="raw", + http_verb="PUT" + ) # do we wait until template has finished provisioning? if(wait)