boltops-tools / terraspace

Terraspace: The Terraform Framework
https://terraspace.cloud
Apache License 2.0
678 stars 46 forks source link

Terraspace dependency with <%= output(" / every output") %> fails #198

Closed ORuessel closed 2 years ago

ORuessel commented 2 years ago

Checklist

My Environment

Software Version
Operating System Windows 10 / Ubuntu 20.04 WSL
Terraform v.1.1.4
Terraspace 1.1.0
Ruby 3.0.3p157

Expected Behaviour

Based on the version in front of version 1.1.0 it was possible to use output information in other stack like vpc_database_subnets = <%= output("vpc.database_subnets") %>

Current Behavior

After Upgrade from Terraspace Version 1.0.6 the same code isn't able to deploy. In .terraspace cache the dependency stacks for terraform state information will delete.

Step-by-step reproduction instructions

create new Project create new two stacks reuse based on the first stack the output on the second stack example : vpc_database_subnets = <%= output("vpc.database_subnets") %>

the error message comes

Follow error message is created Error running: cd /......../.terraspace-cache/eu-central-1/demo_account/stacks/s3_bucket && terraform state pull > /tmp/terraspace/remote_state/stacks/s3_bucket/state.json Please fix the error before continuing Error: Backend initialization required, please run "terraform init"

Code Sample

Solution Suggestion

After downgrade in the Gemfile from "gem "terraspace", '1.1.0'" to "gem "terraspace", '1.0.6' " -> bundle update in Project everything works fine with Version Terraspace 1.0.6

tongueroo commented 2 years ago

Thanks for report. Fixed by #199