Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.24k stars 3.84k forks source link

Set-AzVirtualNetworkSubnetConfig doesn't work with ServiceEndpoints #8735

Open ChristopherGLewis opened 5 years ago

ChristopherGLewis commented 5 years ago

Description

Set-AzVirtualNetworkSubnetConfig doesn't work with ServiceEndpoints - it tries to send 'Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint' as a string, not a type.

All examples show adding a service endpoint as a string ('Microsoft.Storage') but the behind object is a PSServiceENdpoint that is a Service and Location array.

ProvisioningState Service       Locations       
----------------- -------       ---------       
                  Microsoft.SQL {EastUS, WestUS}

Steps to reproduce

$rg = 'networkRG'
$vnetName = 'vnet01'
$vnet = Get-AzVirtualNetwork  -ResourceGroupName $rg -name $vnetName
$SNConfig = Get-AzureRmVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name 'subnet01'

$ServiceEndPoints = New-Object 'System.Collections.Generic.List[Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]'
$ServiceEndPoint = [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]::new()
$ServiceEndPoint.Service = "Microsoft.Storage"
$ServiceEndPoint.Locations = @("EastUS","WestUS")
$ServiceEndPoints.Add($ServiceEndPoint)

Set-AzureRmVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $SNConfig.Name `
                    -AddressPrefix $SNConfig.AddressPrefix -ServiceEndpoint $ServiceEndPoints

Set-AzureRmVirtualNetwork -VirtualNetwork $vnet 
Set-AzureRmVirtualNetwork : Cannot parse the request.
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : '0b2dffc0-ebc2-4415-9b30-20211e66c4da'
At line:1 char:5
+     Set-AzureRmVirtualNetwork -VirtualNetwork $vnet -Debug
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Set-AzVirtualNetwork], NetworkCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.SetAzureVirtualNetworkCommand

Note that I can set the ServiceEndpoints by bypassing Set-AzVirtualNetworkSubnetConfig

$rg = 'networkRG'
$vnetName = 'vnet01'
$vnet = Get-AzVirtualNetwork  -ResourceGroupName $rg -name $vnetName
$vnet.Subnets.Where({$_.name -eq 'subnet01'})[0].serviceendpoints = $ServiceEndPoints
Set-AzureRmVirtualNetwork -VirtualNetwork $vnet 

Environment data

Name                           Value                                                                                                          
----                           -----                                                                                                          
PSVersion                      5.1.17763.316                                                                                                  
PSEdition                      Desktop                                                                                                        
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                        
BuildVersion                   10.0.17763.316                                                                                                 
CLRVersion                     4.0.30319.42000                                                                                                
WSManStackVersion              3.0                                                                                                            
PSRemotingProtocolVersion      2.3                                                                                                            
SerializationVersion           1.1.0.1    

Module versions

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.3.0      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzCont...
Script     1.0.1      Az.Aks                              {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredential...}
Script     1.0.2      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesSe...
Script     1.0.0      Az.ApiManagement                    {Add-AzApiManagementRegion, Get-AzApiManagementSsoToken, New-AzApiManagementCustomHostnameCo...
Script     1.0.0      Az.ApplicationInsights              {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Set-AzA...
Script     1.1.1      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJo...
Script     1.0.0      Az.Batch                            {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAccountKeys, New-AzBatchAccount...}
Script     1.0.0      Az.Billing                          {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollmentAccount, Get-AzConsumptionBudget...
Script     1.0.1      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}
Script     1.0.1      Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesA...
Script     1.4.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabili...
Script     1.0.0      Az.ContainerInstance                {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerInstanc...
Script     1.0.1      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzCont...
Script     1.0.1      Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script     1.0.0      Az.DataLakeAnalytics                {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalyticsCatalogCredential, Remove-AzDataL...
Script     1.1.0      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDat...
Script     1.0.0      Az.DevTestLabs                      {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolicy, Get-AzDtlAutoStartPolicy, Get-A...
Script     1.0.0      Az.Dns                              {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRecordSet, Set-AzDnsRecordSet...}
Script     1.1.0      Az.EventGrid                        {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...}
Script     1.0.1      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHu...
Script     1.0.0      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsight...
Script     1.0.2      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIot...
Script     1.0.2      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperatio...
Script     1.2.0      Az.LogicApp                         {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountAssembly, Get-AzIntegrationAccou...
Script     1.0.0      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageH...
Script     1.0.0      Az.MarketplaceOrdering              {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
Script     1.0.0      Az.Media                            {Sync-AzMediaServiceStorageKeys, Set-AzMediaServiceKey, Get-AzMediaServiceKeys, Get-AzMediaS...
Script     1.0.1      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}
Script     1.2.1      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCe...
Script     1.0.0      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRules, Get-AzNotificationHubListKe...
Script     1.1.0      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogData...
Script     1.0.0      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}
Script     1.0.0      Az.PowerBIEmbedded                  {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspa...
Script     1.0.1      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVa...
Script     1.0.0      Az.RedisCache                       {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheScheduleEntry, Get-AzRedisCachePatchSched...
Script     1.0.0      Az.Relay                            {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNamespace, Remove-AzRelayNamespace...}
Script     1.1.3      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignmen...
Script     1.0.0      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzS...
Script     1.0.1      Az.ServiceFabric                    {Add-AzServiceFabricApplicationCertificate, Add-AzServiceFabricClientCertificate, Add-AzServ...
Script     1.0.2      Az.SignalR                          {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...}
Script     1.3.0      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActiv...
Script     1.0.2      Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKe...
Script     1.0.0      Az.StreamAnalytics                  {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefaultFunctionDefinition, New-AzStream...
Script     1.0.1      Az.TrafficManager                   {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint...
Script     1.1.1      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}

Debug output

 Set-AzureRmVirtualNetwork -VirtualNetwork $vnet -Debug

DEBUG: 9:00:10 PM - SetAzureVirtualNetworkCommand begin processing with ParameterSet '__AllParameterSets'. DEBUG: 9:00:11 PM - using account id 'CLewis@3cloudsolutions.com'... DEBUG: [Common.Authentication]: Authenticating using Account: 'CLewis@3cloudsolutions.com', environment: 'AzureCloud', tenant: '0c7b2a3d-9015-4 503-80e7-5c617cbf7d55' DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: GET

Absolute Uri: https://management.azure.com/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtual Networks/npduseavnet01?api-version=2018-11-01

Headers: x-ms-client-request-id : 884e924a-3b8e-4530-a5be-1885fa1e3a3b accept-language : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code: OK

Headers: Pragma : no-cache x-ms-request-id : 0aab0779-2df5-4e26-bc9b-87e8a42cec3a x-ms-correlation-request-id : 5adfac34-3076-40e3-ac91-c7154740438e Strict-Transport-Security : max-age=31536000; includeSubDomains Cache-Control : no-cache ETag : W/"a8a1558e-f829-484c-a7aa-293d85ae07e9" Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0 x-ms-ratelimit-remaining-subscription-reads: 11999 x-ms-routing-request-id : NORTHCENTRALUS:20190309T030015Z:5adfac34-3076-40e3-ac91-c7154740438e X-Content-Type-Options : nosniff Date : Sat, 09 Mar 2019 03:00:14 GMT

Body: { "name": "npduseavnet01", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npduseavne t01", "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "type": "Microsoft.Network/virtualNetworks", "location": "eastus", "tags": { "CreatedBy": "CLewis@3cloudsolutions.com", "CreatedDate": "03/08/19", "NS_Location": "USEA - US East", "NS_Application": "NET - Network Resources", "NS_Environment": "NPD - NonProduction" }, "properties": { "provisioningState": "Succeeded", "resourceGuid": "d95bcfbb-26cd-4cc7-8996-ff441d1e1eea", "addressSpace": { "addressPrefixes": [ "10.212.0.0/16" ] }, "dhcpOptions": { "dnsServers": [] }, "subnets": [ { "name": "subnet01", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npdu seavnet01/subnets/subnet01", "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "properties": { "provisioningState": "Succeeded", "addressPrefix": "10.212.128.0/20", "networkSecurityGroup": { "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityG roups/subnet01nsg" }, "routeTable": { "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/routeTables/apps n01route" }, "serviceEndpoints": [], "delegations": [] }, "type": "Microsoft.Network/virtualNetworks/subnets" } ], "virtualNetworkPeerings": [], "enableDdosProtection": false, "enableVmProtection": false } }

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: PUT

Absolute Uri: https://management.azure.com/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtual Networks/npduseavnet01?api-version=2018-11-01

Headers: x-ms-client-request-id : 6d75e633-c79f-465c-aa0b-dbdc34ad76ef accept-language : en-US

Body: { "properties": { "addressSpace": { "addressPrefixes": [ "10.212.0.0/16" ] }, "dhcpOptions": { "dnsServers": [] }, "subnets": [ { "properties": { "addressPrefix": "10.212.112.0/20", "addressPrefixes": [], "networkSecurityGroup": { "properties": { "securityRules": [], "defaultSecurityRules": [] }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityG roups/trusn01nsg", "tags": {} }, "routeTable": { "properties": { "routes": [], "disableBgpRoutePropagation": false }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/routeTables/trus n01route", "tags": {} }, "serviceEndpoints": [], "serviceEndpointPolicies": [], "resourceNavigationLinks": [], "serviceAssociationLinks": [], "delegations": [], "provisioningState": "Succeeded" }, "name": "trusn01", "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npdu seavnet01/subnets/trusn01" }, { "properties": { "addressPrefix": "10.212.32.0/20", "addressPrefixes": [], "networkSecurityGroup": { "properties": { "securityRules": [], "defaultSecurityRules": [] }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityG roups/mgtsn01nsg", "tags": {} }, "routeTable": { "properties": { "routes": [], "disableBgpRoutePropagation": false }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/routeTables/mgts n01route", "tags": {} }, "serviceEndpoints": [], "serviceEndpointPolicies": [], "resourceNavigationLinks": [], "serviceAssociationLinks": [], "delegations": [], "provisioningState": "Succeeded" }, "name": "mgtsn01", "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npdu seavnet01/subnets/mgtsn01" }, { "properties": { "addressPrefix": "10.212.48.0/20", "addressPrefixes": [], "networkSecurityGroup": { "properties": { "securityRules": [], "defaultSecurityRules": [] }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityG roups/dmzsn01nsg", "tags": {} }, "routeTable": { "properties": { "routes": [], "disableBgpRoutePropagation": false }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/routeTables/dmzs n01route", "tags": {} }, "serviceEndpoints": [], "serviceEndpointPolicies": [], "resourceNavigationLinks": [], "serviceAssociationLinks": [], "delegations": [], "provisioningState": "Succeeded" }, "name": "dmzsn01", "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npdu seavnet01/subnets/dmzsn01" }, { "properties": { "addressPrefix": "10.212.160.0/20", "addressPrefixes": [], "networkSecurityGroup": { "properties": { "securityRules": [], "defaultSecurityRules": [] }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityG roups/asesn01nsg", "tags": {} }, "routeTable": { "properties": { "routes": [], "disableBgpRoutePropagation": false }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/routeTables/ases n01route", "tags": {} }, "serviceEndpoints": [], "serviceEndpointPolicies": [], "resourceNavigationLinks": [], "serviceAssociationLinks": [], "delegations": [], "provisioningState": "Succeeded" }, "name": "asesn01", "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npdu seavnet01/subnets/asesn01" }, { "properties": { "addressPrefix": "10.212.144.0/20", "addressPrefixes": [], "networkSecurityGroup": { "properties": { "securityRules": [], "defaultSecurityRules": [] }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityG roups/sqlsn01nsg", "tags": {} }, "routeTable": { "properties": { "routes": [], "disableBgpRoutePropagation": false }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/routeTables/sqls n01route", "tags": {} }, "serviceEndpoints": [], "serviceEndpointPolicies": [], "resourceNavigationLinks": [], "serviceAssociationLinks": [], "delegations": [], "provisioningState": "Succeeded" }, "name": "sqlsn01", "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npdu seavnet01/subnets/sqlsn01" }, { "properties": { "addressPrefix": "10.212.0.240/28", "addressPrefixes": [], "routeTable": { "properties": { "routes": [], "disableBgpRoutePropagation": false }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/routeTables/Gate waySubnetroute", "tags": {} }, "serviceEndpoints": [], "serviceEndpointPolicies": [], "resourceNavigationLinks": [], "serviceAssociationLinks": [], "delegations": [], "provisioningState": "Succeeded" }, "name": "GatewaySubnet", "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npdu seavnet01/subnets/GatewaySubnet" }, { "properties": { "addressPrefix": "10.212.128.0/20", "addressPrefixes": [], "networkSecurityGroup": { "properties": { "securityRules": [], "defaultSecurityRules": [] }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityG roups/subnet01nsg", "tags": {} }, "routeTable": { "properties": { "routes": [], "disableBgpRoutePropagation": false }, "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/routeTables/apps n01route", "tags": {} }, "serviceEndpoints": [ { "service": "Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint", "locations": [] }, { "service": "Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint", "locations": [] } ], "serviceEndpointPolicies": [], "resourceNavigationLinks": [], "serviceAssociationLinks": [], "delegations": [], "provisioningState": "Succeeded" }, "name": "subnet01", "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npdu seavnet01/subnets/subnet01" } ], "virtualNetworkPeerings": [], "resourceGuid": "d95bcfbb-26cd-4cc7-8996-ff441d1e1eea", "provisioningState": "Succeeded", "enableDdosProtection": false }, "etag": "W/\"a8a1558e-f829-484c-a7aa-293d85ae07e9\"", "id": "/subscriptions/53218f64-9d8e-40d9-9bcb-c03e038a134a/resourceGroups/networkRG/providers/Microsoft.Network/virtualNetworks/npduseavne t01", "location": "eastus", "tags": { "CreatedBy": "CLewis@3cloudsolutions.com", "CreatedDate": "03/08/19", "NS_Location": "USEA - US East", "NS_Application": "NET - Network Resources", "NS_Environment": "NPD - NonProduction" } }

DEBUG: ============================ HTTP RESPONSE ============================

Status Code: BadRequest

Headers: Pragma : no-cache x-ms-request-id : 0b2dffc0-ebc2-4415-9b30-20211e66c4da Strict-Transport-Security : max-age=31536000; includeSubDomains Cache-Control : no-cache Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0 x-ms-ratelimit-remaining-subscription-writes: 1199 x-ms-correlation-request-id : 1730a418-9cea-41e7-b84d-5ea5c701425b x-ms-routing-request-id : NORTHCENTRALUS:20190309T030016Z:1730a418-9cea-41e7-b84d-5ea5c701425b X-Content-Type-Options : nosniff Date : Sat, 09 Mar 2019 03:00:15 GMT

Body: { "error": { "code": "InvalidRequestFormat", "message": "Cannot parse the request.", "details": [] } }

Set-AzureRmVirtualNetwork : Cannot parse the request. StatusCode: 400 ReasonPhrase: Bad Request OperationID : '0b2dffc0-ebc2-4415-9b30-20211e66c4da' At line:1 char:5

DEBUG: AzureQoSEvent: CommandName - Set-AzVirtualNetwork; IsSuccess - False; Duration - 00:00:08.0310332; Exception - Microsoft.Azure.Commands. Network.Common.NetworkCloudException: Cannot parse the request. StatusCode: 400 ReasonPhrase: Bad Request OperationID : '0b2dffc0-ebc2-4415-9b30-20211e66c4da' ---> Microsoft.Rest.Azure.CloudException: Cannot parse the request. at Microsoft.Azure.Management.Network.VirtualNetworksOperations.d14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Network.VirtualNetworksOperations.d7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Network.VirtualNetworksOperationsExtensions.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.Network.VirtualNetworksOperationsExtensions.CreateOrUpdate(IVirtualNetworksOperations operations, String resou rceGroupName, String virtualNetworkName, VirtualNetwork parameters) at Microsoft.Azure.Commands.Network.SetAzureVirtualNetworkCommand.Execute() at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet() --- End of inner exception stack trace --- at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord(); DEBUG: Finish sending metric. DEBUG: 9:00:19 PM - SetAzureVirtualNetworkCommand end processing. DEBUG: 9:00:19 PM - SetAzureVirtualNetworkCommand end processing.

Error output

PS C:\VSProjects\RevSprings-ARSF\SubnetServiceEndpoints> Resolve-AzureRmError

   HistoryId: 18

RequestId      : 
Message        : Cannot parse the request.
                 StatusCode: 400
                 ReasonPhrase: Bad Request
                 OperationID : '0b2dffc0-ebc2-4415-9b30-20211e66c4da'
ServerMessage  : 
ServerResponse : 
RequestMessage : 
InvocationInfo : {Set-AzVirtualNetwork}
Line           :     Set-AzureRmVirtualNetwork -VirtualNetwork $vnet -Debug
Position       : At line:1 char:5
                 +     Set-AzureRmVirtualNetwork -VirtualNetwork $vnet -Debug
                 +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 18

   HistoryId: 10

RequestId      : 
Message        : Cannot parse the request.
                 StatusCode: 400
                 ReasonPhrase: Bad Request
                 OperationID : 'f74a292a-02cf-4836-bf28-aac3ad2ff233'
ServerMessage  : 
ServerResponse : 
RequestMessage : 
InvocationInfo : {Set-AzVirtualNetwork}
Line           :     Set-AzureRmVirtualNetwork -VirtualNetwork $vnet 

Position       : At line:9 char:5
                 +     Set-AzureRmVirtualNetwork -VirtualNetwork $vnet
                 +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 10

   HistoryId: -1

Message        : You cannot call a method on a null-valued expression.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , Object )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoints.Add($ServiceEndPoint)
Position       : At line:14 char:1
                 + $ServiceEndPoints.Add($ServiceEndPoint)
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : The property 'Locations' cannot be found on this object. Verify that the property exists and can be set.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , Object[] )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint.Locations = @("EastUS","WestUS")

Position       : At line:13 char:1
                 + $ServiceEndPoint.Locations = @("EastUS","WestUS")
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : The property 'Service' cannot be found on this object. Verify that the property exists and can be set.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , String )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint.Service = "Microsoft.Storage"

Position       : At line:12 char:1
                 + $ServiceEndPoint.Service = "Microsoft.Storage"
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : Unable to find type [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint].
StackTrace     :    at System.Management.Automation.TypeOps.ResolveTypeName(ITypeName typeName, IScriptExtent errorPos)
                    at System.Management.Automation.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint = [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]::new()

Position       : At line:11 char:20
                 + ... eEndPoint = [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoin ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : You cannot call a method on a null-valued expression.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , Object )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoints.Add($ServiceEndPoint)

Position       : At line:10 char:1
                 + $ServiceEndPoints.Add($ServiceEndPoint)
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : The property 'Locations' cannot be found on this object. Verify that the property exists and can be set.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , Object[] )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint.Locations = @("EastUS","WestUS")

Position       : At line:9 char:1
                 + $ServiceEndPoint.Locations = @("EastUS","WestUS")
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : The property 'Service' cannot be found on this object. Verify that the property exists and can be set.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , String )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint.Service = "Microsoft.SQL"

Position       : At line:8 char:1
                 + $ServiceEndPoint.Service = "Microsoft.SQL"
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : Unable to find type [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint].
StackTrace     :    at System.Management.Automation.TypeOps.ResolveTypeName(ITypeName typeName, IScriptExtent errorPos)
                    at System.Management.Automation.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint = [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]::new()

Position       : At line:7 char:20
                 + ... eEndPoint = [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoin ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

   HistoryId: 6

Message        : Cannot find type [System.Collections.Generic.List[Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]]: verify that 
                 the assembly containing this type is loaded.
StackTrace     :    at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
Exception      : System.Management.Automation.PSArgumentException
InvocationInfo : {New-Object}
Line           : $ServiceEndPoints = New-Object 'System.Collections.Generic.List[Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]'

Position       : At line:6 char:21
                 + ... EndPoints = New-Object 'System.Collections.Generic.List[Microsoft.Azu ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 6

   HistoryId: -1

Message        : You cannot call a method on a null-valued expression.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , Object )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoints.Add($ServiceEndPoint)
Position       : At line:14 char:1
                 + $ServiceEndPoints.Add($ServiceEndPoint)
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : The property 'Locations' cannot be found on this object. Verify that the property exists and can be set.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , Object[] )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint.Locations = @("EastUS","WestUS")

Position       : At line:13 char:1
                 + $ServiceEndPoint.Locations = @("EastUS","WestUS")
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : The property 'Service' cannot be found on this object. Verify that the property exists and can be set.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , String )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint.Service = "Microsoft.Storage"

Position       : At line:12 char:1
                 + $ServiceEndPoint.Service = "Microsoft.Storage"
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : Unable to find type [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint].
StackTrace     :    at System.Management.Automation.TypeOps.ResolveTypeName(ITypeName typeName, IScriptExtent errorPos)
                    at System.Management.Automation.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint = [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]::new()

Position       : At line:11 char:20
                 + ... eEndPoint = [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoin ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : You cannot call a method on a null-valued expression.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , Object )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoints.Add($ServiceEndPoint)

Position       : At line:10 char:1
                 + $ServiceEndPoints.Add($ServiceEndPoint)
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : The property 'Locations' cannot be found on this object. Verify that the property exists and can be set.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , Object[] )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint.Locations = @("EastUS","WestUS")

Position       : At line:9 char:1
                 + $ServiceEndPoint.Locations = @("EastUS","WestUS")
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : The property 'Service' cannot be found on this object. Verify that the property exists and can be set.
StackTrace     :    at CallSite.Target(Closure , CallSite , Object , String )
                    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
                    at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint.Service = "Microsoft.SQL"

Position       : At line:8 char:1
                 + $ServiceEndPoint.Service = "Microsoft.SQL"
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : Unable to find type [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint].
StackTrace     :    at System.Management.Automation.TypeOps.ResolveTypeName(ITypeName typeName, IScriptExtent errorPos)
                    at System.Management.Automation.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           : $ServiceEndPoint = [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]::new()

Position       : At line:7 char:20
                 + ... eEndPoint = [Microsoft.Azure.Commands.Network.Models.PSServiceEndpoin ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

   HistoryId: 2

Message        : Cannot find type [System.Collections.Generic.List[Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]]: verify that 
                 the assembly containing this type is loaded.
StackTrace     :    at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
Exception      : System.Management.Automation.PSArgumentException
InvocationInfo : {New-Object}
Line           : $ServiceEndPoints = New-Object 'System.Collections.Generic.List[Microsoft.Azure.Commands.Network.Models.PSServiceEndpoint]'

Position       : At line:6 char:21
                 + ... EndPoints = New-Object 'System.Collections.Generic.List[Microsoft.Azu ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 2
markcowl commented 5 years ago

@avijitgupta @chandrasekarsrinivasan Can you take a look?

ChristopherGLewis commented 5 years ago

This is only somewhat fixed - you can pass in an array of service endpoints

$serviceEndpoints = @("Microsoft.Sql","Microsoft.Storage")
Set-AzureRmVirtualNetworkSubnetConfig -Name $subnet.subnetName -VirtualNetwork $vnetObject -AddressPrefix $currentSubnetConfig.AddressPrefix -ServiceEndpoint $serviceEndpoints

but not the location

allegradomel commented 4 years ago

@ChristopherGLewis, Thank you for your patience - I'm looking into the issue and will update soon.

Am018 commented 4 years ago

Assigning to ServiceEndpoint owner

allegradomel commented 4 years ago

@ajinkyapotdarvjti can you weigh in on this?

rtaylor72 commented 4 years ago

Also, when I set -ServiceEndpoint on "Add-AzVirtualNetworkSubnetConfig" to an empty string array "@()", I get an error when running Set-AzVirtualNetwork:

Subnet has an item in ServiceEndpoints array with invalid service name ''.

viswanathtr commented 4 years ago

I have a similar issue

`$vnName = "dbvnet" $sname = "default" $subnetPrefix = "10.2.0.0/24" $resourcegroupname = "Temp"

