Skip to content
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

Fails to lock with error 'Backend reinitialization required. Please run "terraform init".' #10

Open
fathom-parth opened this issue Jul 21, 2023 · 0 comments

Comments

@fathom-parth
Copy link

When I run tflock, I hit the following error:

> terraform init
...

> tflock
Backend reinitialization required. Please run "terraform init".
Reason: Backend configuration changed for "gcs"

The "backend" is the interface that Terraform uses to store state,
perform operations, etc. If this message is showing up, it means that the
Terraform configuration you're using is using a custom configuration for
the Terraform backend.

Changes to backend configurations require reinitialization. This allows
Terraform to set up the new configuration, copy existing state, etc. This is
only done during "terraform init". Please run that command now then try again.

If the change reason above is incorrect, please verify your configuration
hasn't changed and try again. At this point, no changes to your existing
configuration or state have been made.

Error loading the state: Initialization required. Please see the error message above.

Running terraform plan after the above error still works as well.

Environment info:
We're using the gcs backend with terraform 1.4.6 and used rev 528959cb04c76b71454220b5c9b39aa9ae7f26ba to build tflock.

Let me know if I can provide any more details or if I'm doing something obviously wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant