Antonin
Antonin

Reputation: 950

terraform solve conflicting provider constraints : no available releases match the given constraints

Hello I am trying to plan a terraform update. We are using a complex terraform project consisting of many modules.

I have added a CloudSQL database module which requires hashicorp/null version ~> 3.1.0 but it seems like another module from my project has a dependency constraint for hashicorp/null version ~> 2.1.

Resulting in the following error :

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider hashicorp/null:
no available releases match the given constraints ~> 2.1, ~> 3.1.0

How can I track and update this dependency constraint ? I don't know which part of my project is enforcing it ?

Upvotes: 5

Views: 3756

Answers (1)

Matthew Schuchard
Matthew Schuchard

Reputation: 28739

The terraform providers and terraform version commands assist with outputting a dependency hierarchy of your modules and plugins/providers, and their respective versions in the hierarchy. It would be most useful to execute this command from your root module config for the purposes of your debugging.

Upvotes: 9

Related Questions