-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
86 lines (76 loc) · 2.61 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 "enable_sns_topic_creation" {
description = "Indicates whether to create an SNS topic within this module"
type = bool
default = true
}
variable "enable_notification_creation" {
description = "Indicates whether to create a notification lambda stack, default is true, but useful to toggle if using existing resources"
type = bool
default = true
}
variable "monitors" {
description = "A collection of cost anomaly monitors to create"
type = list(object({
name = string
# The name of the monitor
monitor_type = optional(string, "DIMENSIONAL")
# The type of monitor to create
monitor_dimension = optional(string, "DIMENSIONAL")
# The dimension to monitor
monitor_specification = optional(string, null)
# The specification to monitor
notify = optional(object({
frequency = string
# The frequency of notifications
threshold_expression = optional(any, null)
# The threshold expression to use for notifications
}), {
frequency = "DAILY"
})
}))
}
variable "notifications" {
description = "The configuration of the notification"
type = object({
email = optional(object({
addresses = list(string)
}), null)
slack = optional(object({
secret_name = optional(string, null)
# An optional secret name in the AWS Secrets Manager, containing this information
lambda_name = optional(string, "cost-anomaly-notification")
# The name of the Lambda function to use for notifications
webhook_url = optional(string, null)
# The URL of the Slack webhook to use for notifications, required if secret_name is not provided
}), null)
})
}
variable "sns_topic_name" {
description = "The name of an existing or new SNS topic for notifications"
type = string
default = "cost-anomaly-notifications"
}
variable "sns_topic_arn" {
description = "The ARN of an existing SNS topic for notifications"
type = string
default = null
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
}
variable "accounts_id_to_name" {
description = "A mapping of account id and account name - used by notification lamdba to map an account ID to a human readable name"
type = map(string)
default = null
}
variable "identity_center_start_url" {
description = "The start URL of your Identity Center instance"
type = string
default = null
}
variable "identity_center_role" {
description = "The name of the role to use when redirecting through Identity Center"
type = string
default = null
}