We have a storage account that has "Enabled from selected virtual networks and IP addresses", because our security department disallows it from being accessible from the whole internet.
We have a devops deployment that's run on an Azure Pipeline (and we don't want to get a hosted agent).
This deployment fails because of a 403 Forbidden: Creation of storage file share failed with: 'The remote server returned an error: (403) Forbidden.' This occurs because the Azure Pipeline VM that does the deployment, has no access to the storage account. I tried to whitelist the public IP of the Azure Pipeline VM at the start of the deployment. That doesn't solve the problem, because the Azure Pipeline is using the private MS datacenter IP instead of its public IP and you cannot whitelist a private IP unfortunately.
How to temporarily allow the DevOps Azure Pipeline access to a restricted storage account?