Reputation: 1495
As a POC I'm trying to connect my VM machine with Azure SQL Database using private endpoint. I've tried the tutorial found here: https://learn.microsoft.com/en-us/azure/private-link/create-private-endpoint-portal however I'm stuck at new private endpoint step.
Please look at the following screen:
the "Resource type" dropdown those not show any items
If I change the "Connection method" to "Connect to an Azure resource by resource ID or alias' and put the resource id of my sql server: /subscriptions/1efd84d6-173f-42cc-80db-7b2c17eb0edd/resourceGroups/eu_poland_general/providers/Microsoft.Sql/servers/plink-sql-server , I'm getting The resource type 'Microsoft.Sql/servers' is not a supported resource type. error:
I was able to overcome this issue with different approach. These are steps I've made
At this point I've tried to connect to this database from VM I've created using the private address that was created by step 5.
I could not connect to database using private address (10.0.2.5), however I was able to connect to the sql server using the public address plink-sql-server.database.windows.net
I've also try to call nslookup on the server to see if the result are similar to the tutorial that I've mentioned at the beginning of this post however my answers are slightly different:
Anybody knows what is going on?
Upvotes: 0
Views: 4447
Reputation: 521
For the first issue, the manual case uses the resource types from the dropdown to validate that the ID you gave in the manual scenario is one of those types. Since your resource type dropdown was empty, it probably wasn't going to like any ids you put in the manual case.
For the second issue, make sure the vnet the private endpoint is associated to is linked to a private DNS zone named privatelink.database.windows.net with an A record named plink-sql-server that points to the private ip. Also make sure you are trying to access the endpoint from the VM that is attached to the network interface created with the private endpoint.
Upvotes: 0
Reputation: 28274
Following that document, I can create a private endpoint for the Azure SQL server.
Please note that
Private endpoint(s) are not permitted in conjunction with service endpoints in the same subnet!
If you have subnet enabled service endpoints, you can remove it or create another subnet for your VM.
For a test, I create all resources VM, SQL Server, etc are in the same region as the below steps:
mysubnet
without any service endpoints
enabled.Upvotes: 0