Hi all, and greetings!
I am facing with an issue on the GSP345 Challenge lab.
In Task 6 it is mentioned to use version 6.0.0 of the network module as follows:
In the Terraform Registry, browse to the Network Module.
Add this module to your main.tf file. Use the following configurations:
Once you've written the module configuration, initialize Terraform and run an apply to create the networks.
Next, navigate to the instances.tf file and update the configuration resources to connect tf-instance-1 to subnet-01 and tf-instance-2 to subnet-02.
When I perform 'terraform init' command I get this error:
student_03_xxxxxxxxxxx@cloudshell:~ (qwiklabs-gcp-03-xxxxxxxx)$ terraform init
Initializing the backend...
Initializing modules...
Downloading registry.terraform.io/terraform-google-modules/network/google 6.0.1 for vpc...
- vpc in .terraform/modules/vpc
- vpc.firewall_rules in .terraform/modules/vpc/modules/firewall-rules
- vpc.routes in .terraform/modules/vpc/modules/routes
- vpc.subnets in .terraform/modules/vpc/modules/subnets
- vpc.vpc in .terraform/modules/vpc/modules/vpc
Initializing provider plugins...
- Reusing previous version of hashicorp/google from the dependency lock file
- Finding hashicorp/google-beta versions matching ">= 3.45.0, < 5.0.0"...
- Installing hashicorp/google-beta v4.85.0...
- Installed hashicorp/google-beta v4.85.0 (signed by HashiCorp)
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/google: locked provider registry.terraform.io/hashicorp/google 3.55.0 does not match configured version constraint
│ >= 2.15.0, >= 3.33.0, >= 3.45.0, 3.55.0, >= 3.83.0, < 5.0.0; must use terraform init -upgrade to allow selection of new versions
╵
I guess the issue can be related to the provider module version but even if I changed it, the problem is still there.
Any help is welcome
Thanks
Enrico
Solved! Go to Solution.
At last I was able to pass the Lab configuring the following version for Google provider:
source = "hashicorp/google"
version = "4.53.0"
And VPC version:
version = "~> 6.0.0"
Thanks
Enrico
Facing the same issue. Didn't provide provider version in the first attempt (defaulted to 6.14.1) and now fixed the google provider version at 6.11.1; Both attempts resulted in failure
required_providers {
google = {
source = "hashicorp/google"
version = "6.11.1"
}
}
At last I was able to pass the Lab configuring the following version for Google provider:
source = "hashicorp/google"
version = "4.53.0"
And VPC version:
version = "~> 6.0.0"
Thanks
Enrico
User | Count |
---|---|
18 | |
8 | |
4 | |
4 | |
3 |