-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlocals.tf
69 lines (66 loc) · 1.82 KB
/
locals.tf
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
locals {
bq_dataset = {
rawdata = {
bigquery_dataset_name = "rawdata"
location = "US"
}
}
iam_members = {
gae = {
member = "serviceAccount:${var.PROJECT_ID}@appspot.gserviceaccount.com"
role = "roles/appengine.appAdmin"
},
cloudbuild_gae_1 = {
member = "serviceAccount:${var.PROJECT_NUMBER}@cloudbuild.gserviceaccount.com"
role = "roles/appengine.appAdmin"
},
cloudbuild_gae_2 = {
member = "serviceAccount:${var.PROJECT_NUMBER}@cloudbuild.gserviceaccount.com"
role = "roles/iam.serviceAccountUser"
},
cloudbuild_gae_3 = {
member = "serviceAccount:${var.PROJECT_NUMBER}@cloudbuild.gserviceaccount.com"
role = "roles/compute.storageAdmin"
},
cloudbuild_gae_4 = {
member = "serviceAccount:${var.PROJECT_NUMBER}@cloudbuild.gserviceaccount.com"
role = "roles/cloudbuild.builds.editor"
}
}
cloudbuild_triggers = {
nodejs = {
name = "nodejs"
description = "nodejs"
filename = "nodejs/cloudbuild.yaml"
included_files = [
"nodejs/**",
]
tags = [
"github-default-push-trigger",
]
github = [{
name = "terraform"
owner = "mitsuru-komaita"
branch = "^main$"
invert_regex = false
}
]
}
}
google_logging_project_sinks = {
logging_sink_to_bigquery = {
name = "logging_sink_to_bigquery"
destination = "bigquery.googleapis.com/${google_bigquery_dataset.dataset["rawdata"].id}"
filter = <<-EOT
resource.type = "gae_app"
jsonPayload.level="info"
logName="projects/${var.PROJECT_ID}/logs/stdout"
EOT
bigquery_options = [
{
use_partitioned_tables = true
}
]
}
}
}