Failed to query available provider packages when doing a terraform init

Hi I’m currently using terraform google-beta providers and google providers at the same time.

google-beta for my Composer module

google for my config in prod environment.

This setup works on my dev environment with the same configuration. This is what I have in my composer module:
terraform {
required_providers {
google-beta = {
source = “hashicorp/google-beta”
#version = “<=4.40.0”
version = “>=5.20.0”
}
}
}

and this is what I have in my config.tf
terraform {
required_providers {
google = {
source = “hashicorp/google”
version = “>=4.0”
}
}
}

It seems to run before however, When I am trying to run terraform init on our ci/cd pipeline it is throwing me an error, when I test my running composer module in dev. It works
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/google-beta: no available releases match the given constraints >=
3.43.0, < 5.0.0, >= 5.20.0, < 6.0.0

Hi @fishbones242,

You seem to have some other modules in your configuration that have conflicting version constraints.

You can use the terraform providers command to get a summary of which modules in your configuration support which provider versions. You will need to make sure that all of those constraints together can select at least one existing version of the provider.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.