Scope represents a Scope in a Fleet.
To get more information about Scope, see:
resource "google_gke_hub_scope" "scope" {
scope_id = "my-scope"
namespace_labels = {
keyb = "valueb"
keya = "valuea"
keyc = "valuec"
}
labels = {
keyb = "valueb"
keya = "valuea"
keyc = "valuec"
}
}
The following arguments are supported:
scope_id
-
(Required)
The client-provided identifier of the scope.namespace_labels
-
(Optional)
Scope-level cluster namespace labels. For the member clusters bound
to the Scope, these labels are applied to each namespace under the
Scope. Scope-level labels take precedence over Namespace-level
labels (namespace_labels
in the Fleet Namespace resource) if they
share a key. Keys and values must be Kubernetes-conformant.
labels
-
(Optional)
Labels for this Scope.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labels
for all of the labels present on the resource.
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/locations/global/scopes/{{scope_id}}
name
-
The unique identifier of the scope
uid
-
Google-generated UUID for this resource.
create_time
-
Time the Scope was created in UTC.
update_time
-
Time the Scope was updated in UTC.
delete_time
-
Time the Scope was deleted in UTC.
state
-
State of the scope resource.
Structure is documented below.
terraform_labels
-
The combination of labels configured directly on the resource
and default labels configured on the provider.
effective_labels
-
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
code
-
(Output)
Code describes the state of a Scope resource.This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.Scope can be imported using any of these accepted formats:
projects/{{project}}/locations/global/scopes/{{scope_id}}
{{project}}/{{scope_id}}
{{scope_id}}
In Terraform v1.5.0 and later, use an import
block to import Scope using one of the formats above. For example:
import {
id = "projects/{{project}}/locations/global/scopes/{{scope_id}}"
to = google_gke_hub_scope.default
}
When using the terraform import
command, Scope can be imported using one of the formats above. For example:
$ terraform import google_gke_hub_scope.default projects/{{project}}/locations/global/scopes/{{scope_id}}
$ terraform import google_gke_hub_scope.default {{project}}/{{scope_id}}
$ terraform import google_gke_hub_scope.default {{scope_id}}
This resource supports User Project Overrides.