Following 0-bootstrap/README-GitHub.md, executing step 19 (terraform init) fails because it cannot resolve a version for the hashicorp/google provider:
The gh_cicd module references version "~> 12.0" of "terraform-google-modules/project-factory/google", which constrains the hashicorp/google provider to >= 3.50.0, < 5.0.0.
The seed_bootstrap module references the seed_project module, which references version "~> 15.0" of "terraform-google-modules/project-factory/google", which constrains the hashicorp/google provider to >= 5.22.0, < 6.0.0.
With this change, terraform init successfully finished.
Looking at the code, this outdated dependency is also in the gitlab_cicd and tfc_cicd modules. The Jenkins agent is properly using the "~> 15.0" project-factory version already.
This looks related to #1131 -- that issue mentions a conflict caused by the tfc_agent_gke module, which doesn't apply here. So solving this conflict may not be enough to resolve #1131.
TL;DR
Following
0-bootstrap/README-GitHub.md
, executing step 19 (terraform init
) fails because it cannot resolve a version for thehashicorp/google
provider:gh_cicd
module references version"~> 12.0"
of"terraform-google-modules/project-factory/google"
, which constrains thehashicorp/google
provider to>= 3.50.0, < 5.0.0
.seed_bootstrap
module references theseed_project
module, which references version"~> 15.0"
of"terraform-google-modules/project-factory/google"
, which constrains thehashicorp/google
provider to>= 5.22.0, < 6.0.0
.Terraform Configuration
Terraform Version
Additional information
The fix is straightforward. Change the dependency for
project-factory
in the gh_cicd module definition to be "~> 15.0": https://github.com/terraform-google-modules/terraform-example-foundation/blob/v4.0.0/0-bootstrap/github.tf.example#L73With this change,
terraform init
successfully finished.Looking at the code, this outdated dependency is also in the
gitlab_cicd
andtfc_cicd
modules. The Jenkins agent is properly using the"~> 15.0"
project-factory version already.This looks related to #1131 -- that issue mentions a conflict caused by the
tfc_agent_gke
module, which doesn't apply here. So solving this conflict may not be enough to resolve #1131.