-
Notifications
You must be signed in to change notification settings - Fork 1
/
external_functions.tf
80 lines (64 loc) · 1.3 KB
/
external_functions.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
70
71
72
73
74
75
76
77
78
79
80
resource "snowflake_external_function" "send_to_sentry" {
provider = snowflake.monitoring_role
database = var.database
schema = var.monitoring_schema
name = "SEND_TO_SENTRY"
# Function arguments
arg {
name = "DSN"
type = "VARCHAR"
}
arg {
name = "NAME"
type = "VARCHAR"
}
arg {
name = "HISTORY_TYPE"
type = "VARCHAR"
}
arg {
name = "ERROR"
type = "VARCHAR"
}
arg {
name = "TS"
type = "VARCHAR"
}
arg {
name = "HISTORY_URL"
type = "VARCHAR"
}
# Function headers
header {
name = "dsn"
value = "{0}"
}
header {
name = "name"
value = "{1}"
}
header {
name = "history-type"
value = "{2}"
}
header {
name = "error"
value = "{3}"
}
header {
name = "ts"
value = "{4}"
}
header {
name = "history-url"
value = "{5}"
}
return_null_allowed = true
api_integration = snowflake_api_integration.sentry_integration_api_integration.name
url_of_proxy_and_resource = "${aws_api_gateway_deployment.sentry_integration_api_gw_deployment.invoke_url}${var.env}/sentry_logger"
return_type = "VARIANT"
return_behavior = "VOLATILE"
comment = <<COMMENT
SEND_TO_SENTRY: (dsn, name, history_type, error, ts, history_url) -> response
COMMENT
}