This module provisions a Google Cloud API Gateway using an OpenAPI specification.
module "api_gateway" {
source = "nurdsoft/api-gateway/google"
version = "0.1.0"
project_id = var.project_id
region = var.region
environment = var.environment
api_id = "my-api"
gateway_id = "my-gateway"
api_display_name = "My API Gateway"
openapi_spec = base64encode(file("${path.module}/files/openapi.yaml"))
labels = {
env = var.environment
}
}| Name | Version |
|---|---|
| terraform | >= 1.3.0 |
| ~> 5.0 | |
| google-beta | ~> 5.0 |
| Name | Version |
|---|---|
| google-beta | ~> 5.0 |
| Name | Type |
|---|---|
| google-beta_google_api_gateway_api.api | resource |
| google-beta_google_api_gateway_api_config.api_config | resource |
| google-beta_google_api_gateway_gateway.gateway | resource |
| google-beta_google_service_account.api_gateway_invoker_sa | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| api_display_name | Display name for the API Gateway and associated components. | string |
n/a | yes |
| api_gateway_sa_account_id | The account_id for the new Service Account to be created for API Gateway backend auth. | string |
"api-gateway-invoker-sa" |
no |
| api_id | The unique identifier for the API Gateway API. | string |
n/a | yes |
| environment | environment | string |
n/a | yes |
| gateway_id | The unique identifier for the Gateway instance. | string |
n/a | yes |
| labels | Labels. | map(string) |
{} |
no |
| openapi_document_name | openapi document name used in the API Config. | string |
n/a | yes |
| openapi_spec | Base64 OpenAPI specification encoded format. This will be loaded and embedded directly in the API Config. | string |
n/a | yes |
| project_id | Project ID | string |
n/a | yes |
| region | The region where the API Gateway will be deployed. | string |
n/a | yes |
| Name | Description |
|---|---|
| gateway_url | n/a |
| service_account_email | The email of the service account created for API Gateway backend auth. |
| service_account_member | The IAM member identifier (with 'serviceAccount:' prefix) for the service account. |
Module is maintained by Nurdsoft.
Apache 2 Licensed. See LICENSE for full details.