api-gateway-cors-lambda-proxy
dod-iac/api-gateway-cors-lambda-proxy/aws
A Terraform module to create a Cross-Origin Resource Sharing (CORS) Lambda Proxy
Install
README
Terraform AWS API Gateway CORS Lambda Proxy Description A Terraform module to create a Cross-Origin Resource Sharing (CORS) Lambda Proxy. Orignal code forked from squidfunk/terraform-aws-api-gateway-enable-cors Usage `` hcl module "cors_lambda" { source = "dds-cw/api-gateway-cors-lambda-proxy/aws" version = "0.0.1" api_id = aws_api_gateway_rest_api.main_api.id api_resource_id = aws_api_gateway_resource.main_api_streams_resource.id http_method = "GET" invoke_arn = aws_lambda_function.stream_lambda.invoke_arn invoke_policy_arn = aws_iam_role.api_role.arn allow_methods = [ "OPTIONS", "GET" ] allow_headers = [ "Authorization", "Content-Type", "X-Amz-Date", "X-Amz-Security-Token", "X-Api-Key", "next-query", ] } ` By default, this will create a new MOCK endpoint on the provided API Gateway resou
Inputs (10)
| Name | Type | Description | Default |
|---|---|---|---|
| api_resource_id | string | API resource identifier | required |
| http_method | string | API http method | required |
| invoke_arn | string | API Lambda Invoke ARN | required |
| invoke_policy_arn | string | IAM Policy to allow Lambda invoke | required |
| api_id | string | API identifier | required |
| allow_credentials | string | Allow credentials (`Access-Control-Allow-Credentials`) | false |
| allow_methods | list(string) | Allow methods (`Access-Control-Allow-Methods`) | [
"OPTIONS",
"HEAD",
"GET",
"POS |
| allow_max_age | string | Allow response caching time (`Access-Control-Allow-Max-Age`) | "7200" |
| allow_headers | list(string) | Allow headers (`Access-Control-Allow-Headers`) | [
"Authorization",
"Content-Type",
|
| allow_origin | string | Allow origin (`Access-Control-Allow-Origin`) | "*" |
Resources (4)
Topics & Tags
Details
Similar packages
Azure landing zones Terraform module
Terraform supermodule for the Terraform platform engineering for Azure
Terraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Module to define a consistent naming convention by (namespace, stage,