Google GKEHub Feature

This page shows how to write Terraform for GKEHub Feature and write them securely.

google_gke_hub_feature (Terraform)

The Feature in GKEHub can be configured in Terraform with the resource name google_gke_hub_feature. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub
resource "google_gke_hub_feature" "feature" {
  name = "configmanagement"
  location = "global"
  provider = google-beta
  depends_on = [time_sleep.wait_30_seconds]

Review your Terraform file for Google best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


The following arguments are supported:

  • location - (Required) The location for the resource

  • labels - (Optional) GCP labels for this Feature.
  • name - (Optional) The full, unique name of this Feature resource
  • project - (Optional) The project for the resource
  • spec - (Optional) Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused.

The spec block supports:

  • multiclusteringress - (Optional) Multicluster Ingress-specific spec. The multiclusteringress block supports:
  • config_membership - (Optional) Fully-qualified Membership name which hosts the MultiClusterIngress CRD. Example: projects/foo-proj/locations/global/memberships/bar

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

  • id - an identifier for the resource with format projects/[[project]]/locations/[[location]]/features/[[name]]

  • create_time - Output only. When the Feature resource was created.

  • delete_time - Output only. When the Feature resource was deleted.

  • update_time - Output only. When the Feature resource was last updated.

Explanation in Terraform Registry

Contains information about a GKEHub Feature. The google_gke_hub is the Fleet API.

  • API documentation

    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.

Frequently asked questions

What is Google GKEHub Feature?

Google GKEHub Feature is a resource for GKEHub of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google GKEHub Feature?

For Terraform, the ejmadkins/config-sync-kcc-policy-demo source code example is useful. See the Terraform Example section for further details.


Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.