The "prepareSubnet" PowerShell script from https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/manage/azure-sql-db-managed-instance/prepare-subnet/prepareSubnet.ps1 tests a number of configuration points including the necessary Route Table. Whilst testing the Route Table, if anything's missing it can create it, otherwise it provides a positive validation result.
When we ran it on an existing vNet, Subnet, and Route Table, where it it passed the validation test.
Following this we ran our SQL MI deployment which failed with the following error:
It transpired that the required 0.0.0.0/0 was the only route we'd got in place, meaning that our deployment was failing because we'd not got a route passing the SQL MI's Subnet Traffic on to the vNet.
See the route entitled subnet_to_vnetlocal here: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance-connectivity-architecture#user-defined-routes
If possible, I think it would be useful to both:
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@AndyHerb
Thanks for your feedback! We will investigate and update as appropriate.
@AndyHerb Did you happen upon the following step to prepare your subnet before the adding a Managed Instance? Validate and modify an existing virtual network (link)
The PS script you referenced is already part of a document. It appears you stumbled upon the GitHub repo without the document explaining that this needs to be run beforhand.
Hi @Mike-Ubezzi-MSFT - the link you supplied was the original document we were working from, I simply linked directly to the source PS1 file that document references. That's the one we ran as-per the doc you linked to, which gave us a false-positive outcome on the Route Table. The SQL MI creation failed with the supplied error message (which wasn't as helpful as it could be because it doesn't point to specifically what's missing) so I wanted to bring this to your attention as it could save people time if:
Hope that helps clarify,
Andy
@AndyHerb Perfect! I am going to forward this on to the content owner to be evaluated and updated as necessary.
@srdan-bozovic-msft @CarlRabeler For your awareness. Please let me know if there are additional actions required on my behalf. Thank you!
@stevestein for awareness
the script is fixed in the meantime
@AndyHerb We will now proceed to close this thread. If there are further questions regarding this matter, please comment and we will gladly continue the discussion.
Most helpful comment
Hi @Mike-Ubezzi-MSFT - the link you supplied was the original document we were working from, I simply linked directly to the source PS1 file that document references. That's the one we ran as-per the doc you linked to, which gave us a false-positive outcome on the Route Table. The SQL MI creation failed with the supplied error message (which wasn't as helpful as it could be because it doesn't point to specifically what's missing) so I wanted to bring this to your attention as it could save people time if:
Hope that helps clarify,
Andy