Skip to content

googleServiceDirectoryNamespace

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

\~> 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 Namespace, see:

Example Usage - Service Directory Namespace Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.serviceDirectoryNamespace.ServiceDirectoryNamespace(
  this,
  "example",
  {
    labels: [
      {
        foo: "bar",
        key: "value",
      },
    ],
    location: "us-central1",
    namespace_id: "example-namespace",
    provider: "${google-beta}",
  }
);

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 gcloudBetaServiceDirectoryLocationsList.

  • namespaceId - (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 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 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}}