generated from plus3it/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
variables.tf
162 lines (140 loc) · 4.67 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
variable "project_name" {
description = "Project name to prefix resources with"
type = string
default = "iam-key-enforcer"
}
variable "assume_role_name" {
description = "Name of the IAM role that the lambda will assume in the target account"
type = string
}
variable "email_admin_report_enabled" {
description = "Used to enable or disable the SES emailed report"
type = bool
default = false
}
variable "email_admin_report_subject" {
description = "Subject of the report email that is sent"
type = string
default = null
}
variable "email_source" {
description = "Email that will be used to send messages"
type = string
}
variable "email_banner_message" {
description = "Messages that will be at the top of all emails sent to notify recipients of important information"
type = string
default = ""
}
variable "email_banner_message_color" {
description = "Color of email banner message, must be valid html color"
type = string
default = "red"
}
variable "email_tag" {
description = "Tag to be placed on the IAM user that we can use to notify when their key is going to be disabled/deleted"
type = string
default = "keyenforcer:email"
}
variable "email_templates" {
description = "Email templates to use for Admin and User emails"
type = object({
admin = optional(object({
subject = optional(string, null),
html = optional(string, null),
text = optional(string, null),
}), {}),
user = optional(object({
subject = optional(string, null),
html = optional(string, null),
text = optional(string, null),
}), {})
})
default = {}
}
variable "admin_email" {
description = "Admin Email that will receive all emails and reports about actions taken if email is enabled"
type = string
}
variable "key_age_warning" {
description = "Age at which to warn (e.g. 75)"
type = number
}
variable "key_age_inactive" {
description = "Age at which a key should be inactive (e.g. 90)"
type = number
}
variable "key_age_delete" {
description = "Age at which a key should be deleted (e.g. 120)"
type = number
}
variable "key_use_threshold" {
description = "Age at which unused keys should be deleted (e.g.30)"
type = number
}
variable "s3_enabled" {
description = "Set to 'true' and provide s3_bucket if the audit report should be written to S3"
type = bool
default = false
}
variable "s3_bucket" {
description = "Bucket name to write the audit report to if s3_enabled is set to 'true'"
type = string
default = null
}
variable "schedule_expression" {
description = "(DEPRECATED) Schedule Expressions for Rules"
type = string
default = null
}
variable "accounts" {
description = "List of account objects to create events for"
type = list(object({
account_name = string
account_number = string
role_name = optional(string) # deprecated
armed = bool
debug = optional(bool, false)
email_user_enabled = bool
email_targets = list(string)
exempt_groups = list(string)
schedule_expression = optional(string, "cron(0 1 ? * SUN *)")
}))
default = []
}
variable "lambda" {
description = "Map of any additional arguments for the upstream lambda module. See <https://github.com/terraform-aws-modules/terraform-aws-lambda>"
type = object({
artifacts_dir = optional(string, "builds")
build_in_docker = optional(bool, false)
create_package = optional(bool, true)
ephemeral_storage_size = optional(number)
ignore_source_code_hash = optional(bool, true)
local_existing_package = optional(string)
recreate_missing_package = optional(bool, false)
runtime = optional(string, "python3.11")
s3_bucket = optional(string)
s3_existing_package = optional(map(string))
s3_prefix = optional(string)
store_on_s3 = optional(bool, false)
timeout = optional(number, 300)
source_path = optional(object({
patterns = optional(list(string), ["!\\.terragrunt-source-manifest"])
}), {})
})
default = {}
}
variable "log_level" {
description = "Log level for lambda"
type = string
default = "INFO"
validation {
condition = contains(["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"], var.log_level)
error_message = "Valid values for log level are (CRITICAL, ERROR, WARNING, INFO, DEBUG)."
}
}
variable "tags" {
description = "Tags for resource"
type = map(string)
default = {}
}