Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

Repository files navigation

Terraform AWS Maintenance Mode API module

terraform module which creates AWS API Gateway and Route53 resources for a maintenancenmode

Terraform GitHub Actions

  • creates API Gateway mock for toggling maintenance mode (ON/OFF)
  • API Gateway endpoint will return a HTTP status 200 if maintenance mode is OFF or 503 when maintenance is ON for GET and OPTIONS
  • GET returns a static maintenance html
  • can add additional route53 weighted records that point to API Gateway and other Location

examples

  • simple mvp example for module usage

documentation

documentation is generated via terraform-docs markdown .

Requirements

Name Version
terraform ~> 0.14.11
aws ~> 3.42.0

Providers

Name Version
aws ~> 3.42.0

Modules

No modules.

Resources

Name Type
aws_acm_certificate.maintenance_api resource
aws_acm_certificate_validation.maintenance_api_cert resource
aws_api_gateway_base_path_mapping.restapi resource
aws_api_gateway_deployment.restapi resource
aws_api_gateway_domain_name.restapi resource
aws_api_gateway_integration.get resource
aws_api_gateway_integration.options resource
aws_api_gateway_integration_response.get_response_200 resource
aws_api_gateway_integration_response.get_response_503 resource
aws_api_gateway_integration_response.options_response_200 resource
aws_api_gateway_method.get resource
aws_api_gateway_method.options resource
aws_api_gateway_method_response.get_response_200 resource
aws_api_gateway_method_response.get_response_503 resource
aws_api_gateway_method_response.options_response_200 resource
aws_api_gateway_rest_api.restapi resource
aws_api_gateway_stage.restapi resource
aws_route53_record.maintenance_api resource
aws_route53_record.maintenance_api_cert_validations resource
aws_api_gateway_resource.restapi data source

Inputs

Name Description Type Default Required
api_domain_name main url for the maintenance api endpoint string n/a yes
api_name name of api-gateway string n/a yes
api_stage_name stage_name point so api endpoint string n/a yes
html_template mailto email address for html template map(string)
{
"mailto": "MAILTO",
"team": "TEAM"
}
no
maintenance_modes true indicates environment is in maintenance mode bool n/a yes
tags map of tags passed into module map(string) {} no
zone_id aws route 53 zone id string n/a yes

Outputs

Name Description
api_id id of the API to connect
stage_name name of a specific deployment stage to expose at the given path

license

MIT Licensed. See LICENSE for full details.

About

No description or website provided.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages