Hi,
I have tried to set the “LOCATION” variable through environment and Azure plugin configuration but I still see that terraspace is using the default “westus” value for creating storage account name, storage resource group name and local cache path.
What do I miss? How can I set the variable at a central place?
Thank you
Christoph
Dug into this. When tested this originally, was using the az
cli to set the location. Example:
$ az configure -l
[
{
"name": "location",
"source": "/home/ec2-user/.azure/config",
"value": "eastus"
}
]
$ terraspace build demo
Building .terraspace-cache/eastus/dev/stacks/demo
Built in .terraspace-cache/eastus/dev/stacks/demo
$ az configure --defaults location=westus
$ terraspace build demo
Building .terraspace-cache/westus/dev/stacks/demo
Built in .terraspace-cache/westus/dev/stacks/demo
$
Think it should be settable with an env var also though. This has been released in:
To update, cd into your terraspace project and run
bundle update terraspace_plugin_azurerm
The terraspace_plugin_azurerm version 0.3.1
will update the azure_info
. Eventually, will update terraspace dependencies also.
Example with setting it with the ARM_LOCATION
env var.
$ ARM_LOCATION=westus terraspace build demo
Building .terraspace-cache/westus/dev/stacks/demo
Built in .terraspace-cache/westus/dev/stacks/demo
$ ARM_LOCATION=eastus terraspace build demo
Building .terraspace-cache/eastus/dev/stacks/demo
Built in .terraspace-cache/eastus/dev/stacks/demo
$
Also, updated the docs:
Works like a charm.
Thanks a lot
Christoph