Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rpstreef/tf-apigateway
Terraform API Gateway Module
https://github.com/rpstreef/tf-apigateway
api-gateway cloudwatch cloudwatch-alarms terraform terraform-module
Last synced: 1 day ago
JSON representation
Terraform API Gateway Module
- Host: GitHub
- URL: https://github.com/rpstreef/tf-apigateway
- Owner: rpstreef
- License: apache-2.0
- Created: 2020-02-12T07:48:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-03-01T15:35:39.000Z (over 4 years ago)
- Last Synced: 2023-12-12T04:29:20.490Z (11 months ago)
- Topics: api-gateway, cloudwatch, cloudwatch-alarms, terraform, terraform-module
- Language: HCL
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform API Gateway Module
## About:
Supports basic setup of API Gateway with an OpenAPI 3 YML document:
These parameters configure the use of the OpenAPI 3 document:
- __api_template__: API Gateway OpenAPI 3 template file
- __api_template_vars__: Variables required in the OpenAPI template fileAdded support for CloudWatch Alarms in __v1.2__, use the ```var.resources``` parameter to specify which endpoints you want to monitor.
## How to use:
Call the module with the specific version you want using the ```ref``` query parameter:
```terraform
# -----------------------------------------------------------------------------
# API Gateway
# -----------------------------------------------------------------------------
module "apigateway" {
source = "github.com/rpstreef/tf-apigateway?ref=v1.0"
resource_tag_name = var.resource_tag_name
namespace = var.namespace
region = var.regionapi_name = local.api_name
api_throttling_rate_limit = var.api_throttling_rate_limit
api_throttling_burst_limit = var.api_throttling_burst_limit
api_metrics_enabled = var.api_metrics_enabled
api_logging_level = var.api_logging_level
api_template = file("../../services/api/${local.api_name}.yml")
api_template_vars = {
region = var.region
}resources = {
"/identity/authenticate" = "POST",
"/identity/register" = "POST",
"/identity/reset" = "POST",
"/identity/verify" = "POST",
"/user" = "GET"
}
}
```## Changelog
### v1.3
- removed Lambda source code check, use this if you deploy your source code with CodePipeline### v1.2
Use the resources parameter ```var.resources``` to specify which API endpoints you want the following Alarms to be enabled:- latency P95
- latency P99
- 400 Errors
- 500 Errors### v1.1
- added data trace variable
- added X-Ray tracing variable### v1.0
Initial release