GoogleCloudPlatform/terraform-google-secured-data-warehouse

Module "secured_data_warehouse" cannot be found in the module registry at registry.terraform.io.

guptamukul-google opened this issue ยท 2 comments

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave +1 or me too comments; they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If the issue is assigned to a user, that user is claiming responsibility for the issue.

Secured Data Warehouse Specifications

  • Version: v0.1 & v0.2.0
  • Platform:

Terraform execution logs

https://gist.github.com/guptamukul-google/f7e3222aa2b429473015adbc5f4f3f8a#file-terraform-init-secured-data-warehouse

Expected Behavior

terraform init should work and download secured-data-warehouse terraform module

Actual Behavior

Getting below error when running terraform init

โ”‚ Error: Module not found
โ”‚ 
โ”‚ Module "secured_data_warehouse" (from main.tf:192) cannot be found in the module registry at registry.terraform.io.
โ•ต

Steps to Reproduce

  1. Have a config with below module:
module "secured-data-warehouse" {
  source  = "terraform-google-modules/secured-data-warehouse/google"
  version = "~> 0.1"

  # with other required variables here
}
  1. Run terraform init

Important Factoids

References

  • You can check the exact secure data warehouse config here

When using the provision instructions from the Hashicorp site

i.e.

module "secured-data-warehouse" {
  source  = "GoogleCloudPlatform/secured-data-warehouse/google"
  version = "0.2.0"

  # with other required variables here
}

we are getting below error:

โ•ท
โ”‚ 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 >= 2.5.0, >= 3.43.0, >= 3.50.0, >= 3.53.0, ~> 3.53, ~>
โ”‚ 3.63, ~> 3.77, ~> 4.0, < 4.0.0, ~> 4.5, ~> 4.11, < 5.0.0
โ•ต

โ•ท
โ”‚ 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, >= 3.50.0, ~> 3.77, ~> 4.0, ~> 4.11, <
โ”‚ 5.0.0
โ•ต

We did 2 things to resolve the issue:

  1. Used the provision instructions from the Hashicorp site

i.e.

module "secured-data-warehouse" {
  source  = "GoogleCloudPlatform/secured-data-warehouse/google"
  version = "0.2.0"

  # with other required variables here
}
  1. Changed terraform version FROM:
terraform {
  required_version = "~> 1.0"
  required_providers {
    google      = "~> 4.0"
    google-beta = "~> 4.0"
  }
}

TO:

terraform {
  required_version = ">= 0.13"
  required_providers {
    google      = "~> 3.77"
    google-beta = "~> 3.77"
  }
}