PureDevOps Community

Inconsistent dependency when i do terraform apply or terraform plan

After I added new data resources for the lambda as below and ran terraform plan

data "archive_file" "add_reader_instance" {
   type        = "zip"
  source_file = local.my_file
  output_path = local.my_zip
}

what i got is this


Error: Inconsistent dependency lock file
│
│ The following dependency selections recorded in the lock file are inconsistent with the current configuration:
│   - provider registry.terraform.io/hashicorp/archive: required by this configuration but no version is selected
│
│ To update the locked dependency selections to match a changed configuration, run:
│   terraform init -upgrade

What you can do to resolve is either you can do terraform init or terraform init -upgrade . If you still not able to solve the issue please do reply to this thread to seek additional support from us.