Skip to content

Terraform validate --retry-once-with-cleanup=true not cleaning up all .terraform/providers issues #561

@brettcurtis

Description

@brettcurtis

Describe the bug

I'm not exactly sure how I end up in this position, but in some cases, I see:

Error: registry.terraform.io/hashicorp/google: there is no package for registry.terraform.io/hashicorp/google 4.79.0 cached in .terraform/providers

Validation failed: global/infra
{
  "format_version": "1.0",
  "valid": false,
  "error_count": 1,
  "warning_count": 0,
  "diagnostics": [
    {
      "severity": "error",
      "summary": "registry.terraform.io/hashicorp/google: there is no package for registry.terraform.io/hashicorp/google 4.79.0 cached in .terraform/providers",
      "detail": ""
    }
  ]
}

Should --retry-once-with-cleanup=true look for this message and clean up as well?

How can we reproduce it?

To reproduce you can simply delete the .terraform/providers/registry.terraform.io/hashicorp/google/4.79.0 directory.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions