google_edgecontainer_cluster

Cluster contains information about a Google Distributed Cloud Edge Kubernetes cluster.

To get more information about Cluster, see:

Open in Cloud Shell

Example Usage - Edgecontainer Cluster

resource "google_edgecontainer_cluster" "default" {
  name = "basic-cluster"
  location = "us-central1"

  authorization {
    admin_users {
      username = "admin@hashicorptest.com"
    }
  }

  networking {
    cluster_ipv4_cidr_blocks = ["10.0.0.0/16"]
    services_ipv4_cidr_blocks = ["10.1.0.0/16"]
  }

  fleet {
    project = "projects/${data.google_project.project.number}"
  }

  labels = {
    my_key    = "my_val"
    other_key = "other_val"
  }
}

data "google_project" "project" {}
Open in Cloud Shell

Example Usage - Edgecontainer Cluster With Maintenance Window

resource "google_edgecontainer_cluster" "default" {
  name = "cluster-with-maintenance"
  location = "us-central1"

  authorization {
    admin_users {
      username = "admin@hashicorptest.com"
    }
  }

  networking {
    cluster_ipv4_cidr_blocks = ["10.0.0.0/16"]
    services_ipv4_cidr_blocks = ["10.1.0.0/16"]
  }

  fleet {
    project = "projects/${data.google_project.project.number}"
  }

  maintenance_policy {
    window {
      recurring_window {
        window {
          start_time = "2023-01-01T08:00:00Z"
          end_time = "2023-01-01T17:00:00Z"
        }

        recurrence = "FREQ=WEEKLY;BYDAY=SA"
      }
    }
  }
}

data "google_project" "project" {}

Example Usage - Edgecontainer Local Control Plane Cluster

resource "google_edgecontainer_cluster" "default" {
  name = "local-control-plane-cluster"
  location = "us-central1"

  authorization {
    admin_users {
      username = "admin@hashicorptest.com"
    }
  }

  networking {
    cluster_ipv4_cidr_blocks = ["10.0.0.0/16"]
    services_ipv4_cidr_blocks = ["10.1.0.0/16"]
  }

  fleet {
    project = "projects/${data.google_project.project.number}"
  }

  external_load_balancer_ipv4_address_pools = ["10.100.0.0-10.100.0.10"]

  control_plane {
    local {
      node_location = "us-central1-edge-example-edgesite"
      node_count = 1
      machine_filter = "machine-name"
      shared_deployment_policy = "ALLOWED"
    }
  }
}

data "google_project" "project" {}

Argument Reference

The following arguments are supported:

The fleet block supports:

The networking block supports:

The authorization block supports:

The admin_users block supports:


The maintenance_policy block supports:

The window block supports:

The recurring_window block supports:

The window block supports:

The control_plane block supports:

The remote block supports:

The local block supports:

The system_addons_config block supports:

The ingress block supports:

The control_plane_encryption block supports:

The kms_status block contains:

Attributes Reference

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

The maintenance_events block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Cluster can be imported using any of these accepted formats:

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

import {
  id = "projects/{{project}}/locations/{{location}}/clusters/{{name}}"
  to = google_edgecontainer_cluster.default
}

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

$ terraform import google_edgecontainer_cluster.default projects/{{project}}/locations/{{location}}/clusters/{{name}}
$ terraform import google_edgecontainer_cluster.default {{project}}/{{location}}/{{name}}
$ terraform import google_edgecontainer_cluster.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.