google_endpoints_service

This resource creates and rolls out a Cloud Endpoints service using OpenAPI or gRPC. View the relevant docs for OpenAPI and gRPC.

Example Usage

resource "google_endpoints_service" "openapi_service" {
  service_name   = "api-name.endpoints.project-id.cloud.goog"
  project        = "project-id"
  openapi_config = file("openapi_spec.yml")
}

resource "google_endpoints_service" "grpc_service" {
  service_name         = "api-name.endpoints.project-id.cloud.goog"
  project              = "project-id"
  grpc_config          = file("service_spec.yml")
  protoc_output_base64 = filebase64("compiled_descriptor_file.pb")
}

The example in examples/endpoints_on_compute_engine shows the API from the quickstart running on a Compute Engine VM and reachable through Cloud Endpoints, which may also be useful.

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments, the following attributes are available:


API Object Structure

Method Object Structure

Endpoint Object Structure

Import

This resource does not support import.

Timeouts

This resource provides the following Timeouts configuration options: configuration options: