1terraform { 2 required_providers { 3 google = { 4 source = "hashicorp/google" 5 } 6 } 7} 8resource "google_project_service" "pubsub" { 9 service = "pubsub.googleapis.com" 10 project = var.inputs.project_id 11 count = var.inputs.should_enable_apis_on_apply ? 1 : 0 12 disable_on_destroy = var.inputs.should_disable_apis_on_destroy 13} 14resource "time_sleep" "for_90s_allowPubsubToFullyEnable" { 15 depends_on = [google_project_service.pubsub] 16 create_duration = "90s" 17} 18data "google_storage_project_service_account" "gcs_account" { 19} 20