forked from googleapis/google-cloud-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
27 lines (27 loc) · 1.06 KB
/
main.tf
File metadata and controls
27 lines (27 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
terraform {
required_providers {
google = { source = "hashicorp/google" }
}
}
resource "google_project_service" "cloudasset" {
service = "cloudasset.googleapis.com"
project = var.inputs.project_id
count = var.inputs.should_enable_apis_on_apply ? 1 : 0
disable_on_destroy = var.inputs.should_disable_apis_on_destroy
}
resource "google_project_service" "cloudresourcemanager" {
service = "cloudresourcemanager.googleapis.com"
project = var.inputs.project_id
count = var.inputs.should_enable_apis_on_apply ? 1 : 0
disable_on_destroy = var.inputs.should_disable_apis_on_destroy
}
resource "google_project_service" "pubsub" {
service = "pubsub.googleapis.com"
project = var.inputs.project_id
count = var.inputs.should_enable_apis_on_apply ? 1 : 0
disable_on_destroy = var.inputs.should_disable_apis_on_destroy
}
resource "time_sleep" "for_90s_allowPubsubToFullyEnable" {
depends_on = [google_project_service.pubsub]
create_duration = "90s"
}