-
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathvariables.tf
More file actions
223 lines (187 loc) · 6.1 KB
/
variables.tf
File metadata and controls
223 lines (187 loc) · 6.1 KB
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
variable "create" {
description = "Controls whether the forwarder resources should be created"
type = bool
default = true
}
variable "tags" {
description = "A map of tags to use on all resources"
type = map(string)
default = {}
}
# Datadog environment Variables
variable "dd_app_key" {
description = "The Datadog application key associated with the user account that created it, which can be found from the APIs page"
type = string
default = ""
}
variable "dd_api_key_secret_arn" {
description = "The ARN of the Secrets Manager secret storing the Datadog API key, if you already have it stored in Secrets Manager"
type = string
default = ""
}
variable "dd_site" {
description = "Define your Datadog Site to send data to. For the Datadog EU site, set to datadoghq.eu"
type = string
default = "datadoghq.com"
}
variable "kms_alias" {
description = "Alias of KMS key used to encrypt the Datadog API keys - must start with `alias/`"
type = string
}
# Forwarder IAM Role
variable "create_role" {
description = "Controls whether an IAM role is created for the forwarder"
type = bool
default = true
}
variable "role_arn" {
description = "IAM role arn for forwarder lambda function to utilize"
type = string
default = null
}
variable "role_name" {
description = "Forwarder role name"
type = string
default = ""
}
variable "use_role_name_prefix" {
description = "Whether to use unique name beginning with the specified `role_name` for the forwarder role"
type = bool
default = false
}
variable "role_path" {
description = "Forwarder role path"
type = string
default = null
}
variable "role_max_session_duration" {
description = "The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours"
type = number
default = null
}
variable "role_permissions_boundary" {
description = "The ARN of the policy that is used to set the permissions boundary for the forwarder role"
type = string
default = null
}
variable "role_tags" {
description = "A map of tags to apply to the forwarder role"
type = map(string)
default = {}
}
variable "create_role_policy" {
description = "Controls whether an IAM role policy is created for the forwarder"
type = bool
default = true
}
variable "policy_arn" {
description = "IAM policy arn for forwarder lambda function to utilize"
type = string
default = null
}
variable "policy_name" {
description = "Forwarder policy name"
type = string
default = ""
}
variable "use_policy_name_prefix" {
description = "Whether to use unique name beginning with the specified `policy_name` for the forwarder policy"
type = bool
default = false
}
variable "policy_path" {
description = "Forwarder policy path"
type = string
default = null
}
variable "s3_log_bucket_arns" {
description = "S3 log buckets for forwarder to read and forward VPC flow logs to Datadog"
type = list(string)
default = []
}
variable "read_cloudwatch_logs" {
description = "Whether the forwarder will read CloudWatch log groups for VPC flow logs"
type = bool
default = false
}
# Forwarder Lambda Function
variable "forwarder_version" {
description = "VPC flow log monitoring version - see https://github.com/DataDog/datadog-serverless-functions/releases"
type = string
default = "4.12.0"
}
variable "name" {
description = "Forwarder lambda name"
type = string
default = "datadog-vpc-flow-log-forwarder"
}
variable "runtime" {
description = "Lambda function runtime"
type = string
default = "python3.12"
}
variable "layers" {
description = "List of Lambda Layer Version ARNs (maximum of 5) to attach to the forwarder lambda"
type = list(string)
default = []
}
variable "memory_size" {
description = "Memory size for the forwarder lambda function"
type = number
default = 256
}
variable "timeout" {
description = "The amount of time the forwarder lambda has to execute in seconds"
type = number
default = 10
}
variable "publish" {
description = "Whether to publish creation/change as a new Lambda Function Version"
type = bool
default = false
}
variable "architectures" {
description = "Instruction set architecture for your Lambda function. Valid values are `[\"x86_64\"]` and `[\"arm64\"]`. Default is `[\"arm64\"]`"
type = list(string)
default = ["arm64"]
}
variable "reserved_concurrent_executions" {
description = "The amount of reserved concurrent executions for the forwarder lambda function"
type = number
default = 10
}
variable "kms_key_arn" {
description = "KMS key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key"
type = string
default = null
}
variable "subnet_ids" {
description = "List of subnet ids when Lambda Function should run in the VPC. Usually private or intra subnets"
type = list(string)
default = null
}
variable "security_group_ids" {
description = "List of security group ids when Lambda Function should run in the VPC"
type = list(string)
default = null
}
variable "environment_variables" {
description = "A map of environment variables for the forwarder lambda function"
type = map(string)
default = {}
}
variable "lambda_tags" {
description = "A map of tags to apply to the forwarder lambda function"
type = map(string)
default = {}
}
variable "log_retention_days" {
description = "Forwarder CloudWatch log group retention in days"
type = number
default = 7
}
variable "log_kms_key_id" {
description = "The AWS KMS Key ARN to use for CloudWatch log group encryption"
type = string
default = null
}