azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

New-AzureResourceGroupDeployment casts string parameters in TemplateParameterObject incorrectly

Open clamanna opened this issue 11 years ago • 5 comments

When using the TemplateParameterObject param of New-AzureResourceGroupDeployment, rather than the dynamic cmdlet parameters, this issue appeared (module version 0.8.13).

When the template parameter object looked like $tpo = @{ P = $v } where $v was a string ($v = 'value'), this would fail template validation on the server side, saying the value for parameter P was not valid. This was fixed by casting, but this seems weird: $tpo = @{ P = [string]$v } worked.

When capturing the request with Fiddler, and without the cast the JSON was strange, and included some wrapper around the actual string value.

clamanna avatar Mar 28 '15 02:03 clamanna

@clamanna This is assigned the label "IaaS" but I'm not sure what the compute team needs to look at here. Should this be assigned to your team instead?

cc: @matt-gibbs

singhkays avatar Jul 17 '15 19:07 singhkays

Yes, this feels like a general template deployment cmdlet issue.

cc: @vivsriaus

clamanna avatar Jul 20 '15 01:07 clamanna

Lets fix if this is still an issue.

ravbhatnagar avatar Feb 12 '16 02:02 ravbhatnagar

Works now.

ravbhatnagar avatar Apr 14 '16 22:04 ravbhatnagar

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rthorn17

ghost avatar Aug 14 '19 19:08 ghost