| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** AUTO GENERATED CODE *** Type: MMv1 *** |
| # |
| # ---------------------------------------------------------------------------- |
| # |
| # This file is automatically generated by Magic Modules and manual |
| # changes will be clobbered when the file is regenerated. |
| # |
| # Please read more about how to change this file in |
| # .github/CONTRIBUTING.md. |
| # |
| # ---------------------------------------------------------------------------- |
| subcategory: "GKEHub" |
| description: |- |
| Scope represents a Scope in a Fleet. |
| --- |
| |
| # google\_gke\_hub\_scope |
| |
| Scope represents a Scope in a Fleet. |
| |
| |
| To get more information about Scope, see: |
| |
| * [API documentation](https://cloud.google.com/anthos/fleet-management/docs/reference/rest/v1/projects.locations.scopes) |
| * How-to Guides |
| * [Registering a Cluster](https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster#register_cluster) |
| |
| ## Example Usage - Gkehub Scope Basic |
| |
| |
| ```hcl |
| resource "google_gke_hub_scope" "scope" { |
| scope_id = "my-scope" |
| labels = { |
| keyb = "valueb" |
| keya = "valuea" |
| keyc = "valuec" |
| } |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `scope_id` - |
| (Required) |
| The client-provided identifier of the scope. |
| |
| |
| - - - |
| |
| |
| * `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. |
| |
| |
| ## Attributes Reference |
| |
| 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](#nested_state). |
| |
| * `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. |
| |
| |
| <a name="nested_state"></a>The `state` block contains: |
| |
| * `code` - |
| (Output) |
| Code describes the state of a Scope resource. |
| |
| ## Timeouts |
| |
| This resource provides the following |
| [Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| |
| - `create` - Default is 20 minutes. |
| - `update` - Default is 20 minutes. |
| - `delete` - Default is 20 minutes. |
| |
| ## Import |
| |
| |
| 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](https://developer.hashicorp.com/terraform/language/import) to import Scope using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "projects/{{project}}/locations/global/scopes/{{scope_id}}" |
| to = google_gke_hub_scope.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), 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}} |
| ``` |
| |
| ## User Project Overrides |
| |
| This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |