# API Gateway This module allows creating an API with its associated API config and API gateway. It also allows you grant IAM roles on the created resources. # Examples ## Basic example ```hcl module "gateway" { source = "./fabric/modules/api-gateway" project_id = "my-project" api_id = "api" region = "europe-west1" spec = < ## Variables | name | description | type | required | default | |---|---|:---:|:---:|:---:| | [api_id](variables.tf#L17) | API identifier. | string | ✓ | | | [project_id](variables.tf#L34) | Project identifier. | string | ✓ | | | [region](variables.tf#L39) | Region. | string | ✓ | | | [spec](variables.tf#L56) | String with the contents of the OpenAPI spec. | string | ✓ | | | [iam](variables.tf#L22) | IAM bindings for the API in {ROLE => [MEMBERS]} format. | map(list(string)) | | null | | [labels](variables.tf#L28) | Map of labels. | map(string) | | null | | [service_account_create](variables.tf#L44) | Flag indicating whether a service account needs to be created. | bool | | false | | [service_account_email](variables.tf#L50) | Service account for creating API configs. | string | | null | ## Outputs | name | description | sensitive | |---|---|:---:| | [api](outputs.tf#L17) | API. | | | [api_config](outputs.tf#L28) | API configs. | | | [api_config_id](outputs.tf#L39) | The identifiers of the API configs. | | | [api_id](outputs.tf#L50) | API identifier. | | | [default_hostname](outputs.tf#L61) | The default host names of the API gateway. | | | [gateway](outputs.tf#L72) | API gateways. | | | [gateway_id](outputs.tf#L83) | The identifiers of the API gateways. | | | [service_account](outputs.tf#L94) | Service account resource. | | | [service_account_email](outputs.tf#L99) | The service account for creating API configs. | | | [service_account_iam_email](outputs.tf#L104) | The service account for creating API configs. | |