terraform-google-modules / terraform-google-project-factory

Creates an opinionated Google Cloud project by using Shared VPC, IAM, and Google Cloud APIs
https://registry.terraform.io/modules/terraform-google-modules/project-factory/google
Apache License 2.0
835 stars 538 forks source link

usage_bucket_name Error waiting for Setting usage export bucket #848

Closed wesleung closed 10 months ago

wesleung commented 1 year ago

TL;DR

Setting usage_bucket_name variable I always get a timeout whether I create the bucket after creating the bucket, bucket is shared from another project or the bucket does not exist.

What am I misunderstanding or doing wrong?

Expected behavior

Since this is at project creation, I expect the usage bucket to be created automatically in the module. As you cannot have a bucket without the project created.

Observed behavior

module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Creating...
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [10s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [20s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [30s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [40s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [50s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [1m0s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [1m10s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [1m20s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [1m30s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [1m40s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [1m50s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [2m0s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [2m10s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [2m20s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [2m30s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [2m40s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [2m50s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [3m0s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [3m10s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [3m20s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [3m30s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [3m40s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [3m50s elapsed]
module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0]: Still creating... [4m0s elapsed]
╷
│ Error: Error waiting for Setting usage export bucket.: timeout while waiting for state to become 'DONE' (last state: 'RUNNING', timeout: 4m0s)
│ 
│   with module.project_create.module.project-factory.google_project_usage_export_bucket.usage_report_export[0],
│   on .terraform/modules/project_create/modules/core_project_factory/main.tf line 277, in resource "google_project_usage_export_bucket" "usage_report_export":
│  277: resource "google_project_usage_export_bucket" "usage_report_export" {

Terraform Configuration

module "project_create" {
  source  = "terraform-google-modules/project-factory/google"
  version = "~> 14.2"

  auto_create_network   = false
  name                  = "test"
  random_project_id     = true
  org_id                = "##############"
  usage_bucket_name     = "test-asdf-987-usage"
  usage_bucket_prefix   = "test"
  billing_account       = var.billing_account
}

Terraform Version

$ terraform version
Terraform v1.6.1
on darwin_amd64
+ provider registry.terraform.io/hashicorp/google v4.63.1
+ provider registry.terraform.io/hashicorp/google-beta v4.63.1
+ provider registry.terraform.io/hashicorp/null v3.2.1
+ provider registry.terraform.io/hashicorp/random v3.5.1
+ provider registry.terraform.io/hashicorp/time v0.9.1

Additional information

No response

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days