There is nothing wrong with the template. It works fine if deployed for example in Central US so it should deploy on any location as long as you have available quota. I also get the same error if I deploy to South Central US. Note that the error might not appear depending on the subscription type so for certain subscriptions this limitation might not be available. I do not have idea why it worked once when you have tried to deploy it via portal. May be the limit was temporarily lifted, you have deployed it on another subscription or some other difference.