This repository has been archived by the owner on Oct 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
190 lines (161 loc) · 5 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
variable "create" {
description = "Controls if API Gateway resources should be created"
type = bool
default = true
}
variable "create_api_gateway" {
description = "Whether to create API Gateway"
type = bool
default = true
}
variable "create_default_stage" {
description = "Whether to create default stage"
type = bool
default = true
}
variable "create_default_stage_api_mapping" {
description = "Whether to create default stage API mapping"
type = bool
default = true
}
# variable "create_stage" {
# description = "Whether to create custom stage"
# type = bool
# default = false
# }
#
# variable "create_stage_api_mapping" {
# description = "Whether to create stage API mapping"
# type = bool
# default = false
# }
variable "create_api_domain_name" {
description = "Whether to create API domain name resource"
type = bool
default = true
}
variable "create_routes_and_integrations" {
description = "Whether to create routes and integrations resources"
type = bool
default = true
}
variable "create_vpc_link" {
description = "Whether to create VPC links"
type = bool
default = true
}
# API Gateway
variable "name" {
description = "The name of the API"
type = string
default = ""
}
variable "description" {
description = "The description of the API."
type = string
default = null
}
variable "protocol_type" {
description = "The API protocol. Valid values: HTTP, WEBSOCKET"
type = string
default = "HTTP"
}
variable "api_key_selection_expression" {
description = "An API key selection expression. Valid values: $context.authorizer.usageIdentifierKey, $request.header.x-api-key."
type = string
default = "$request.header.x-api-key"
}
variable "route_key" {
description = "Part of quick create. Specifies any route key. Applicable for HTTP APIs."
type = string
default = null
}
variable "route_selection_expression" {
description = "The route selection expression for the API."
type = string
default = "$request.method $request.path"
}
variable "cors_configuration" {
description = "The cross-origin resource sharing (CORS) configuration. Applicable for HTTP APIs."
type = any
default = {}
}
variable "credentials_arn" {
description = "Part of quick create. Specifies any credentials required for the integration. Applicable for HTTP APIs."
type = string
default = null
}
variable "target" {
description = "Part of quick create. Quick create produces an API with an integration, a default catch-all route, and a default stage which is configured to automatically deploy changes. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. Applicable for HTTP APIs."
type = string
default = null
}
variable "body" {
description = "An OpenAPI specification that defines the set of routes and integrations to create as part of the HTTP APIs. Supported only for HTTP APIs."
type = string
default = null
}
variable "api_version" {
description = "A version identifier for the API"
type = string
default = null
}
variable "tags" {
description = "A mapping of tags to assign to API gateway resources."
type = map(string)
default = {}
}
#####
# default stage
variable "default_stage_access_log_destination_arn" {
description = "Default stage's ARN of the CloudWatch Logs log group to receive access logs. Any trailing :* is trimmed from the ARN."
type = string
default = null
}
variable "default_stage_access_log_format" {
description = "Default stage's single line format of the access logs of data, as specified by selected $context variables."
type = string
default = null
}
variable "default_stage_tags" {
description = "A mapping of tags to assign to the default stage resource."
type = map(string)
default = {}
}
#####
# default stage API mapping
####
# domain name
variable "domain_name" {
description = "The domain name to use for API gateway"
type = string
default = null
}
variable "domain_name_certificate_arn" {
description = "The ARN of an AWS-managed certificate that will be used by the endpoint for the domain name"
type = string
default = null
}
variable "domain_name_tags" {
description = "A mapping of tags to assign to API domain name resource."
type = map(string)
default = {}
}
####
# routes and integrations
variable "integrations" {
description = "Map of API gateway routes with integrations"
type = map(any)
default = {}
}
# vpc link
variable "vpc_links" {
description = "Map of VPC Links details to create"
type = map(any)
default = {}
}
variable "vpc_link_tags" {
description = "A map of tags to add to the VPC Link"
type = map(string)
default = {}
}