» google_service_directory_namespace

A container for services. Namespaces allow administrators to group services together and define permissions for a collection of services.

To get more information about Namespace, see:

» Example Usage - Service Directory Namespace Basic

resource "google_service_directory_namespace" "example" {
  provider     = google-beta
  namespace_id = "example-namespace"
  location     = "us-central1"

  labels = {
    key = "value"
    foo = "bar"

» Argument Reference

The following arguments are supported:

  • location - (Required) The location for the Namespace. A full list of valid locations can be found by running gcloud beta service-directory locations list.

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

  • labels - (Optional) Resource labels associated with this Namespace. No more than 64 user labels can be associated with a given resource. Label keys and values can be no longer than 63 characters.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

» Attributes Reference

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 namespace in the format projects/*/locations/*/namespaces/*.

» Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 4 minutes.
  • update - Default is 4 minutes.
  • delete - Default is 4 minutes.

» Import

Namespace can be imported using any of these accepted formats:

$ terraform import google_service_directory_namespace.default projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}
$ terraform import google_service_directory_namespace.default {{project}}/{{location}}/{{namespace_id}}
$ terraform import google_service_directory_namespace.default {{location}}/{{namespace_id}}