-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
- Package Name: azure.mgmt.sql
- Package Version: 0.23 and 0.24
- Operating System: Mac/Linux
- Python Version: 3.7/3.8
Describe the bug
The VirtualNetworkRule creation seems to consistently fail due to incorrect virtual_network_subnet_id validation.
Always fails with LinkedInvalidPropertyId when attempting to create a VirtualNetworkRule on an Sql server. I tried several permutations of the virtual_network_subnet_id (e.g. /subscription/..., /providers/...) with and without trailing '/' on the subnet id.
The error appears to come from azure/mgmt/sql/operations/_virtual_network_rules_operations.py:206
E msrestazure.azure_exceptions.CloudError: Azure Error: LinkedInvalidPropertyId
E Message: Property id '{'virtual_network_subnet_id': '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/'}' at path 'properties.virtualNetworkSubnetId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
To Reproduce
Steps to reproduce the behavior:
- Create resource group
- Create virtual network with a subnet (with or without a Microsoft.Sql ServiceEndpoint)
- Create an Sql server
- Attempt to add a VirtualNetworkRule to the server using the SDK
Expected behavior
I was expecting that I would be able to create a VirtualNetworkRule on the server, similar to the way that I can do it from the GUI.
Screenshots
NA
Additional context
A couple things I noticed:
- API version seems old
- GUI seems to show a subnet address range when creating a VirtualNetworkRule.