-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathREADME.yaml
128 lines (117 loc) · 4.01 KB
/
README.yaml
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
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name : Terraform Module API-GATEWAY-V2
# License of this project
license: "APACHE"
# Canonical GitHub repo
github_repo: clouddrove/terraform-aws-api-gateway
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/clouddrove/terraform-aws-api-gateway.svg"
url: "https://github.com/clouddrove/terraform-aws-api-gateway/releases/latest"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-aws-api-gateway/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-aws-api-gateway/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
- name: "Changelog"
image: "https://img.shields.io/badge/Changelog-blue"
url: "CHANGELOG.md"
prerequesties:
- name: Terraform
url: https://learn.hashicorp.com/terraform/getting-started/install.html
version: ">= 1.6.1"
providers:
- name: aws
url: https://aws.amazon.com/
version: ">= 5.20.0"
module_dependencies:
- name: Labels Module
url: https://github.com/clouddrove/terraform-aws-labels
description: Provides resource tagging.
# description of this project
description: |-
Terraform module api-gateway-v2 to create new modules using this as baseline
# How to use this project
# How to use this project
usage: |-
Here are examples of how you can use this module in your inventory structure:
### complete Example
```hcl
module "api-gateway" {
source = "clouddrove/api-gateway/aws"
version = "1.4.0"
domain_name = "example.cam"
domain_name_certificate_arn = module.acm.arn
integration_uri = module.lambda.arn
zone_id = "1234059QJ345674343"
create_vpc_link_enabled = false
cors_configuration = {
allow_credentials = true
allow_methods = ["GET", "OPTIONS", "POST"]
max_age = 5
}
integrations = {
"ANY /" = {
lambda_arn = module.lambda.arn
payload_format_version = "2.0"
timeout_milliseconds = 12000
}
"GET /some-route-with-authorizer" = {
lambda_arn = module.lambda.arn
payload_format_version = "2.0"
authorizer_key = "cognito"
}
"POST /start-step-function" = {
lambda_arn = module.lambda.arn
payload_format_version = "2.0"
authorizer_key = "cognito"
}
}
}
```
### vpc_link_api Example
```hcl
module "api-gateway" {
source = "clouddrove/api-gateway/aws"
version = "1.4.0"
name = "api"
environment = "test"
label_order = ["environment", "name"]
domain_name = "example.cam"
create_vpc_link_enabled = true
zone_id = "1`23456059QJZ25345678"
integration_uri = module.lambda.arn
domain_name_certificate_arn = module.acm.arn
subnet_ids = tolist(module.public_subnets.public_subnet_id)
security_group_ids = [module.security_group.security_group_ids]
cors_configuration = {
allow_credentials = true
allow_methods = ["GET", "OPTIONS", "POST"]
max_age = 5
}
integrations = {
"ANY /" = {
lambda_arn = module.lambda.arn
payload_format_version = "2.0"
timeout_milliseconds = 12000
}
"GET /some-route-with-authorizer" = {
lambda_arn = module.lambda.arn
payload_format_version = "2.0"
authorizer_key = "cognito"
}
"POST /start-step-function" = {
lambda_arn = module.lambda.arn
payload_format_version = "2.0"
authorizer_key = "cognito"
}
}
}
```