stack1 provides output to stack2.
Removing any stack2 dependency from base.tfvars works without issue.
For a while all worked well also with dependencies in base.tfvars in stack2
then I start to get this strange behavior:
Runnign up command on stack1
terraspace up stack1
I get this error:
Building .terraspace-cache/eu-south-1/prod/stacks/stack1
Downloading tfstate files for dependencies defined in tfvars...
Built in .terraspace-cache/eu-south-1/prod/stacks/stack1
=> terraform init -get -input=false >> /tmp/terraspace/log/init/stack1.log
Error: Error inspecting states in the "s3" backend:
S3 bucket does not exist.
The referenced S3 bucket must have been previously created. If the S3 bucket was created within the last minute, please wait for a minute or two and try again.
Error: NoSuchBucket: The specified bucket does not exist
status code: 404, request id: ..., host id: ...
Prior to changing backends, Terraform inspects the source and destination states to determine what kind of migration steps need to be taken, if any. Terraform failed to load the states. The data in both the source and the destination remain unmodified. Please resolve the above error and try again.
Error running command: terraform init -get -input=false >> /tmp/terraspace/log/init/stack1.log
inspecting /tmp/terraspace/log/init/stack1.log I can see:
Initializing the backend...
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing the backend...
...
Initializing the backend...
Initializing modules...
Downloading git::...
...
Initializing the backend...
Backend configuration changed!
Terraform has detected that the configuration specified for the backend
has changed. Terraform will now check for existing state in the backends.
Then I tried:
terraspace clean all
terraspace init stack1
Getting this:
Building .terraspace-cache/eu-south-1/prod/stacks/stack1
Downloading tfstate files for dependencies defined in tfvars...
Error: Initialization required. Please see the error message above.
Error running: cd .../.terraspace-cache/eu-south-1/prod/stacks/stack1 && terraform state pull > /tmp/terraspace/remote_state/stacks/stack1/state.json
Please fix the error before continuing
Error: Initialization required. Please see the error message above.
Error running: cd .../.terraspace-cache/eu-south-1/prod/stacks/stack1 && terraform state pull > /tmp/terraspace/remote_state/stacks/stack1/state.json
Please fix the error before continuing
...
Built in .terraspace-cache/eu-south-1/prod/stacks/account-master
Current directory: .terraspace-cache/eu-south-1/prod/stacks/account-master
=> terraform init -get -input=false
Initializing modules...
Downloading git::...
...
Initializing the backend...
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
...
Terraform has been successfully initialized!
...
Running manually terraform pull command works
cd .../.terraspace-cache/eu-south-1/prod/stacks/stack1 && terraform state pull > /tmp/terraspace/remote_state/stacks/stack1/state.json
But using terraspace I get same error and I cannot use output helper anymore.