Skip to content

direct-democracy-solutions/terraform-aws-http-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-http-proxy

A module that creates a basic transparent HTTP Proxy with API Gateway.

Useful for things like solving CORS issues when developing for a third-party API.

Quickstart

Make sure you have a Route53 Hosted Zone set up already.

module {
  source  = "direct-democracy-solutions/http-proxy/aws"
  version = "1.0.0"
  api_display_name = "example-dot-com-proxy"
  api_description  = "Transparent proxy to example.com"
  target_url       = "http://example.com"
  api_mapping_key  = ""  # Set this if you want to proxy only the part of the path after a certain prefix
  full_domain_name = "mycoolproxy.mydomain.com"  # The proxy will be addressable here
  hosted_zone_id   = "23AOIPODTNI98"  # Replace with your own hosted zone ID
}

The module will create a proxy gateway at the requested location, with a valid TLS certificate. Logs are streamed to CloudWatch.

Custom Integration

To integrate with something other than an HTTP service, pass the variable auto_create_route=false and omit target_url. Then you can define your own aws_apigatewayv2_route and aws_apigatewayv2_integration objects. To attach them to the API Gateway, use the module's api_id output.

About

Basic transparent HTTP Proxy with API Gateway

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages