Hi,
I am writing a script to import a bacpac file into my sql server and the only issue I have is that the New-AzSqlDatabaseImport cmdlet fails due to the firewall configuration, which is fine and I expected that.
I then added a firewall rule to allow my client IP to have access, however when I run the cmdlet I still receive the same error but then I notice the IP address referenced in that message is not my outwardly facing IP or the Client IP shown within the Azure
Portal, the message is: -
0: There was an error that occurred during this operation : '<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Error encountered during the service operation. ; Exception Microsoft.SqlServer.Management.Dac.Services.ServiceException:Unable
to authenticate request; Inner exception System.Data.SqlClient.SqlException:Cannot open server &#39;lloyds&#39; requested by the login. Client with IP address &#39;65.52.224.104&#39; is not allowed to access the server.
To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.; </string>'
Where does the reported Client IP come from and how do I retrieve this within my Powershell script to create the necessary rule.
I am creating all resources in my script including the virtual network its subnet and the sql server etc.