Search code examples
azure-devopsyamlazure-resource-managercicd

How to handle space within string in YAML?


I created YAML for CI/CD pipeline but the pipeline because of space in between the parameters name.

Here is the example of the parameters:

override parameters '
     -gbna-archive-trigger_properties_Kroger Manual File Archive_parameters_triggeringFile $(Funding_parameters_triggeringFile)
     -nesco_archive_trigger_properties_nesco Manual File Archive_parameters_triggeringFile $(Funding_parameters_triggeringFile)
     -gh-nesco-competitor-funding_properties_Competitor Funding_parameters_triggeringFile $(Funding_parameters_triggeringFile) '

Note: The template files are ARM templates but I am overriding the parameters in the YAML file.


Solution

  • The name of the parameter must be a valid JavaScript identifier. So your parameter name can't contain space. You can replace the space with _ or remove the space. The document about parameter: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/syntax#parameters