Get-AzurermVirtualNetwork -ResourceGroupName $resourcegroupname -Name $vnName | Set-AzurermVirtualNetworkSubnetConfig -Name $sname -AddressPrefix $subnetPrefix -ServiceEndpoint "Microsoft.AzureCosmosDB" | Set-AzurermVirtualNetwork

I authenticate using Service Principal and this code creates the service endpoint when I execute it from my local machine. The same code if run on a azure DevOps pipeline, it fails with the below error

image

I have tried installing running Install-Module -Name AzureRM.Network -RequiredVersion 5.4.2. This does not help either.

Any guidance on this ?

allegradomel commented 4 years ago

@viswanathtr, @rtaylor72 are you still experiencing the same issues? Assigning @sumeetmittal to take a look

rtaylor72 commented 4 years ago

@allegradomel , has a new version been deployed since then? Should be easy to test since the error appears when that one property is set to an empty array.

mialtamo commented 3 years ago

@allegradomel this still does not work. attempting to run Set-AzVirtualNetworkSubnetConfig -name $vnetSub.name -VirtualNetwork $vnet -ServiceEndpoint $serviceEndPoints -AddressPrefix $vnetSub.AddressPrefix wont error out anymore and running a get command shows the service endpoint was added, but not accurately and isn't reflected in the portal anywhere either.

ChristopherGLewis commented 2 years ago

This bug is over two years old - @allegradomel @Am018 any updates on this?

alexangas commented 1 year ago

Experiencing the same issue and was surprised to find this issue open for so long. Is anyone able to get this resolved please @allegradomel @sumeetmittal