V1.1.0 error when doing plan after clean

My PR build pipeline started failing after upgrading to v1.1.0. I haven’t done any real troubleshooting yet but thought I’d post the error here in case you recognize what might be happening.

  • I have two stacks: application and peered-vnets
  • application depends on peered-vnets via the following tfvar: application_subnets = <%= output('peered-vnets.vnet_subnets') %>

When I perform a terraspace clean all followed by a terraspace plan application, I get the following error:

[gbaker@blackwater cloud-infrastructure]$ bundle exec terraspace plan application --auto --no-color
Building .terraspace-cache/canadacentral/dev/stacks/application
Downloading tfstate files for dependencies defined in tfvars...
Errno::ENOENT: No such file or directory - /home/gbaker/Projects/cloud-infrastructure/.terraspace-cache/canadacentral/dev/stacks/peered-vnets
Error evaluating ERB template around line 15 of: /home/gbaker/Projects/cloud-infrastructure/app/stacks/application/tfvars/base.tfvars:
10 }
11 
12 app_application_log_retention_days = 7
13 app_application_log_retention_mb   = 100
14 
15 application_subnets = <%= output('peered-vnets.vnet_subnets') %>

Original backtrace (last 8 lines):
/opt/terraspace/embedded/lib/ruby/3.0.0/open3.rb:221:in `spawn'
/opt/terraspace/embedded/lib/ruby/3.0.0/open3.rb:221:in `popen_run'
/opt/terraspace/embedded/lib/ruby/3.0.0/open3.rb:102:in `popen3'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-1.1.0/lib/terraspace/shell.rb:36:in `popen3'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-1.1.0/lib/terraspace/shell.rb:26:in `shell'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-1.1.0/lib/terraspace/shell.rb:17:in `run'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-1.1.0/lib/terraspace/terraform/runner.rb:51:in `block in terraform'
/opt/terraspace/embedded/lib/ruby/gems/3.0.0/gems/terraspace-1.1.0/lib/terraspace/hooks/builder.rb:25:in `run_hooks'

Re-run with FULL_BACKTRACE=1 to see all lines

When I look in .terraspace-cache I see there is no peered-vnets directory to be found.

Ok. Fixed by https://github.com/boltops-tools/terraspace/pull/199 Details in there. Give terraspace 1.1.1 a try.

Thanks Tung… it works again! So far I’m extremely happy with Terraspace and your dedication to improving it.