ARM template allowed values for object

Fabian Bruenger 6 Reputation points
2021-03-24T08:09:59.717+00:00

Hi guys,

i have one question about the ARM templates and their allowedValues feature for the parameter section. I want to deploy e.g. a resource group with specific tags. These tags are a parameter object. How can I assign allowedValues to an object? Here is the code example:

        "tags": { 
            "type": "object", 
            "defaultValue": { 
                "value1": "a", 
                "value2": "b", 
                "value3": "c" 
            }, 
            "allowedValues": [ 
                .....????? 
            ] 
        } 

If I try to define a set of objects inside the array of allowedValues, it gives me an error. Would be glad about some help.
Thanks in advance and best regards

Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
259 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Fabian Bruenger 6 Reputation points
    2021-03-25T12:58:57.96+00:00

    Hey,

    I just tried it again and VS code does not give me any error.. I am calling the templates via Azure pipeline, but the error has already been marked in VS code.

    But it seems to work now.. Thanks.

    1 person found this answer helpful.