Google Service Directory Endpoint

This page shows how to write Terraform for Service Directory Endpoint and write them securely.

google_service_directory_endpoint (Terraform)

The Endpoint in Service Directory can be configured in Terraform with the resource name google_service_directory_endpoint. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Review your Terraform file for Google best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


The following arguments are supported:

  • service - (Required) The resource name of the service that this endpoint provides.

  • endpoint_id - (Required) The Resource ID must be 1-63 characters long, including digits, lowercase letters or the hyphen character.

  • address - (Optional) IPv4 or IPv6 address of the endpoint.

  • port - (Optional) Port that the endpoint is running on, must be in the range of [0, 65535]. If unspecified, the default is 0.

  • metadata - (Optional) Metadata for the endpoint. This data can be consumed by service clients. The entire metadata dictionary may contain up to 512 characters, spread across all key-value pairs. Metadata that goes beyond any these limits will be rejected.

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format [[name]]

  • name - The resource name for the endpoint in the format projects/*/locations/*/namespaces/*/services/*/endpoints/*.

Explanation in Terraform Registry

An individual endpoint that provides a service.

Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources. To get more information about Endpoint, see:

Frequently asked questions

What is Google Service Directory Endpoint?

Google Service Directory Endpoint is a resource for Service Directory of Google Cloud Platform. Settings can be wrote in Terraform.


Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.