forked from claranet/terraform-aws-lambda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
128 lines (103 loc) · 2.42 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
# Required variables.
variable "function_name" {
type = string
}
variable "handler" {
type = string
}
variable "runtime" {
type = string
}
variable "source_path" {
description = "The absolute path to a local file or directory containing your Lambda source code"
type = string
}
# Optional variables specific to this module.
variable "build_command" {
description = "The command to run to create the Lambda package zip file"
type = string
default = "python build.py '$filename' '$runtime' '$source'"
}
variable "build_paths" {
description = "The files or directories used by the build command, to trigger new Lambda package builds whenever build scripts change"
type = list(string)
default = ["build.py"]
}
variable "cloudwatch_logs" {
description = "Set this to false to disable logging your Lambda output to CloudWatch Logs"
type = bool
default = true
}
variable "policy" {
description = "An addional policy to attach to the Lambda function"
type = string
default = null
}
variable "lambda_at_edge" {
description = "Set this to true if using Lambda@Edge, to enable publishing, limit the timeout, and allow edgelambda.amazonaws.com to invoke the function"
type = bool
default = false
}
locals {
publish = var.lambda_at_edge ? true : var.publish
timeout = var.lambda_at_edge ? min(var.timeout, 5) : var.timeout
}
# Optional attributes to pass through to the resource.
variable "description" {
type = string
default = null
}
variable "layers" {
type = list(string)
default = null
}
variable "kms_key_arn" {
type = string
default = null
}
variable "memory_size" {
type = number
default = null
}
variable "publish" {
type = bool
default = false
}
variable "reserved_concurrent_executions" {
type = number
default = null
}
variable "tags" {
type = map(string)
default = null
}
variable "timeout" {
type = number
default = 3
}
# Optional blocks to pass through to the resource.
variable "dead_letter_config" {
type = object({
target_arn = string
})
default = null
}
variable "environment" {
type = object({
variables = map(string)
})
default = null
}
variable "tracing_config" {
type = object({
mode = string
})
default = null
}
variable "vpc_config" {
type = object({
security_group_ids = list(string)
subnet_ids = list(string)
})
default = null
}