Mamquam
Mamquam

Reputation: 37

Reference in a parameters file of an ARM template

I try to add some tags on the Windows Template with this parameters file of an ARM template. I've seen this post Arm template reference but I cant make it work.

The return value is this [parameters('imageVersionNumber')] instead of 21.10.1802.

    {
      "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "imageVersionNumber": {
            "value": "21.10.1802"
        },
        "imageTemplateTags":{
            "value": {
                "imagebuilderTemplate": "win7",
                "Environment": "Dev",
                "Owner": "Someone",
                "Description": "Some description",
                "userIdentity":"enabled",
                "version": "[parameters('imageVersionNumber')]"
          }
        }
      }
    }

Upvotes: 0

Views: 675

Answers (1)

Nadine Raiss
Nadine Raiss

Reputation: 641

You need to define parameters like the following:

"parameters": {
 "imageVersionNumber": {
    "type": "string",
    "defaultValue": "21.10.1802",
    "metadata": {
      "description": "Image version number"
    }     
  }
}

Upvotes: 1

Related Questions