-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
217 lines (188 loc) · 5.82 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
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
variable "code_source" {
type = object({
container_image_uri = optional(string)
filename = optional(string)
s3 = optional(object({
uri = string # s3://bucket/prefix
version = optional(string)
}))
})
description = "Specify the code source"
}
variable "name" {
type = string
description = "The name of the lambda function. All associated resources' names will also be prefixed by this value"
}
variable "additional_execution_role_policies" {
type = list(string)
description = "Additional IAM policies to be attached to the managed execution IAM role."
default = []
}
variable "additional_tags" {
type = map(string)
description = "Additional tags for the lambda function"
default = {}
}
variable "additional_tags_all" {
type = map(string)
description = "Additional tags for all resources in deployed with this module"
default = {}
}
variable "aliases" {
type = map(object({
function_version = string
description = optional(string)
weighted_alias = optional(object({
function_version = string
weight = number
}))
}))
description = "Manages multiple Lambda aliases"
default = {}
}
variable "architecture" {
type = string
description = "Specify the instruction set architecture for the function code"
default = "x86_64"
}
variable "asynchronous_invocation" {
type = object({
on_failure_destination_arn = optional(string)
on_success_destination_arn = optional(string)
retries = optional(object({
maximum_event_age_in_seconds = optional(number, 21600) # 6 hours
maximum_retry_attempts = optional(number, 2)
}))
})
description = "Configures error handling and destinations for asynchronous invocation"
default = null
}
variable "container_image_overrides" {
type = object({
cmd = optional(string)
entrypoint = optional(string)
workdir = optional(string)
})
description = "Container image configuration values that override the values in the container image Dockerfile"
default = null
}
variable "concurrency" {
type = object({
reserved_concurrency = optional(number, -1)
provisioned_concurrencies = optional(map(number), {})
})
description = "Configures Lambda concurrency"
default = null
}
variable "description" {
type = string
description = "Specify the description of the lambda function"
default = null
}
variable "enable_active_tracing" {
type = object({
mode = optional(string, "Active")
})
description = "Enables Lambda active tracing with AWS X-Ray"
default = null
}
variable "enable_function_url" {
type = object({
auth_type = optional(string, "AWS_IAM")
invoke_mode = optional(string, "BUFFERED")
cors_config = optional(object({
allow_credentials = optional(bool, false)
allow_headers = optional(list(string))
allow_methods = optional(list(string), ["*"])
allow_origins = optional(list(string), ["*"])
expose_headers = optional(list(string))
max_age_seconds = optional(number, 0)
}))
})
description = "Enables Lambda function URL endpoint"
default = null
}
variable "environment_variables" {
type = object({
variables = map(string)
kms_key_arn = optional(string)
})
description = "Configure environment variables for the function"
default = null
}
variable "ephemeral_storage" {
type = number
description = "Specify ephemeral storage (/tmp) size in MB for the function runtime"
default = 512
}
variable "execution_role_arn" {
type = string
description = "Specify the ARN of the function's execution role"
default = null
}
variable "file_system_config" {
type = object({
access_point_arn = string
local_mount_path = string
})
description = "Connection settings for an EFS file system"
default = null
}
variable "handler" {
type = string
description = "Specify the function entrypoint in your code"
default = null
}
variable "lambda_permissions" {
type = map(object({
policy_type = string # aws_account, aws_service, function_url
principal = string # service principal, arn of account, user, or role
action = optional(string)
event_source_token = optional(string)
function_url_auth_type = optional(string)
principal_organization_id = optional(string)
source_account_id = optional(string)
source_arn = optional(string)
}))
description = "Gives an external source such as AWS accounts and services permission to invoke the Lambda function"
default = {}
}
variable "layer_arns" {
type = list(string)
description = "List of Lambda layer ARNs. Up to 5"
default = []
}
variable "memory" {
type = number
description = "Specify memory in MB for the function runtime"
default = 128
}
variable "publish_as_new_version" {
type = bool
description = "Whether to publish creation/change as new Lambda Function Version"
default = false
}
variable "runtime" {
type = string
description = "Specify the language runtime"
default = null
}
variable "source_code_hash" {
type = string
description = "Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the deployment package file"
default = null
}
variable "timeout" {
type = number
description = "Specify timeout in seconds for the function"
default = 3
}
variable "vpc_config" {
type = object({
security_group_ids = list(string)
subnet_ids = list(string)
enable_dual_stack = optional(bool, false)
})
description = "Configures options to allow the function network connectivity to AWS resources in a VPC"
default = null
}