0
votes

I am using the terraform-google-bootstrap module as a source in my local module as below.

module "bootstrap" {
  source  = "terraform-google-modules/bootstrap/google"
  version = "~> 1.0"

  org_id               = var.organization_id
  billing_account      = var.billing_account
  group_org_admins     = var.group_org_admins
  group_billing_admins = var.group_billing_admins
  default_region       = var.default_region
  project_prefix       = var.project_prefix
}

Now in the output file of terraform-google-modules/bootstrap/google there is no block for project_number. I don't want to download the terraform-google-modules/bootstrap/google locally and change the output file. Please suggest how can I still get the project_name and use it in another module.

Thanks.

1
If you do not want to fork it, then you need to raise an issue/PR for it.Matt Schuchard

1 Answers

0
votes

I got the solution for this. Just need to use the data block as below

data "google_project" "seed_project" {
  project_id = module.bootstrap.seed_project_id
  depends_on = [
    module.bootstrap
  ]
}