Open MWL88 opened 4 years ago
@StephenWeatherford Can you think of a reason why the validation in the ARM tools extension is suggesting "etag" and then rejecting it once it's entered? Is it possible we're falling back to the generic resource definition at this point rather than validating against Microsoft.Network/dnsZones
?
@apclouds We'll need to discuss the required properties
field with the Network team - if it's not a requirement then we'll need them to adjust their schema generation to take this into account. They're not onboarded for automatic generation.
Hello @armleads-azure, @apclouds, @anthony-c-martin, @jorgecotillo! It looks like there is a schemas issue that needs your attention. Please investigate and confirm it is on your end. Thanks :smile:
The field of possible top-level properties under a resource node is fixed, right (https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-syntax#resources)? @jorgecotillo's template validation code checks against this static list, I think.
The completion comes from the schemas only, so this would suggest the resource schema incorrectly specifies "etag" as a property. Can you verify?
@anthony-c-martin Indeed the dnszones schema has an etag property:
{
"id": "https://schema.management.azure.com/schemas/2018-05-01/Microsoft.Network.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Microsoft.Network",
"description": "Microsoft Network Resource Types",
"resourceDefinitions": {
"dnsZones": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Microsoft.Network/dnsZones"
]
},
"apiVersion": {
"type": "string",
"enum": [
"2018-05-01"
]
},
"location": {
"type": "string",
"description": "Resource location."
},
"tags": {
...
"description": "Resource tags."
},
"etag": { <<<<<<<<<<<<<<<<<<<<<
"type": "string",
"description": "The etag of the zone."
},
But the documentation says nothing about it: https://docs.microsoft.com/en-us/azure/templates/microsoft.network/2018-05-01/dnszones
When adding a
Microsoft.Network/dnszones
resource to a template in VS Code the tooling offersetag
as an available property:I am not sure when it would make sense to supply an
etag
in an ARM template ... but if I add anetag
property VS Code says the template validation failed:I assume the
etag
property should not be present in the ARM template schema and not suggested by VS Code.Why is the
properties
property required? It does not have any child properties that are marked as required and it is not required to successfully deploy a DNS zone: