Closed andythsu closed 5 years ago
I tried this pipeline using Azure CLI Plugin 0.9 and Az 2.0.49 and the result was correct
node {
test_tags="CreatedBy=\"Foo User\""
resource_group_name = test"
location = "northeurope"
azureCLI commands: [[exportVariablesString: '', script: "az group create -n ${resource_group_name} -l ${location} --tags ${test_tags}"]], principalCredentialId: 'testid'
}
The result
Running: az group create -n test -l northeurope --tags CreatedBy="Foo User"
{
"id": "/subscriptions/73a4ea93-d914-424d-9e64/resourceGroups/test",
"location": "northeurope",
"managedBy": null,
"name": "test",
"properties": {
"provisioningState": "Succeeded"
},
"tags": {
"CreatedBy": "Foo User"
}
}
Thanks! I will close the issue
My command is test_tags="CreatedBy=\"Foo User\"" az_group_create="az group create --location $location --name $tenantResourceGroupName --tags $test_tags" $az_group_create
it returned "tags": { "CreatedBy": "\"Foo", "User\"": "" }
How do I make it so it returns "tags": { "CreatedBy": "Foo User" }
Please help. Thanks