Deployments: Default to resource group location rather than West Europe.
This PR improves the default behavior when no location is specified, improving upon the issue in #682, although not quite fixing it yet.
The changes in this PR are as follows:
- Deployments: Default to resource group location rather than West Europe.
I have read the contributing guidelines and have completed the following:
- [x] Tested my code end-to-end against a live Azure subscription.
- [x] Updated the documentation in the docs folder for the affected changes.
- [x] Written unit tests against the modified code that I have made.
- [x] Updated the release notes with a new entry for this PR.
- [x] Checked the coding standards outlined in the contributions guide and ensured my code adheres to them.
@isaacabraham what do you think of this change to remove the default of "westeurope"? The only place it's really breaking is if people don't specify a location and are letting Deploy.execute create the resource group. I think most people that use Deploy.execute are actually specifying a location. The alternative would be to have Deploy.execute default to westeurope so it has the old behavior. Thoughts?
Yes, removing defaults is probably a good thing.
What happens if they don't specify a location - will it error?
What happens if they don't specify a location - will it error?
The generated template will use [resourceGroup().location] which is likely the expected behavior. They will get an error only if Farmer.deploy is creating the resource group, in which case the expression wouldn't work, so this gives a meaningful message:
Deployment location is an ARM expression that cannot be evaluated by the CLI. Skipping resource group creation.
If they already created the resource group, the deployment will run and work as normal, but if they are relying on Farmer to create it, then it doesn't know the location and the deployment won't work because the resource group doesn't exist.