-
Notifications
You must be signed in to change notification settings - Fork 2
/
variables.tf
255 lines (217 loc) · 8.09 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
######################
# PagerDuty API Token
######################
variable "token" {
type = string
description = "The account-level token needed to create PagerDuty Services."
}
variable "pagerduty_user_token" {
description = "User-level token needed to create Slack connections."
type = string
}
#####################
# PagerDuty Service
#####################
variable "escalation_policy" {
type = string
default = null
description = "(Required) The escalation policy used by this service."
}
variable "name" {
type = string
default = null
description = "(Required) The name of the service."
}
variable "description" {
type = string
default = null
description = "(Optional) A human-friendly description of the service. If not set, a placeholder of `Managed by Terraform` will be set."
}
variable "resolve_timeout" {
type = number
default = 14400
description = "(Optional) Time in seconds that an incident is automatically resolved if left open for that long. Disabled if set to the `null` string."
}
variable "ack_timeout" {
type = number
default = 600
description = "(Optional) Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the `null` string. If not passed in, will default to `1800`."
}
variable "alert_creation" {
type = string
default = "create_alerts_and_incidents"
description = "(Optional) Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value `create_incidents` is default: events will create an incident that cannot be merged. Value `create_alerts_and_incidents` is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged. This option is recommended."
}
variable "alert_grouping_parameters" {
type = any
default = []
}
variable "incident_urgency_rule" {
type = any
default = []
}
variable "support_hours" {
type = any
default = []
}
variable "scheduled_actions" {
type = any
default = []
}
variable "auto_pause_notifications_parameters" {
description = "enabled (Optional) - Indicates whether alerts should be automatically suspended when identified as transient. If not passed in, will default to 'false'. timeout (Optional) - Indicates in seconds how long alerts should be suspended before triggering. Allowed values: 120, 180, 300, 600, 900 if enabled is true. Must be omitted or set to null if enabled is false."
type = any
default = []
}
#################################
# PagerDuty Service Integration
#################################
variable "enable_service_integration" {
description = "Decide to create a service integration or not (e.g. `Cloudwatch`, `DataDog`)"
type = bool
default = false
}
variable "vendor_name" {
description = "(Required) The vendor name to use to find a vendor in the PagerDuty API."
type = string
default = null
}
variable "type" {
type = string
default = "aws_cloudwatch_inbound_integration"
description = "Tells PagerDuty what type of integration this is."
}
#############################
# AWS SNS Topic
#############################
variable "create_sns_topic" {
description = "Decide if we want to use SNS for message delivery to our tool of choice (e.g. CloudWatch/DataDog)"
type = bool
default = false
}
variable "service_name" {
type = string
default = null
description = "Name of service to append to SNS topic prefix for all PagerDuty subscribed SNS topics"
}
################################
# PagerDuty Maintenance Windows
################################
variable "enable_maintenance_windows" {
description = "Decide to create maintenance window(s) for this service."
type = bool
default = false
}
variable "maintenance_windows" {
description = "value"
type = any
default = []
}
#############################
# PagerDuty Extension Schema
#############################
variable "schema_name" {
type = string
default = null
description = "(Required) The extension name to use to find an extension vendor in the PagerDuty API."
}
######################
# PagerDuty Extension
######################
variable "create_extension" {
description = "Decide to create a PagerDuty extension or not."
type = bool
default = false
}
variable "extension_name" {
description = "(Optional) The name of the service extension."
type = string
default = null
}
variable "extension_schema" {
description = "(Required) This is the schema for this extension."
type = string
default = null
}
variable "extension_objects" {
description = "(Required) This is the objects for which the extension applies (An array of service ids)."
type = any
default = []
}
variable "endpoint_url" {
type = string
default = null
description = "(Required|Optional) The url of the extension. Note: The endpoint URL is Optional API wise in most cases. But in some cases it is a Required parameter. For example, pagerduty_extension_schema named Generic V2 Webhook doesn't accept pagerduty_extension with no endpoint_url, but one with named Slack accepts. (e.g. https://hooks.slack.com/services/A1AAAA11A/A11AAAAAAAA/AaAAaAaAAaaAaAAaaAAAA1AA)"
}
variable "config" {
description = "(Optional) The configuration of the service extension as string containing plain JSON-encoded data."
type = string
default = null
}
#############################
# PagerDuty Slack Connection
#############################
variable "create_slack_connection" {
description = "Decide to create the Slack connection or not."
type = bool
default = false
}
variable "slack_connections" {
description = "value"
type = any
}
variable "source_id" {
description = "(Required) The ID of the source in PagerDuty. Valid sources are `service` or `team` ids."
type = string
default = null
}
variable "source_type" {
description = "(Required) The type of the source. Either `team_reference` or `service_reference`."
type = string
default = null
}
variable "workspace_id" {
description = "(Required) The ID of the connected Slack workspace. Can also be defined by the `SLACK_CONNECTION_WORKSPACE_ID` environment variable."
type = string
default = null
}
variable "channel_id" {
description = "(Required) The ID of a Slack channel in the workspace."
type = string
default = null
}
variable "notification_type" {
description = "(Required) Type of notification. Either `responder` or `stakeholder`."
type = string
default = null
}
variable "events" {
description = "(Required) A list of strings to filter events by PagerDuty event type. `incident.triggered` is required. The follow event types are also possible:."
type = any
}
variable "priorities" {
description = "(Optional) Allows you to filter events by priority. Needs to be an array of PagerDuty priority IDs. Available through pagerduty_priority data source. When omitted or set to an empty array (`[]`) in the configuration for a Slack Connection, its default behaviour is to set `priorities` to `No Priority` value. When set to `['*']` its corresponding value for `priorities` in Slack Connection's configuration will be `Any Priority`."
type = list(string)
default = []
}
variable "urgency" {
description = "(Optional) Allows you to filter events by urgency. Either high or low."
type = string
default = null
}
##############################
# DataDog API Integration
##############################
variable "datadog_integration" {
description = "Uses DataDog API Keys and createst the integration."
type = bool
default = false
}
variable "datadog_api_key" {
description = "Datadog API key. This can also be set via the DD_API_KEY environment variable"
type = string
}
variable "datadog_app_key" {
description = "Datadog APP key. This can also be set via the DD_APP_KEY environment variable."
type = string
}