[FEATURE] Location in deploy.parameters.json not always used for deployment region #204
Description
Is your feature request related to a problem? Please describe.
The GraphRAG Deployment Guide Quicksteps includes the following steps. Both of these steps require a location value.
- Step 3 - Create a Resource Group: which requires a location by the az cli
- Step 4 - Populate the deploy.parameters.json file, which includes a required parameter of location. The description of the location property at this step states it is where the Azure resources will be deployed.
These 2 values of location can be different. This leads to the following situation.
- The bicep files in the infra/core folder will use the resourceGroup().location defined in Step 3. This means all of the Azure resources are deployed based on the location value of the Resource Group and not the value in the parameters file.
- The deploy.sh will use the value from the parameters file, defined in Step 4. This means the pre-checks for VM sizing are done against a different region from where it will be deployed. This also gives the false solution to the problem of changing the location in the parameters file, which may fix the validation check, only to have the issue show up later when the deployment runs.
If we skip Step 3, the deploy.sh checks for the existence of the resource group and creates it based on this value if it is not there. All of the resource checks and deployments are then performed against the same region because it is defined from the 1 value of location defined in the deploy.parameters.json file.
Describe the solution you'd like
Here are some suggested changes to resolve this.
-
Option 1: Update the guide to not create a resource group and just include the parameters for the new RG in the deploy.parameters.json file. They are already marked as required values. This is the easiest to implement and is my proposed fix as it is just a documentation change.
-
Option 2: If there is a reason for including the create the RG step instead of letting the deploy.sh create it, then the bicep files should use the Location value from the deploy.parameters.json file. Steps to complete this include:
- Include the Location parameter in the deployAzureResources function.
- Main.bicep already includes a param for location, just need to send it a value in the previous step. Maybe to avoid confusion, change the variable to deploymentLocation.
- Change all of the location references in the bicep files to use the above-mentioned parameter.
Regardless of the option chosen above, we also need to update the Deployment Guide Quicksteps.
Happy to take this one on. Just want to validate which option to implement.