Home > Software engineering >  Multiple IP address variable in Azure ARM Template
Multiple IP address variable in Azure ARM Template

Time:01-21

If I am using an ARM Template to create an IP Group within Azure and want to add Multiple IP Addresses as a Parameter rather than putting them in the body of the resource is this possible?

The template is as follows

{
  "type": "Microsoft.Network/ipGroups",
  "apiVersion": "2021-05-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "ipAddresses": [ "10.10.10.10",
      "10.10.10.11" ]
  }
}

If I create a Parameter like the following

        "ipgipaddress": {
            "type": "string
            "Value": 
                "10.10.10.10",
                "10.10.10.11"
        }

And update the code to

{
  "type": "Microsoft.Network/ipGroups",
  "apiVersion": "2021-05-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "ipAddresses": "[parameters('ipgroupsettings')]"
  }
}

CodePudding user response:

want to add Multiple IP Addresses as a Parameter rather than putting them in the body of the resource is this possible?

Yes it is possible, you can add Multiple IP Addresses as a Parameter. As per the enter image description here

  •  Tags:  
  • Related