Skip to content

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

Open
@drigz

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions