-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
98 lines (84 loc) · 2.21 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
variable "resources_prefix" {
description = "Prefix for resources, prefer to use the project name"
type = string
nullable = true
default = null
}
variable "region" {
description = "AWS region"
type = string
default = "us-east-1"
}
variable "access_key_id" {
description = "AWS Access Key used to build and push Lambda Docker image"
type = string
nullable = true
default = null
}
variable "secret_access_key" {
description = "AWS Secret Access Key used to build and push Lambda Docker image"
type = string
nullable = true
default = null
}
variable "lambda" {
description = "Lambda configuration"
type = object({
name = string
version = string
description = string
handler = optional(string)
runtime = optional(string)
timeout = optional(number, 3)
memory_size = optional(number, 128)
publish = bool
policies = optional(map(object({
effect = string
resources = list(string)
actions = list(string)
})))
environment_variables = optional(map(string))
})
}
variable "s3" {
description = "Bucket for storing the Lambda package"
type = object({
bucket = string
new = optional(bool, false)
local_package_path = string
})
nullable = true
default = null
}
variable "ecr" {
description = "ECR repository for storing the Lambda package"
type = object({
repository = string
dockerfile_path = string
stage = optional(string)
})
nullable = true
default = null
}
variable "sqs_event_mapping" {
description = "SQS event mapping configuration"
type = object({
queue_name = string
function_response_types = list(string)
batch_size = optional(number, 10)
scaling_config = optional(object({
maximum_concurrency = number
}))
})
nullable = true
default = null
}
variable "api_gateway" {
description = "API Gateway to trigger the Lambda function"
type = object({ # Should pass the name or the ARN
name = optional(string)
execution_arn = optional(string) # ARN will be preferred
})
nullable = true
default = null
}