From f672d371d6ded9e3a045ec6260fd8f90c5a84439 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 5 Mar 2024 17:12:32 +0800 Subject: [PATCH 1/6] add 'privateDnsZoneId' to ServiceResource.properties.vnetAddons --- .../preview/2024-05-01-preview/appplatform.json | 4 ++++ .../Services_CreateOrUpdate_VNetInjection.json | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/appplatform.json index be61e437565b..c50ea0775fd8 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/appplatform.json @@ -10997,6 +10997,10 @@ "name": "PrivateLinkState", "modelAsString": true } + }, + "privateDnsZoneId": { + "description": "Fully qualified resource Id of the Private DNS zone to link with the customer virtual network.", + "type": "string" } } }, diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json index 21e716026e8a..eed165ff7955 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json @@ -15,7 +15,8 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled" + "privateLinkState": "Enabled", + "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" } }, "sku": { @@ -84,7 +85,8 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled" + "privateLinkState": "Enabled", + "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -162,7 +164,8 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled" + "privateLinkState": "Enabled", + "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -240,7 +243,8 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled" + "privateLinkState": "Enabled", + "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, From 9dc54704b0ce5636b62e0e481e950b22d82a1bd7 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 7 Mar 2024 12:44:31 +0800 Subject: [PATCH 2/6] only allow private dns zone id --- .../preview/2024-05-01-preview/appplatform.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/appplatform.json index c50ea0775fd8..eb7f4d9e3505 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/appplatform.json @@ -11000,7 +11000,15 @@ }, "privateDnsZoneId": { "description": "Fully qualified resource Id of the Private DNS zone to link with the customer virtual network.", - "type": "string" + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Network/privateDnsZones" + } + ] + } } } }, From a4b6507d568af57538c491a65ef1b8146c58af3b Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 7 Mar 2024 15:36:39 +0800 Subject: [PATCH 3/6] test empty private dns zone id --- .../examples/Services_CreateOrUpdate_VNetInjection.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json index eed165ff7955..09bce9ed7d68 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json @@ -16,7 +16,7 @@ "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, "privateLinkState": "Enabled", - "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" + "privateDnsZoneId": "" } }, "sku": { @@ -86,7 +86,7 @@ "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, "privateLinkState": "Enabled", - "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" + "privateDnsZoneId": "" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -165,7 +165,7 @@ "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, "privateLinkState": "Enabled", - "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" + "privateDnsZoneId": "" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -244,7 +244,7 @@ "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, "privateLinkState": "Enabled", - "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" + "privateDnsZoneId": "" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, From 222737416d2d9e1ccc4f0dd67edda37c5d12d8db Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Thu, 7 Mar 2024 16:05:05 +0800 Subject: [PATCH 4/6] test null private dns zone id --- .../examples/Services_CreateOrUpdate_VNetInjection.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json index 09bce9ed7d68..54362f8c2857 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json @@ -16,7 +16,7 @@ "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, "privateLinkState": "Enabled", - "privateDnsZoneId": "" + "privateDnsZoneId": null } }, "sku": { @@ -86,7 +86,7 @@ "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, "privateLinkState": "Enabled", - "privateDnsZoneId": "" + "privateDnsZoneId": null }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -165,7 +165,7 @@ "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, "privateLinkState": "Enabled", - "privateDnsZoneId": "" + "privateDnsZoneId": null }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -244,7 +244,7 @@ "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, "privateLinkState": "Enabled", - "privateDnsZoneId": "" + "privateDnsZoneId": null }, "serviceId": "12345678abcd1234abcd12345678abcd" }, From ef4915ca827cbd240ae7db857e3f3421a1155429 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 12 Mar 2024 10:22:05 +0800 Subject: [PATCH 5/6] test null private dns id --- .../examples/Services_CreateOrUpdate_VNetInjection.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json index 54362f8c2857..912edd15768d 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json @@ -85,8 +85,7 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled", - "privateDnsZoneId": null + "privateLinkState": "Enabled" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -164,8 +163,7 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled", - "privateDnsZoneId": null + "privateLinkState": "Enabled" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -243,8 +241,7 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled", - "privateDnsZoneId": null + "privateLinkState": "Enabled" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, From 12d3adf1b4443041eae88ae84d381fb2fb1b8b08 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 12 Mar 2024 11:11:27 +0800 Subject: [PATCH 6/6] add private dns id --- .../Services_CreateOrUpdate_VNetInjection.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json index 912edd15768d..eed165ff7955 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json @@ -16,7 +16,7 @@ "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, "privateLinkState": "Enabled", - "privateDnsZoneId": null + "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" } }, "sku": { @@ -85,7 +85,8 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled" + "privateLinkState": "Enabled", + "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -163,7 +164,8 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled" + "privateLinkState": "Enabled", + "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" }, "serviceId": "12345678abcd1234abcd12345678abcd" }, @@ -241,7 +243,8 @@ "vnetAddons": { "logStreamPublicEndpoint": true, "dataPlanePublicEndpoint": true, - "privateLinkState": "Enabled" + "privateLinkState": "Enabled", + "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone" }, "serviceId": "12345678abcd1234abcd12345678abcd" },