-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
terraspace init complains about backends (http) #132
Comments
None of the environment variables have changed Terraspace is installed using the APT package Using 0.6.11-20210726100211 - works fine Only difference is the terraspace version. The generated
command("apply",
args: ["-lock-timeout=22m", "-no-color"],
env: {TF_IN_AUTOMATION: "1"},
)
command("plan",
args: ["-lock-timeout=22m", "-no-color"],
env: {TF_IN_AUTOMATION: "1"},
)
command("destroy",
args: ["-lock-timeout=22m", "-no-color"],
env: {TF_IN_AUTOMATION: "1"},
)
terraform {
backend "http" {
address = "<%= http_address %>"
lock_address = "<%= http_lock_address %>"
lock_method = "<%= http_lock_method %>"
unlock_address = "<%= http_unlock_address %>"
unlock_method = "<%= http_unlock_method %>"
username = "<%= http_username %>"
password = "<%= http_password %>"
retry_wait_min = "<%= http_retry_wait_min %>"
}
} Those are simple helper functions pulling information from the environment |
The issue here is because something is calling a
Digging further it looks like the remote_state fetcher is trying to pull the remote state without running init first. |
Upgraded to 0.6.17, problem still present. |
Pretty sure this is related to the following section (but not familiar enough with Ruby to be 100%) terraspace/lib/terraspace/terraform/remote_state/fetcher.rb Lines 14 to 18 in e816ed5
This is causing things to be validated and pulled prior to running init on it. |
I faced similar problem updating boltops/terraspace:alpine from 3564b8f30ad6 to 6ec6343781fe |
We're having similar issues. We're using templated dependencies between stacks (i.e.
The workaround is to run There being a workaround means it's not insurmountable, but it'd be good to get a fix at some point. I've also attached a ZIP of a test project that has this problem: All the relevant versions (for TS/Ruby/TF) should be defined in the Gemfile/.tool-versions/config. To reproduce:
The errors shown above should appear. |
I can reproduce this against version ~>1.1.0. I switch back to version 1.0.6 i can use the output helper without any " terraform init" error message. I get the same error message like you. I have test every version of my code with terraspace version from 1.0.6 to version 1.1.7. Only with version 1.0.6 it works. Please fix the error before continuing I hope this helps. |
Hello @tongueroo, |
Checklist
My Environment
Expected Behaviour
terraspace all init works correctly without reporting issues
Current Behavior
running
when using the
http
backend to store state (Gitlab cloud).Terrastate complains about the backed initialization occuring. This seems to happen generally after a new version of terrspace has come out.
Step-by-step reproduction instructions
Code Sample
None available that I can share
Solution Suggestion
not sure where to start
The text was updated successfully, but these errors were encountered: