-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathvariables.tf
86 lines (77 loc) · 1.91 KB
/
variables.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
81
82
83
84
85
86
variable "codepipelines" {
type = list(any)
description = "CodePipeline resources that should trigger Slack notifications"
}
variable "slack_url" {
type = string
description = "Slack webhook URL for deploy notifications"
}
variable "slack_channel" {
type = string
description = "A slack channel to send the deployment notifications to"
}
variable "slack_username" {
type = string
description = "The name of the user that sends the notifications"
default = "Deploy Bot"
}
variable "slack_emoji" {
type = string
description = "The emoji avatar of the user that sends the notifications"
default = ":rocket:"
}
variable "pipeline_event_type_ids" {
type = list(string)
description = "The list of pipeline events to trigger a notification on"
default = [
"started",
"failed",
"canceled",
"resumed",
"succeeded",
"superseded"
]
validation {
condition = length(
setsubtract(var.pipeline_event_type_ids, [
"started",
"failed",
"canceled",
"resumed",
"succeeded",
"superseded"
])
) == 0
error_message = <<-EOF
Invalid event type IDs found.
Allowed type IDs: started, failed, canceled, resumed, succeeded, superseded.
EOF
}
}
variable "approval_event_type_ids" {
type = list(string)
description = "The list of pipeline events to trigger a notification on"
default = [
"started",
"succeeded",
"failed",
]
validation {
condition = length(
setsubtract(var.approval_event_type_ids, [
"started",
"succeeded",
"failed",
])
) == 0
error_message = <<-EOF
Invalid event type IDs found.
Allowed type IDs: started, succeeded, failed.
EOF
}
}
variable "lambda_runtime" {
type = string
description = "The runtime to use for the lambda function"
default = "python3.12"
}