Cannot update tags on existing resource of type Microsoft.Network/publicIPAddresses
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
I have an existing resource of type Microsoft.Network/publicIPAddresses. I'm trying to update its tags. The operation fails with an unrelated error.
> ERROR: Resource /subscriptions/xxx/resourceGroups/yyy/providers/Microsoft.Network/publicIPAddresses/zzz has an existing availability zone constraint 1, 2, 3 and the request has availability zone constraint NoZone, which do not match. Zones cannot be added/updated/removed once the resource is created. The resource cannot be updated from regional to zonal or vice-versa.
**To Reproduce**
Resource looks like:
```
{
"etag": "W/\"dc92c146-fcef-4457-88cd-7a8feb067044\"",
"id": "/subscriptions/xxx/resourceGroups/yyy/providers/Microsoft.Network/publicIPAddresses/zzz",
"identity": null,
"kind": null,
"location": "westus2",
"managedBy": null,
"name": "zzz",
"plan": null,
"properties": {
"dnsSettings": {
"domainNameLabel": "blah",
"fqdn": "blah.westus2.cloudapp.azure.com"
},
"idleTimeoutInMinutes": 4,
"ipAddress": "1.2.3.4",
"ipConfiguration": {
"id": "/subscriptions/xxx/resourceGroups/yyy/providers/Microsoft.Network/loadBalancers/kubernetes/frontendIPConfigurations/ac73e065675454458a4b08efd38a7880",
"resourceGroup": "yyy"
},
"ipTags": [],
"provisioningState": "Succeeded",
"publicIPAddressVersion": "IPv4",
"publicIPAllocationMethod": "Static",
"resourceGuid": "qweasd"
},
"resourceGroup": "yyy",
"sku": {
"capacity": null,
"family": null,
"model": null,
"name": "Standard",
"size": null,
"tier": "Regional"
},
"tags": {
"blah": "blah",
"qwe": "asd",
"asd": "zxc"
},
"type": "Microsoft.Network/publicIPAddresses",
"zones": [
"1",
"2",
"3"
]
}
```
Command to update tags:
`az resource tag --ids /subscriptions/xxx/resourceGroups/yyy/providers/Microsoft.Network/publicIPAddresses/zzz --tags blah=blah qwe=asd asd=zxc new=tag`
**Expected behavior**
Tags must be updated without issues, since the change doesn't affect any other properties of the resource.
**Environment summary**
Azure Cloud Shell
```
{
"azure-cli": "2.23.0",
"azure-cli-core": "2.23.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"ai-examples": "0.2.5",
"aks-preview": "0.5.10",
"front-door": "1.0.14",
"resource-graph": "1.1.0",
"ssh": "0.1.5"
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.