Open lgp1985 opened 2 months ago
I came across this yesteray. Seems the AzureResourceManagerTemplateDeployment@3 task does not yet support user defined types in bicep. As a workaround, use 'object' type (instead of CommonType) for your CommonCfg param.
New issue checklist
Task name
AzureResourceManagerTemplateDeployment@3
Task version
3.238.0
Issue Description
I need to pass a parameter from YAML pipelines on Azure DevOps into AzureResourceManagerTemplateDeployment@3 input:
overrideParameters
.If I use
convertToJson()
, I receive:[error]Deployment template validation failed: 'The provided value for the template parameter 'CommonCfg' is not valid. Expected a value of type 'Object', but received a value of type 'String'. Please see https://aka.ms/arm-create-parameter-file for usage details.'.
Instead, if avoid using
convertToJson()
, I receive:(Line: 68, Col: 41): Unable to convert from Object to String. Value: Object
Below are reference codes
pipeline.yml
main.bicep
CommonType.bicep
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Ubuntu 22.04.4 LTS
Relevant log output
Full task logs with system.debug enabled
Repro steps