Just a quick note to the community for people migrating from terraspace v1 to terraspace.
I didn’t see it on the blog post about terraspace v2 release but it’s important to highlight something you have mentioned on the git changelog for v2.0.0
"* Remove config.build.cache_root option"
When I started terraspace v1.1.5, I generate my first project with the command:
terraspace new project infra --plugin azurerm --examples
as mentioned on the documentation
It will generate something like this on the config file “app.rb”:
# Docs: https://terraspace.cloud/docs/config/reference/
Terraspace.configure do |config|
config.logger.level = :info
config.build.cache_dir = ":CACHE_ROOT/:ENV/:REGION/:BUILD_DIR"
end
But if you switch to terraspace v2, you should remove “:CACHE_ROOT/” otherwise you might get a very long strange path on your .terraspace-cache folder
example:
Building .terraspace-cache/mnt/c/Users/xxx/source/repos/yyy/zzz/DevOPS_IaC/.terraspace-cache/7/westeurope/stacks/app_resource_group
Created .terraspace-cache/mnt/c/Users/xxx/source/repos/yyyyyyyy/zzz/DevOPS_IaC/.terraspace-cache/7/westeurope/modules/app_key_vault/main.tf
No problem for using terraspace v2 after migration from v1 but important to note that you don’t need :CACHE_ROOT env var anymore