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

Unclear how to handle error "Provider dependency changes detected" #345

Open
drigz opened this issue Jul 26, 2024 · 0 comments
Open

Unclear how to handle error "Provider dependency changes detected" #345

drigz opened this issue Jul 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@drigz
Copy link

drigz commented Jul 26, 2024

TL;DR

TF prints "Error: Provider dependency changes detected" and suggests running "terraform init" but it's not clear how to do that. Should I do it locally and send a PR with an updated lockfile? Or should Guardian do it and generate its own commit?

Expected behavior

Get a normal plan. Alternatively, get actionable instructions on how to resolve the error.

Observed behavior

I got this error:

Error: Provider dependency changes detected

Changes to the required provider dependencies were detected, but the lock
file is read-only. To use and record these requirements, run "terraform init"
without the "-lockfile=readonly" flag.

Environment Details

GUARDIAN_VERSION: 1.0.5
GUARDIAN_TERRAFORM_VERSION: 1.5.4

Additional information

I was able to work around this by ensuring I had the same version of Terraform locally, then running terraform init which updated the lockfile, and adding that commit to my PR.

@drigz drigz added the bug Something isn't working label Jul 26, 2024
@drigz drigz changed the title Unclear how to handle error Unclear how to handle error "Provider dependency changes detected" Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant