You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(base) ➜ gcp git:(master) terraform init
Initializing the backend...
╷
│ Error: Backend configuration changed
│
│ A change in the backend configuration has been detected, which may require migrating existing state.
│
│ If you wish to attempt automatic migration of the state, use "terraform init -migrate-state".
│ If you wish to store the current configuration with no changes to the state, use "terraform init -reconfigure".
╵
Should I do terraform init -migrate-state here? I'm not sure what this is about.
Yuvi wrote:
ah, look for hidden files in your current directory
you most likely do not want -migrate-state
this usually means terraform is not looking for state files where it should - which is on GCS remotely, but locally.
Erik wrote:
Ah
I moved away my found .terraform folder, and did (from terraform/gcp): terraform init -backend-config=backends/default-backend.hcl
This resolved the situation, but I don't understand the details here. What caused this? Had I made changes to terraform state that wasn't captured by the remote state or similar?
The text was updated successfully, but these errors were encountered:
consideRatio
changed the title
Document terraform help from Yuvi
Document terraform help from Yuvi someplace suitable
Mar 22, 2023
Erik wrote:
Should I do
terraform init -migrate-state
here? I'm not sure what this is about.Yuvi wrote:
ah, look for hidden files in your current directory
you most likely do not want -migrate-state
this usually means terraform is not looking for state files where it should - which is on GCS remotely, but locally.
Erik wrote:
Ah
I moved away my found
.terraform
folder, and did (fromterraform/gcp
):terraform init -backend-config=backends/default-backend.hcl
This resolved the situation, but I don't understand the details here. What caused this? Had I made changes to terraform state that wasn't captured by the remote state or similar?
The text was updated successfully, but these errors were encountered: