like how it mentions at the top right corner on the page. However when I go about running terraform init, it gives me the following error:
Successfully configured the backend "gcs"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Finding latest version of hashicorp/external...
- Finding hashicorp/google versions matching ">= 3.53.0, >= 4.0.0, < 5.0.0"...
- Finding hashicorp/kubernetes versions matching "~> 2.0"...
- Finding latest version of hashicorp/random...
- Finding latest version of hashicorp/null...
- Using previously-installed hashicorp/null v3.1.0
- Using previously-installed hashicorp/external v2.2.0
- Installing hashicorp/kubernetes v2.8.0...
- Installed hashicorp/kubernetes v2.8.0 (signed by HashiCorp)
- Using previously-installed hashicorp/random v3.1.0
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/google: no available
│ releases match the given constraints >= 3.53.0, >= 4.0.0, < 5.0.0
This module declares its own provider requirements:
A module declaring both a minimum and a maximum bound for providers is unusual unless the authors already know that the module is incompatible with a specific newer version of the provider, so I’m surprised to see this version constraint but I assume the module authors have a good reason for setting it, and in any event I don’t think it’s the cause of your error.
Terraform will combine all of the version constraints for hashicorp/google across all modules in your configuration, and so the constraint shown in the error message >= 3.53.0, >= 4.0.0, < 5.0.0 suggests that there’s some other module in your configuration which is specifying >= 3.53.0 but that doesn’t matter because that extra constraint is a superset of >= 4.0.0, < 5.0.0 and so the module’s own constraint will take priority here.
(Incidentally, you can run terraform providers to see which provider constraints each module in your configuration is setting. Its information may be more limited if terraform init can’t succeed as in this case, but it should still be able to show the version constraints from each module.)
As you noted, there is currently a v4.10.0 release which should be matched by this version constraint, and so the fact that it isn’t working suggests a local issue on your system. For example:
Have you customized any of the provider-installation-related settings in the CLI configuration? That can potentially change where Terraform looks for particular providers, including disabling its default behavior of consulting the Terraform Registry.
Have you installed an older version of this provider manually before into one of the implied local mirror directories? Any providers installed there will implicitly disable installing from the origin registry on the assumption that you installed the provider manually with the intention of using your local copy instead.