Back to Terraform Provider Aws

API Gateway REST API OpenAPI Example

examples/api-gateway-rest-api-openapi/README.md

6.43.0940 B
Original Source
<!-- Copyright IBM Corp. 2014, 2026 --> <!-- SPDX-License-Identifier: MPL-2.0 -->

API Gateway REST API OpenAPI Example

This example demonstrates how to create an end-to-end AWS API Gateway REST API setup with an OpenAPI configuration that proxies the AWS IP Address Ranges JSON, enables CloudWatch metrics, and sets up a domain with a self-signed TLS certificate to mimic a real-world endpoint. The outputs will provide sample curl commands to verify the REST API deployment.

Running this Example

Terraform variables are available to modify this example, see the variables.tf file. They can be provided by cp terraform.template.tfvars terraform.tfvars, modifying terraform.tfvars with your variables, and running terraform apply. Alternatively, the variables can be provided as flags by running:

shell
terraform apply -var="aws_region=us-west-2"