Error on init: "No available releases match constraints"

Hi I am also having the same issue. However we are using Terraform Workspace cloud so I do not have direct control on moving the plugins providers.

I do have required providers defined in the modules.
Furthermore, I would like to use 1.14 and this is the error I see:

│ Error: Failed to query available provider packages

│ Could not retrieve the list of available versions for provider
│ gavinbunney/kubectl: no available releases match the given constraints
│ 1.10.0, >= 1.14.0, 1.14.0

If I only use 1.10 it does install but I am trying to use the for_each in data kubectl_file_documents.

Any idea?

This looks like you have multiple constraints for the gavinbunney/kubectl provider:

  • 1.10.0, i.e. “must be exactly 1.10.0”
  • >= 1.14.0, i.e. “must be at least 1.14.0”
  • 1.14.0, i.e. “must be exactly 1.14.0”

This combination cannot ever be satisfied, which is why Terraform cannot be initialized.

If you look through the required_providers blocks for your configuration and its modules, I think you’ll find each of these provider constraints somewhere. To upgrade to 1.14.0, you’ll have to update the configuration which requires 1.10.0.

Good catch on the inability to match semantic versioning.

I do have several modules that requires source = "1.10.0".

Pardon my inexperience but is there a way to use several Provider versions for each module?

In my top-level workspace, could I do something like:

terraform {
  required_providers {
    kubectl = {
      source  = "gavinbunney/kubectl"
      version = "1.10.0, ~>1.14.0"

My guess is no. But I just wanted to get your take on it.


Hi @jackchi,

Because provider configurations are often shared across modules, Terraform requires only a single version of each provider in an entire configuration. It isn’t possible to use the same provider at two different versions at the same time.