Newer
Older
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
resource "google_pubsub_topic" "faas_test" {
name = "faas-test"
project = local.project
}
module "faas_service" {
source = "./modules/faas"
name = "faas-test-pubsub"
project = local.project
function_container_image = "${local.container_images.function_base}:${local.container_images.function_tag}"
function = "example_cloud_event"
timeout_seconds = 10
triggers = {
pubsub_topic_id = google_pubsub_topic.faas_test.id
}
function_env = [
{
name = "TEST_VAR"
value = "WORKING"
}
]
concurrency = {
max_concurrent_functions = 1
}
}
module "faas_service_set_retry" {
source = "./modules/faas"
name = "faas-test-set-retry"
project = local.project
function_container_image = "${local.container_images.function_base}:${local.container_images.function_tag}"
function = "example_cloud_event"
timeout_seconds = 20
triggers = {
pubsub_topic_id = google_pubsub_topic.faas_test.id
}
retry_count = 4
function_env = [
{
name = "TEST_VAR"
value = "WORKING"
}
]
concurrency = {
max_concurrent_functions = 1
}
}
module "faas_service_cron" {
source = "./modules/faas"
name = "faas-test-cron"
project = local.project
function_container_image = "${local.container_images.function_base}:${local.container_images.function_tag}"
function = "example_cloud_event"
timeout_seconds = 20
triggers = {
cron_schedules = ["00 0 */7 * *", "0 12 */7 * *", ]
}
retry_count = 4
function_env = [
{
name = "TEST_VAR"
value = "WORKING"
}
]
concurrency = {
max_concurrent_functions = 1
}
}