You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-3Lines changed: 23 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,25 @@ module "api_gateway" {
101
101
}
102
102
```
103
103
104
+
## Multiple Subdomains
105
+
106
+
API Gateway v2 supports wildcard custom domains which allow users to map multiple subdomains to the same API Gateway. This is useful when you have multiple customers and you want to provide them with a custom domain for their API endpoint and possibly use that for header based routing/rules.
This will create records that allow users to access the API Gateway using the following subdomains:
120
+
-`customer1.mydomain.com`
121
+
-`customer2.mydomain.com`
122
+
104
123
## Conditional Creation
105
124
106
125
The following values are provided to toggle on/off creation of the associated resources as desired:
@@ -183,7 +202,7 @@ module "api_gateway" {
183
202
| <aname="input_api_key_selection_expression"></a> [api\_key\_selection\_expression](#input\_api\_key\_selection\_expression)| An API key selection expression. Valid values: `$context.authorizer.usageIdentifierKey`, `$request.header.x-api-key`. Defaults to `$request.header.x-api-key`. Applicable for WebSocket APIs |`string`|`null`| no |
184
203
| <aname="input_api_mapping_key"></a> [api\_mapping\_key](#input\_api\_mapping\_key)| The [API mapping key](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html)|`string`|`null`| no |
185
204
| <aname="input_api_version"></a> [api\_version](#input\_api\_version)| A version identifier for the API. Must be between 1 and 64 characters in length |`string`|`null`| no |
| <aname="input_body"></a> [body](#input\_body)| An OpenAPI specification that defines the set of routes and integrations to create as part of the HTTP APIs. Supported only for HTTP APIs |`string`|`null`| no |
| <aname="input_create"></a> [create](#input\_create)| Controls if resources should be created |`bool`|`true`| no |
@@ -205,10 +224,10 @@ module "api_gateway" {
205
224
| <aname="input_protocol_type"></a> [protocol\_type](#input\_protocol\_type)| The API protocol. Valid values: `HTTP`, `WEBSOCKET`|`string`|`"HTTP"`| no |
206
225
| <aname="input_route_key"></a> [route\_key](#input\_route\_key)| Part of quick create. Specifies any route key. Applicable for HTTP APIs |`string`|`null`| no |
207
226
| <aname="input_route_selection_expression"></a> [route\_selection\_expression](#input\_route\_selection\_expression)| The route selection expression for the API. Defaults to `$request.method $request.path`|`string`|`null`| no |
| <aname="input_stage_access_log_settings"></a> [stage\_access\_log\_settings](#input\_stage\_access\_log\_settings)| Settings for logging access in this stage. Use the aws\_api\_gateway\_account resource to configure [permissions for CloudWatch Logging](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html#set-up-access-logging-permissions)| <pre>object({<br> create_log_group = optional(bool, true)<br> destination_arn = optional(string)<br> format = optional(string)<br> log_group_name = optional(string)<br> log_group_retention_in_days = optional(number, 30)<br> log_group_kms_key_id = optional(string)<br> log_group_skip_destroy = optional(bool)<br> log_group_class = optional(string)<br> log_group_tags = optional(map(string), {})<br> })</pre> |`{}`| no |
210
229
| <aname="input_stage_client_certificate_id"></a> [stage\_client\_certificate\_id](#input\_stage\_client\_certificate\_id)| The identifier of a client certificate for the stage. Use the `aws_api_gateway_client_certificate` resource to configure a client certificate. Supported only for WebSocket APIs |`string`|`null`| no |
211
-
| <aname="input_stage_default_route_settings"></a> [stage\_default\_route\_settings](#input\_stage\_default\_route\_settings)| The default route settings for the stage | <pre>object({<br> data_trace_enabled = optional(bool, false)<br> detailed_metrics_enabled = optional(bool, false)<br> logging_level = optional(string)<br> throttling_burst_limit = optional(number, 500)<br> throttling_rate_limit = optional(number, 1000)<br> })</pre> |`{}`| no |
230
+
| <aname="input_stage_default_route_settings"></a> [stage\_default\_route\_settings](#input\_stage\_default\_route\_settings)| The default route settings for the stage | <pre>object({<br> data_trace_enabled = optional(bool, true)<br> detailed_metrics_enabled = optional(bool, true)<br> logging_level = optional(string)<br> throttling_burst_limit = optional(number, 500)<br> throttling_rate_limit = optional(number, 1000)<br> })</pre> |`{}`| no |
212
231
| <aname="input_stage_description"></a> [stage\_description](#input\_stage\_description)| The description for the stage. Must be less than or equal to 1024 characters in length |`string`|`null`| no |
213
232
| <aname="input_stage_name"></a> [stage\_name](#input\_stage\_name)| The name of the stage. Must be between 1 and 128 characters in length |`string`|`"$default"`| no |
214
233
| <aname="input_stage_tags"></a> [stage\_tags](#input\_stage\_tags)| A mapping of tags to assign to the stage resource |`map(string)`|`{}`| no |
@@ -241,6 +260,7 @@ module "api_gateway" {
241
260
| <aname="output_stage_access_logs_cloudwatch_log_group_arn"></a> [stage\_access\_logs\_cloudwatch\_log\_group\_arn](#output\_stage\_access\_logs\_cloudwatch\_log\_group\_arn)| Arn of cloudwatch log group created |
242
261
| <aname="output_stage_access_logs_cloudwatch_log_group_name"></a> [stage\_access\_logs\_cloudwatch\_log\_group\_name](#output\_stage\_access\_logs\_cloudwatch\_log\_group\_name)| Name of cloudwatch log group created |
243
262
| <aname="output_stage_arn"></a> [stage\_arn](#output\_stage\_arn)| The stage ARN |
263
+
| <aname="output_stage_domain_name"></a> [stage\_domain\_name](#output\_stage\_domain\_name)| Domain name of the stage (useful for CloudFront distribution) |
244
264
| <aname="output_stage_execution_arn"></a> [stage\_execution\_arn](#output\_stage\_execution\_arn)| The ARN prefix to be used in an aws\_lambda\_permission's source\_arn attribute or in an aws\_iam\_policy to authorize access to the @connections API |
245
265
| <aname="output_stage_id"></a> [stage\_id](#output\_stage\_id)| The stage identifier |
246
266
| <aname="output_stage_invoke_url"></a> [stage\_invoke\_url](#output\_stage\_invoke\_url)| The URL to invoke the API pointing to the stage |
| <aname="input_domain_name"></a> [domain\_name](#input\_domain\_name)| Custom domain name to use on API Gateway endpoint |`string`|`"*.terraform-aws-modules.modules.tf"`| no |
64
+
| <aname="input_domain_name"></a> [domain\_name](#input\_domain\_name)| Custom domain name to use on API Gateway endpoint |`string`|`"terraform-aws-modules.modules.tf"`| no |
65
65
66
66
## Outputs
67
67
@@ -84,6 +84,7 @@ Note that this example may create resources which cost money. Run `terraform des
84
84
| <aname="output_stage_access_logs_cloudwatch_log_group_arn"></a> [stage\_access\_logs\_cloudwatch\_log\_group\_arn](#output\_stage\_access\_logs\_cloudwatch\_log\_group\_arn)| Arn of cloudwatch log group created |
85
85
| <aname="output_stage_access_logs_cloudwatch_log_group_name"></a> [stage\_access\_logs\_cloudwatch\_log\_group\_name](#output\_stage\_access\_logs\_cloudwatch\_log\_group\_name)| Name of cloudwatch log group created |
86
86
| <aname="output_stage_arn"></a> [stage\_arn](#output\_stage\_arn)| The stage ARN |
87
+
| <aname="output_stage_domain_name"></a> [stage\_domain\_name](#output\_stage\_domain\_name)| Domain name of the stage (useful for CloudFront distribution) |
87
88
| <aname="output_stage_execution_arn"></a> [stage\_execution\_arn](#output\_stage\_execution\_arn)| The ARN prefix to be used in an aws\_lambda\_permission's source\_arn attribute or in an aws\_iam\_policy to authorize access to the @connections API |
88
89
| <aname="output_stage_id"></a> [stage\_id](#output\_stage\_id)| The stage identifier |
89
90
| <aname="output_stage_invoke_url"></a> [stage\_invoke\_url](#output\_stage\_invoke\_url)| The URL to invoke the API pointing to the stage |
Copy file name to clipboardExpand all lines: examples/vpc-link-http/README.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,7 @@ No inputs.
73
73
| <aname="output_stage_access_logs_cloudwatch_log_group_arn"></a> [stage\_access\_logs\_cloudwatch\_log\_group\_arn](#output\_stage\_access\_logs\_cloudwatch\_log\_group\_arn)| Arn of cloudwatch log group created |
74
74
| <aname="output_stage_access_logs_cloudwatch_log_group_name"></a> [stage\_access\_logs\_cloudwatch\_log\_group\_name](#output\_stage\_access\_logs\_cloudwatch\_log\_group\_name)| Name of cloudwatch log group created |
75
75
| <aname="output_stage_arn"></a> [stage\_arn](#output\_stage\_arn)| The stage ARN |
76
+
| <aname="output_stage_domain_name"></a> [stage\_domain\_name](#output\_stage\_domain\_name)| Domain name of the stage (useful for CloudFront distribution) |
76
77
| <aname="output_stage_execution_arn"></a> [stage\_execution\_arn](#output\_stage\_execution\_arn)| The ARN prefix to be used in an aws\_lambda\_permission's source\_arn attribute or in an aws\_iam\_policy to authorize access to the @connections API |
77
78
| <aname="output_stage_id"></a> [stage\_id](#output\_stage\_id)| The stage identifier |
78
79
| <aname="output_stage_invoke_url"></a> [stage\_invoke\_url](#output\_stage\_invoke\_url)| The URL to invoke the API pointing to the stage |
0 commit comments