blob: d75abb88122819c2602ca138e85beaeab269c526 [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** 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: |-
Fleet contains information about a group of clusters.
---
# google\_gke\_hub\_fleet
Fleet contains information about a group of clusters.
To get more information about Fleet, see:
* [API documentation](https://cloud.google.com/anthos/multicluster-management/reference/rest/v1/projects.locations.fleets)
* How-to Guides
* [Registering a Cluster to a Fleet](https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster#register_cluster)
## Example Usage - Gkehub Fleet Basic
```hcl
resource "google_gke_hub_fleet" "default" {
display_name = "my production fleet"
default_cluster_config {
security_posture_config {
mode = "DISABLED"
vulnerability_mode = "VULNERABILITY_DISABLED"
}
}
}
```
## Argument Reference
The following arguments are supported:
- - -
* `display_name` -
(Optional)
A user-assigned display name of the Fleet. When present, it must be between 4 to 30 characters.
Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point.
* `default_cluster_config` -
(Optional)
The default cluster configurations to apply across the fleet.
Structure is [documented below](#nested_default_cluster_config).
* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
<a name="nested_default_cluster_config"></a>The `default_cluster_config` block supports:
* `binary_authorization_config` -
(Optional)
Enable/Disable binary authorization features for the cluster.
Structure is [documented below](#nested_binary_authorization_config).
* `security_posture_config` -
(Optional)
Enable/Disable Security Posture features for the cluster.
Structure is [documented below](#nested_security_posture_config).
<a name="nested_binary_authorization_config"></a>The `binary_authorization_config` block supports:
* `evaluation_mode` -
(Optional)
Mode of operation for binauthz policy evaluation.
Possible values are: `DISABLED`, `POLICY_BINDINGS`.
* `policy_bindings` -
(Optional)
Binauthz policies that apply to this cluster.
Structure is [documented below](#nested_policy_bindings).
<a name="nested_policy_bindings"></a>The `policy_bindings` block supports:
* `name` -
(Optional)
The relative resource name of the binauthz platform policy to audit. GKE
platform policies have the following format:
`projects/{project_number}/platforms/gke/policies/{policy_id}`.
<a name="nested_security_posture_config"></a>The `security_posture_config` block supports:
* `mode` -
(Optional)
Sets which mode to use for Security Posture features.
Possible values are: `DISABLED`, `BASIC`.
* `vulnerability_mode` -
(Optional)
Sets which mode to use for vulnerability scanning.
Possible values are: `VULNERABILITY_DISABLED`, `VULNERABILITY_BASIC`, `VULNERABILITY_ENTERPRISE`.
## 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/fleets/default`
* `create_time` -
The time the fleet was created, in RFC3339 text format.
* `update_time` -
The time the fleet was last updated, in RFC3339 text format.
* `delete_time` -
The time the fleet was deleted, in RFC3339 text format.
* `uid` -
Google-generated UUID for this resource. This is unique across all
Fleet resources. If a Fleet resource is deleted and another
resource with the same name is created, it gets a different uid.
* `state` -
The state of the fleet resource.
Structure is [documented below](#nested_state).
<a name="nested_state"></a>The `state` block contains:
* `code` -
(Output)
Describes the state of a Fleet 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
Fleet can be imported using any of these accepted formats:
* `projects/{{project}}/locations/global/fleets/default`
* `{{project}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Fleet using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/locations/global/fleets/default"
to = google_gke_hub_fleet.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Fleet can be imported using one of the formats above. For example:
```
$ terraform import google_gke_hub_fleet.default projects/{{project}}/locations/global/fleets/default
$ terraform import google_gke_hub_fleet.default {{project}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).