0
votes

I have a build which is hosted by Visual Studio Team Services (was Visual Studio Online). The build runs unit tests which require access to SQL Server (Azure VM).

The build works if the ACL settings on the VM are completely open, however I would like to restrict access just to the ips used by Visual Studio Team Services. Is there an ip range used by visual studio online hosted builds?

2

2 Answers

1
votes

Unfortunately no. I've asked before for similar reasons and the answer I got was they can't guarantee any kind of IP range.

0
votes

Have a look at the following github repo: https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/SqlAzureDacpacDeployment/DeploySqlAzure.ps1

Line 83

> ipAddress = Get-AgentIPAddress -startIPAddress $StartIpAddress -endIPAddress $EndIpAddress -ipDetectionMethod $IpDetectionMethod -taskContext $distributedTaskContext

While the official answer to your question is no, you might be able to find some clues in this VSTS task on how to build a custom task that opens the firewall, performs and operation, and then closes it.