{"id":19508943,"url":"https://github.com/rhythmictech/terraform-aws-api-gateway","last_synced_at":"2026-01-04T20:43:36.059Z","repository":{"id":42422642,"uuid":"271620932","full_name":"rhythmictech/terraform-aws-api-gateway","owner":"rhythmictech","description":"API Gateway, Domain, Logging, and optional authorizer. Methods, Stage, and Deployment sold separately. ","archived":false,"fork":false,"pushed_at":"2022-04-06T20:29:28.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T14:07:20.899Z","etag":null,"topics":["api-gateway","aws","cognito-user-pool","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/rhythmictech/api-gateway/aws","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhythmictech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-06-11T18:36:07.000Z","updated_at":"2022-03-07T15:19:07.000Z","dependencies_parsed_at":"2022-09-11T02:21:06.402Z","dependency_job_id":null,"html_url":"https://github.com/rhythmictech/terraform-aws-api-gateway","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":"rhythmictech/terraform-terraform-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-api-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-api-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-api-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-api-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhythmictech","download_url":"https://codeload.github.com/rhythmictech/terraform-aws-api-gateway/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066711,"owners_count":20555431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-gateway","aws","cognito-user-pool","terraform","terraform-module"],"created_at":"2024-11-10T23:10:26.184Z","updated_at":"2026-01-04T20:43:36.018Z","avatar_url":"https://github.com/rhythmictech.png","language":"HCL","readme":"# terraform-aws-api-gateway [![](https://github.com/rhythmictech/terraform-aws-api-gateway/workflows/pre-commit-check/badge.svg)](https://github.com/rhythmictech/terraform-aws-api-gateway/actions) \u003ca href=\"https://twitter.com/intent/follow?screen_name=RhythmicTech\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/RhythmicTech?style=social\u0026logo=twitter\" alt=\"follow on Twitter\"\u003e\u003c/a\u003e\nCreates an API Gateway with:\n- CloudWatch logging\n- Regional Domain Name\n- Optional Authorizer\n\n## About\nAWS API Gateway is commonly used to publicly expose a series of AWS Lambdas or ECS Services. It enables all sorts of goodies like a Web Application Firewall (WAF), access logging, and authentication. API Gateway deployments have a few main steps:\n\n0. Create the Actual APIs. Do this in whatever language you want, just make sure they're documented with swagger/OpenAPI\n1. Create the API Gateway (this module)\n2. Populate the API Methods. You can do this just by uploading a swagger file\n3. Deploy to a stage of the API\n\n## Example\nHere's what using the module will look like. See the [examples](examples) for more.\n```hcl\nmodule \"example\" {\n  source  = \"rhythmictech/api-gateway/aws\n  version = \"1.0.0\"\n\n  name                     = \"test\"\n  domain_name              = \"test-api.sblack.rocks\"\n  regional_certificate_arn = \"arn:aws:acm:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:certificate/6e8becd7-349e-48bf-b11b-97f4c7e901c8\"\n  tags = {\n    delete_me   = \"please\"\n    Environment = \"sandbox\"\n    whodunnit   = \"@sblack4\"\n  }\n}\n```\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.12.20 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e= 2.48.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e= 2.48.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_api_gateway_authorizer.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_authorizer) | resource |\n| [aws_api_gateway_domain_name.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_domain_name) | resource |\n| [aws_api_gateway_rest_api.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_rest_api) | resource |\n| [aws_cloudwatch_log_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |\n| [aws_route53_record.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_api_key_source\"\u003e\u003c/a\u003e [api\\_key\\_source](#input\\_api\\_key\\_source) | The source of the API key for requests. Valid values are HEADER (default) and AUTHORIZER. | `string` | `\"HEADER\"` | no |\n| \u003ca name=\"input_binary_media_types\"\u003e\u003c/a\u003e [binary\\_media\\_types](#input\\_binary\\_media\\_types) | The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads. | `list(any)` | \u003cpre\u003e[\u003cbr\u003e  \"UTF-8-encoded\"\u003cbr\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_description\"\u003e\u003c/a\u003e [description](#input\\_description) | Description for the API Gateway. | `string` | `\"\"` | no |\n| \u003ca name=\"input_domain_name\"\u003e\u003c/a\u003e [domain\\_name](#input\\_domain\\_name) | The fully-qualified domain name to register | `string` | n/a | yes |\n| \u003ca name=\"input_endpoint_configuration\"\u003e\u003c/a\u003e [endpoint\\_configuration](#input\\_endpoint\\_configuration) | API gateway endpoint config. REGIONAL or EDGE | `string` | `\"EDGE\"` | no |\n| \u003ca name=\"input_identity_source\"\u003e\u003c/a\u003e [identity\\_source](#input\\_identity\\_source) | The source of the identity in an incoming request.\u003cbr\u003eFor REQUEST type, this may be a comma-separated list of values, including headers, query string parameters and stage variables - e.g.\u003cbr\u003e`\"method.request.header.SomeHeaderName,method.request.querystring.SomeQueryStringName,stageVariables.SomeStageVariableName\"` | `string` | `\"method.request.header.x-api-key\"` | no |\n| \u003ca name=\"input_log_retention_in_days\"\u003e\u003c/a\u003e [log\\_retention\\_in\\_days](#input\\_log\\_retention\\_in\\_days) | Days to retain apigateway logs | `number` | `30` | no |\n| \u003ca name=\"input_minimum_compression_size\"\u003e\u003c/a\u003e [minimum\\_compression\\_size](#input\\_minimum\\_compression\\_size) | Minimum response size to compress for the REST API. Integer between -1 and 10485760 (10MB). Setting a value greater than -1 will enable compression, -1 disables compression (default). | `number` | `-1` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Moniker to apply to all resources in the module | `string` | n/a | yes |\n| \u003ca name=\"input_provider_arns\"\u003e\u003c/a\u003e [provider\\_arns](#input\\_provider\\_arns) | A list of the Amazon Cognito user pool ARNs. Each element is of this format:\u003cbr\u003e`arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}`. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_regional_certificate_arn\"\u003e\u003c/a\u003e [regional\\_certificate\\_arn](#input\\_regional\\_certificate\\_arn) | The ARN for an AWS-managed certificate. AWS Certificate Manager is the only supported source. | `string` | n/a | yes |\n| \u003ca name=\"input_route53_evaluate_target_health\"\u003e\u003c/a\u003e [route53\\_evaluate\\_target\\_health](#input\\_route53\\_evaluate\\_target\\_health) | Bool for Route 53 alias target health eval | `bool` | `true` | no |\n| \u003ca name=\"input_route53_zone_id\"\u003e\u003c/a\u003e [route53\\_zone\\_id](#input\\_route53\\_zone\\_id) | Zone ID for Route 53 DNS entry | `string` | n/a | yes |\n| \u003ca name=\"input_security_policy\"\u003e\u003c/a\u003e [security\\_policy](#input\\_security\\_policy) | The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are TLS\\_1\\_0 and TLS\\_1\\_2. Must be configured to perform drift detection. | `string` | `\"TLS_1_2\"` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | User-Defined tags | `map(string)` | `{}` | no |\n| \u003ca name=\"input_types\"\u003e\u003c/a\u003e [types](#input\\_types) | A list of endpoint types. This resource currently only supports managing a single value.\u003cbr\u003eValid values: EDGE, REGIONAL or PRIVATE. If unspecified, defaults to EDGE. Must be declared as REGIONAL in non-Commercial partitions.\u003cbr\u003eRefer to the documentation for more information on the difference between edge-optimized and regional APIs. | `list(string)` | \u003cpre\u003e[\u003cbr\u003e  \"EDGE\"\u003cbr\u003e]\u003c/pre\u003e | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_api_gateway_authorizer_id\"\u003e\u003c/a\u003e [api\\_gateway\\_authorizer\\_id](#output\\_api\\_gateway\\_authorizer\\_id) | The ID of the Authorizer |\n| \u003ca name=\"output_api_gateway_rest_api_arn\"\u003e\u003c/a\u003e [api\\_gateway\\_rest\\_api\\_arn](#output\\_api\\_gateway\\_rest\\_api\\_arn) | Amazon Resource Name (ARN) |\n| \u003ca name=\"output_api_gateway_rest_api_id\"\u003e\u003c/a\u003e [api\\_gateway\\_rest\\_api\\_id](#output\\_api\\_gateway\\_rest\\_api\\_id) | The ID of the REST API |\n| \u003ca name=\"output_cloudwatch_log_group_arn\"\u003e\u003c/a\u003e [cloudwatch\\_log\\_group\\_arn](#output\\_cloudwatch\\_log\\_group\\_arn) | The Amazon Resource Name (ARN) specifying the log group. |\n| \u003ca name=\"output_domain_name\"\u003e\u003c/a\u003e [domain\\_name](#output\\_domain\\_name) | aws\\_api\\_gateway\\_domain\\_name resource |\n| \u003ca name=\"output_domain_name_arn\"\u003e\u003c/a\u003e [domain\\_name\\_arn](#output\\_domain\\_name\\_arn) | Amazon Resource Name (ARN) |\n| \u003ca name=\"output_domain_name_id\"\u003e\u003c/a\u003e [domain\\_name\\_id](#output\\_domain\\_name\\_id) | The internal id assigned to this domain name by API Gateway. |\n| \u003ca name=\"output_route53_entry\"\u003e\u003c/a\u003e [route53\\_entry](#output\\_route53\\_entry) | aws\\_route53\\_record A for aws\\_api\\_gateway\\_domain\\_name |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## The Giants underneath this module\n- pre-commit.com/\n- terraform.io/\n- github.com/tfutils/tfenv\n- github.com/segmentio/terraform-docs\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-api-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhythmictech%2Fterraform-aws-api-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-api-gateway/lists"}