-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloud_run.tf
46 lines (42 loc) · 1.01 KB
/
cloud_run.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
resource "google_cloud_run_v2_service" "enrichment_service" {
name = var.cloud_run_service_name
location = var.location
ingress = "INGRESS_TRAFFIC_INTERNAL_ONLY"
template {
service_account = google_service_account.service_account.email
containers {
image = "${var.cloud_run_image}:${var.cloud_run_image_tag}"
resources {
limits = {
cpu = 1
memory = "512Mi"
}
}
ports {
container_port = "8080"
}
env {
name = "REGIONS"
value = join(",", var.cloud_run_locations)
}
env {
name = "BUCKET_NAME"
value = var.enrichment_bucket_name
}
env {
name = "PREFIX"
value = var.cloud_run_bucket_object_prefix
}
env {
name = "LOG_LEVEL"
value = var.cloud_run_log_level
}
env {
name = "ROOT_FOLDER_ID"
value = var.folder_id
}
}
}
depends_on = [google_project_service.services]
labels = var.labels
}