-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvariables.tf
185 lines (144 loc) · 4.27 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
variable "archive_file" {
type = object({
output_path = string
output_base64sha256 = string
})
default = null
description = <<EOS
An instance of the `archive_file` data source containing the code of the Lambda function. Conflicts with `source_dir`.
EOS
}
variable "cloudwatch_log_group_retention_in_days" {
type = number
default = 3
description = <<EOS
The number of days to retain the log of the Lambda function.
EOS
}
variable "cloudwatch_log_group_tags" {
type = map(string)
default = {}
description = <<EOS
Map of tags assigned to the CloudWatch log group used by the Lambda function created by this module. Tags in this map will override tags in `var.default_tags`.
EOS
}
variable "default_tags" {
type = map(string)
default = {}
description = <<EOS
Map of tags assigned to all AWS resources created by this module.
EOS
}
variable "description" {
type = string
description = <<EOS
Description of the Lambda function.
EOS
}
variable "environment_variables" {
type = map(string)
default = null
description = <<EOS
Environment variable key-value pairs.
EOS
}
variable "function_name" {
type = string
description = <<EOS
Name of the Lambda function.
EOS
}
variable "handler" {
type = string
description = <<EOS
The name of the method within your code that Lambda calls to execute your function.
EOS
}
variable "iam_role_tags" {
type = map(string)
default = {}
description = <<EOS
Map of tags assigned to the IAM role used by the Lambda function created by this module. Tags in this map will override tags in `var.default_tags`.
EOS
}
variable "lambda_function_tags" {
type = map(string)
default = {}
description = <<EOS
Map of tags assigned to the Lambda function created by this module. Tags in this map will override tags in `var.default_tags`.
EOS
}
variable "layers" {
type = list(string)
default = []
description = <<EOS
List of up to five Lambda layer ARNs.
EOS
}
variable "memory_size" {
type = number
description = <<EOS
The amount of memory (in MB) available to the function at runtime. Increasing the Lambda function memory also increases its CPU allocation.
EOS
}
variable "reserved_concurrent_executions" {
type = number
description = <<EOS
The number of simultaneous executions to reserve for the Lambda function.
EOS
}
variable "runtime" {
type = string
description = <<EOS
The identifier of the Lambda function [runtime](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
EOS
}
variable "secret_environment_variables" {
type = map(string)
default = {}
description = <<EOS
Map of environment variable names to ARNs of AWS Secret Manager secrets.
Each ARN will be passed as environment variable to the lambda function with the key's name extended by suffix _SECRET_ARN. When initializing the Lambda run time environment, the Lambda function or a [wrapper script](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-modify.html#runtime-wrapper) can look up the secret value.
Permission will be added allowing the Lambda function to read the secret values.
EOS
}
variable "security_group_tags" {
type = map(string)
default = {}
description = <<EOS
Map of tags assigned to the security group used by the Lambda function (if placed into a VPC) created by this module. Tags in this map will override tags in `var.default_tags`.
EOS
}
variable "source_dir" {
type = string
default = null
description = <<EOS
Path of the directory which shall be packed as code of the Lambda function. Conflicts with `archive_file`.
EOS
}
variable "timeout" {
type = number
description = <<EOS
The amount of time (in seconds) per execution before stopping it.
EOS
}
variable "vpc_config" {
type = object({
subnets = list(
object({
arn = string
id = string
})
)
vpc = object({
id = string
})
})
default = null
description = <<EOS
VPC configuration of the Lambda function:
* `subnets`: List of subnets in which the Lambda function will be running. The subnets must be in the VPC specified by `vpc`.
* `vpc`: The VPC in which the Lambda function will be running and where all VPC-related resources (e.g. the security group) will be located.
If `vpc_config` is `null` the Lambda function will not be placed into a VPC.
EOS
}