I create azure SQL servers using the Azure Management Libraries for .Net and I need to add a firewall rule to allow Azure Services to access the new server (like the switch in the portal). I currently create the server like this
sqlServer = Azure.SqlServers
.Define(serverName)
.WithRegion(region)
.WithExistingResourceGroup(resourceGroup.Name)
.WithAdministratorLogin(AppSettings.SqlServerAdminUser)
.WithAdministratorPassword(AppSettings.SqlServerAdminPassword)
.WithNewFirewallRule("xxx.xxx.xxx.xxx")
.WithNewFirewallRule("xxx.xxx.xxx.xxx", "xxx.xxx.xxx.xxx")
.WithNewElasticPool(poolName, elasticPoolEdition, databaseName)
.Create();
Is there any option I did not find to generally allow Azure services to access this SQL server?
Thank you!