google_gke_hub_namespace

Namespace represents a namespace across the Fleet.

To get more information about Namespace, see:

Example Usage - Gkehub Namespace Basic

resource "google_gke_hub_scope" "scope" {
  scope_id = "tf-test-scope%{random_suffix}"
}


resource "google_gke_hub_namespace" "namespace" { 
  scope_namespace_id = "tf-test-namespace%{random_suffix}"
  scope_id = google_gke_hub_scope.scope.scope_id
  scope = google_gke_hub_scope.scope.name
  namespace_labels = {
      keyb = "valueb"
      keya = "valuea"
      keyc = "valuec"
  }
  labels = {
      keyb = "valueb"
      keya = "valuea"
      keyc = "valuec" 
  }
  depends_on = [google_gke_hub_scope.scope]
}

Argument Reference

The following arguments are supported:


Attributes Reference

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

The state block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Namespace can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Namespace using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/global/scopes/{{scope_id}}/namespaces/{{scope_namespace_id}}"
  to = google_gke_hub_namespace.default
}

When using the terraform import command, Namespace can be imported using one of the formats above. For example:

$ terraform import google_gke_hub_namespace.default projects/{{project}}/locations/global/scopes/{{scope_id}}/namespaces/{{scope_namespace_id}}
$ terraform import google_gke_hub_namespace.default {{project}}/{{scope_id}}/{{scope_namespace_id}}
$ terraform import google_gke_hub_namespace.default {{scope_id}}/{{scope_namespace_id}}

User Project Overrides

This resource supports User Project Overrides.