-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
executable file
·76 lines (61 loc) · 2.53 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
# ================================================================== general ===
variable "kms_key_alias_prefix" {
description = "The prefix for the KMS key alias. It must start with 'alias' and only include alphanumeric characters, dashes, underscores, colons or slashes, but doesn't end with a slash."
type = string
default = "alias"
validation {
condition = can(regex("^alias[a-zA-Z0-9/_-]*[^/]*$", var.kms_key_alias_prefix))
error_message = "KMS key alias prefix must start with 'alias' and only have alphanumeric, dashes, underscores, colons or slashes but doesn't end with a slash"
}
}
variable "service_log_level" {
description = "The log level for the service. It must be one of 'debug', 'info', 'warn', 'error', 'panic' or 'fatal'."
type = string
default = "info"
validation {
condition = contains(["debug", "info", "warn", "error", "panic", "fatal"], var.service_log_level)
error_message = "Service log level must be one of 'debug', 'info', 'warn', 'error', 'panic' or 'fatal'"
}
}
# ------------------------------------------------------------- email-sender ---
variable "email_sender_enabled" {
description = "Whether or not the Email sender is enabled."
type = bool
default = false
}
variable "email_sender_policy_content" {
description = "The content of the Open Policy Agent policy for email sender."
type = string
default = ""
}
# --------------------------------------------------------------- sms-sender ---
variable "sms_sender_enabled" {
description = "Whether or not the SMS sender is enabled."
type = bool
default = false
}
variable "sms_sender_policy_content" {
description = "The content of the Open Policy Agent policy for SMS sender."
type = string
default = ""
}
variable "sms_sender_throttle_period_in_minutes" {
description = "The throttle period for the SMS sender, in minutes. It must be a positive integer."
type = number
default = 15
validation {
condition = can(regex("^[1-9][0-9]*$", var.sms_sender_throttle_period_in_minutes))
error_message = "SMS sender throttle period must be a positive integer"
}
}
# ------------------------------------------------------------------ context ---
variable "aws_account_id" {
description = "The AWS account ID that the module will be deployed in."
type = string
default = ""
}
variable "aws_region_name" {
description = "The AWS region name where the module will be deployed."
type = string
default = ""
}