AZURE SQL SERVER DB IP ACCESS
Hello, i run into this issue, everytime i deploy my railway backend I get this error
originalError: ConnectionError: Cannot open server 'gastondev' requested by the login. Client with IP address '34.145.12.49' is not allowed to access the server. To enable access, use the 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.
It's pretty clear, so I set up a rule on my azure portal with that IP, the problem is everytime I deploy the ip changes and I have to set up a new rule each time, the only way I get to know the IP is to fail, read the error and then set up the rule.
Is there any way to know de IP beforehand or some way to just avoid this error at all ?
4 Replies
Project ID:
N/A
deployments on railway use a shared dynamic ips, they do not yet offer static ips. the work arounds I can think of would be as follows.
- whitelist all ips
0.0.0.0/0
- whitelist ~26 cidr ranges for the gcp region you run your deployment in https://utilities.up.railway.app/cidr-list?value=us-west1
- run a database on railway instead (best option imo, saves you on egrees fees when you connect to it via the private network)Thanks, i'll look into those solutions
on azure, would it just me a Microsoft SQL server?