Azure Location vs Region - Allowed deployments

I am trying to use the standard layering (PROJECT / REGION / LOCATION / ENV) using the Azure provider.
I am a bit confused about how to define the Azure location and region variables, from what I understand the region is not used with the Azure provider but only the location.

terraspace

config.allow.regions = ["emea","apac","ncsa"] # Env REGION
config.allow.locations = ["westeurope","eastasia","eastus"] # Env: ARM_LOCATION
config.allow.envs = ["dev","qua","prd"]

cli

az configure --defaults location=westeurope

Do we know if it's possible to define both REGION and the LOCATION environment variable with Azure so that they could be used with the config allows and the backend key expansions?

Shouldn’t the region and location be two different and independent variables? looks like the location values is used for both.

Both region and location are aliased. So the same value is used for both:

Thanks, I just realized it and that it also varies on each cloud provider.
Finally I had to use the custom layering feature to be able to use the region and location independently.

1 Like

One thing I am not really following here. Even though region and location are different terms, believe that when you use the az cli, you specify the location, which is pretty much the same as the region.

Both the eastus and eastus2 are “regions” in the Virginia “location”, you don’t really specify the Virginia; you specify the specific region:

az configure --defaults location=eastus
az configure --defaults location=eastus2

Noting for posterity. Found out that @syepes is really using TS_REGION is really just being used for organizational purpose. IE: The env var could just be TS_GROUP or whatever. Thanks!