ClusterArgs

data class ClusterArgs(val addonsConfig: Output<ClusterAddonsConfigArgs>? = null, val allowNetAdmin: Output<Boolean>? = null, val authenticatorGroupsConfig: Output<ClusterAuthenticatorGroupsConfigArgs>? = null, val binaryAuthorization: Output<ClusterBinaryAuthorizationArgs>? = null, val clusterAutoscaling: Output<ClusterClusterAutoscalingArgs>? = null, val clusterIpv4Cidr: Output<String>? = null, val clusterTelemetry: Output<ClusterClusterTelemetryArgs>? = null, val confidentialNodes: Output<ClusterConfidentialNodesArgs>? = null, val controlPlaneEndpointsConfig: Output<ClusterControlPlaneEndpointsConfigArgs>? = null, val costManagementConfig: Output<ClusterCostManagementConfigArgs>? = null, val databaseEncryption: Output<ClusterDatabaseEncryptionArgs>? = null, val datapathProvider: Output<String>? = null, val defaultMaxPodsPerNode: Output<Int>? = null, val defaultSnatStatus: Output<ClusterDefaultSnatStatusArgs>? = null, val deletionProtection: Output<Boolean>? = null, val description: Output<String>? = null, val disableL4LbFirewallReconciliation: Output<Boolean>? = null, val dnsConfig: Output<ClusterDnsConfigArgs>? = null, val enableAutopilot: Output<Boolean>? = null, val enableCiliumClusterwideNetworkPolicy: Output<Boolean>? = null, val enableFqdnNetworkPolicy: Output<Boolean>? = null, val enableIntranodeVisibility: Output<Boolean>? = null, val enableK8sBetaApis: Output<ClusterEnableK8sBetaApisArgs>? = null, val enableKubernetesAlpha: Output<Boolean>? = null, val enableL4IlbSubsetting: Output<Boolean>? = null, val enableLegacyAbac: Output<Boolean>? = null, val enableMultiNetworking: Output<Boolean>? = null, val enableShieldedNodes: Output<Boolean>? = null, val enableTpu: Output<Boolean>? = null, val enterpriseConfig: Output<ClusterEnterpriseConfigArgs>? = null, val fleet: Output<ClusterFleetArgs>? = null, val gatewayApiConfig: Output<ClusterGatewayApiConfigArgs>? = null, val identityServiceConfig: Output<ClusterIdentityServiceConfigArgs>? = null, val initialNodeCount: Output<Int>? = null, val ipAllocationPolicy: Output<ClusterIpAllocationPolicyArgs>? = null, val location: Output<String>? = null, val loggingConfig: Output<ClusterLoggingConfigArgs>? = null, val loggingService: Output<String>? = null, val maintenancePolicy: Output<ClusterMaintenancePolicyArgs>? = null, val masterAuth: Output<ClusterMasterAuthArgs>? = null, val masterAuthorizedNetworksConfig: Output<ClusterMasterAuthorizedNetworksConfigArgs>? = null, val meshCertificates: Output<ClusterMeshCertificatesArgs>? = null, val minMasterVersion: Output<String>? = null, val monitoringConfig: Output<ClusterMonitoringConfigArgs>? = null, val monitoringService: Output<String>? = null, val name: Output<String>? = null, val network: Output<String>? = null, val networkPolicy: Output<ClusterNetworkPolicyArgs>? = null, val networkingMode: Output<String>? = null, val nodeConfig: Output<ClusterNodeConfigArgs>? = null, val nodeLocations: Output<List<String>>? = null, val nodePoolAutoConfig: Output<ClusterNodePoolAutoConfigArgs>? = null, val nodePoolDefaults: Output<ClusterNodePoolDefaultsArgs>? = null, val nodePools: Output<List<ClusterNodePoolArgs>>? = null, val nodeVersion: Output<String>? = null, val notificationConfig: Output<ClusterNotificationConfigArgs>? = null, val podAutoscaling: Output<ClusterPodAutoscalingArgs>? = null, val podSecurityPolicyConfig: Output<ClusterPodSecurityPolicyConfigArgs>? = null, val privateClusterConfig: Output<ClusterPrivateClusterConfigArgs>? = null, val privateIpv6GoogleAccess: Output<String>? = null, val project: Output<String>? = null, val protectConfig: Output<ClusterProtectConfigArgs>? = null, val releaseChannel: Output<ClusterReleaseChannelArgs>? = null, val removeDefaultNodePool: Output<Boolean>? = null, val resourceLabels: Output<Map<String, String>>? = null, val resourceUsageExportConfig: Output<ClusterResourceUsageExportConfigArgs>? = null, val secretManagerConfig: Output<ClusterSecretManagerConfigArgs>? = null, val securityPostureConfig: Output<ClusterSecurityPostureConfigArgs>? = null, val serviceExternalIpsConfig: Output<ClusterServiceExternalIpsConfigArgs>? = null, val subnetwork: Output<String>? = null, val tpuConfig: Output<ClusterTpuConfigArgs>? = null, val userManagedKeysConfig: Output<ClusterUserManagedKeysConfigArgs>? = null, val verticalPodAutoscaling: Output<ClusterVerticalPodAutoscalingArgs>? = null, val workloadAltsConfig: Output<ClusterWorkloadAltsConfigArgs>? = null, val workloadIdentityConfig: Output<ClusterWorkloadIdentityConfigArgs>? = null) : ConvertibleToJava<ClusterArgs>

Manages a Google Kubernetes Engine (GKE) cluster. To get more information about GKE clusters, see:

On version 5.0.0+ of the provider, you must explicitly set deletion_protection = false and run pulumi up to write the field to state in order to destroy a cluster. All arguments and attributes (including certificate outputs) will be stored in the raw state as plaintext. Read more about secrets in state.

Example Usage

With A Separately Managed Node Pool (Recommended)

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.serviceaccount.Account("default", {
accountId: "service-account-id",
displayName: "Service Account",
});
const primary = new gcp.container.Cluster("primary", {
name: "my-gke-cluster",
location: "us-central1",
removeDefaultNodePool: true,
initialNodeCount: 1,
});
const primaryPreemptibleNodes = new gcp.container.NodePool("primary_preemptible_nodes", {
name: "my-node-pool",
location: "us-central1",
cluster: primary.name,
nodeCount: 1,
nodeConfig: {
preemptible: true,
machineType: "e2-medium",
serviceAccount: _default.email,
oauthScopes: ["https://www&#46;googleapis&#46;com/auth/cloud-platform"],
},
});
import pulumi
import pulumi_gcp as gcp
default = gcp.serviceaccount.Account("default",
account_id="service-account-id",
display_name="Service Account")
primary = gcp.container.Cluster("primary",
name="my-gke-cluster",
location="us-central1",
remove_default_node_pool=True,
initial_node_count=1)
primary_preemptible_nodes = gcp.container.NodePool("primary_preemptible_nodes",
name="my-node-pool",
location="us-central1",
cluster=primary.name,
node_count=1,
node_config={
"preemptible": True,
"machine_type": "e2-medium",
"service_account": default.email,
"oauth_scopes": ["https://www&#46;googleapis&#46;com/auth/cloud-platform"],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.ServiceAccount.Account("default", new()
{
AccountId = "service-account-id",
DisplayName = "Service Account",
});
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "my-gke-cluster",
Location = "us-central1",
RemoveDefaultNodePool = true,
InitialNodeCount = 1,
});
var primaryPreemptibleNodes = new Gcp.Container.NodePool("primary_preemptible_nodes", new()
{
Name = "my-node-pool",
Location = "us-central1",
Cluster = primary.Name,
NodeCount = 1,
NodeConfig = new Gcp.Container.Inputs.NodePoolNodeConfigArgs
{
Preemptible = true,
MachineType = "e2-medium",
ServiceAccount = @default.Email,
OauthScopes = new[]
{
"https://www.googleapis.com/auth/cloud-platform",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/serviceaccount"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := serviceaccount.NewAccount(ctx, "default", &serviceaccount.AccountArgs{
AccountId: pulumi.String("service-account-id"),
DisplayName: pulumi.String("Service Account"),
})
if err != nil {
return err
}
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("my-gke-cluster"),
Location: pulumi.String("us-central1"),
RemoveDefaultNodePool: pulumi.Bool(true),
InitialNodeCount: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = container.NewNodePool(ctx, "primary_preemptible_nodes", &container.NodePoolArgs{
Name: pulumi.String("my-node-pool"),
Location: pulumi.String("us-central1"),
Cluster: primary.Name,
NodeCount: pulumi.Int(1),
NodeConfig: &container.NodePoolNodeConfigArgs{
Preemptible: pulumi.Bool(true),
MachineType: pulumi.String("e2-medium"),
ServiceAccount: _default.Email,
OauthScopes: pulumi.StringArray{
pulumi.String("https://www.googleapis.com/auth/cloud-platform"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.serviceaccount.Account;
import com.pulumi.gcp.serviceaccount.AccountArgs;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.NodePool;
import com.pulumi.gcp.container.NodePoolArgs;
import com.pulumi.gcp.container.inputs.NodePoolNodeConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new Account("default", AccountArgs.builder()
.accountId("service-account-id")
.displayName("Service Account")
.build());
var primary = new Cluster("primary", ClusterArgs.builder()
.name("my-gke-cluster")
.location("us-central1")
.removeDefaultNodePool(true)
.initialNodeCount(1)
.build());
var primaryPreemptibleNodes = new NodePool("primaryPreemptibleNodes", NodePoolArgs.builder()
.name("my-node-pool")
.location("us-central1")
.cluster(primary.name())
.nodeCount(1)
.nodeConfig(NodePoolNodeConfigArgs.builder()
.preemptible(true)
.machineType("e2-medium")
.serviceAccount(default_.email())
.oauthScopes("https://www.googleapis.com/auth/cloud-platform")
.build())
.build());
}
}
resources:
default:
type: gcp:serviceaccount:Account
properties:
accountId: service-account-id
displayName: Service Account
primary:
type: gcp:container:Cluster
properties:
name: my-gke-cluster
location: us-central1
removeDefaultNodePool: true
initialNodeCount: 1
primaryPreemptibleNodes:
type: gcp:container:NodePool
name: primary_preemptible_nodes
properties:
name: my-node-pool
location: us-central1
cluster: ${primary.name}
nodeCount: 1
nodeConfig:
preemptible: true
machineType: e2-medium
serviceAccount: ${default.email}
oauthScopes:
- https://www.googleapis.com/auth/cloud-platform

Note: It is recommended that node pools be created and managed as separate resources as in the example above. This allows node pools to be added and removed without recreating the cluster. Node pools defined directly in the gcp.container.Cluster resource cannot be removed without re-creating the cluster.

With The Default Node Pool

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.serviceaccount.Account("default", {
accountId: "service-account-id",
displayName: "Service Account",
});
const primary = new gcp.container.Cluster("primary", {
name: "marcellus-wallace",
location: "us-central1-a",
initialNodeCount: 3,
nodeConfig: {
serviceAccount: _default.email,
oauthScopes: ["https://www&#46;googleapis&#46;com/auth/cloud-platform"],
labels: {
foo: "bar",
},
tags: [
"foo",
"bar",
],
},
});
import pulumi
import pulumi_gcp as gcp
default = gcp.serviceaccount.Account("default",
account_id="service-account-id",
display_name="Service Account")
primary = gcp.container.Cluster("primary",
name="marcellus-wallace",
location="us-central1-a",
initial_node_count=3,
node_config={
"service_account": default.email,
"oauth_scopes": ["https://www&#46;googleapis&#46;com/auth/cloud-platform"],
"labels": {
"foo": "bar",
},
"tags": [
"foo",
"bar",
],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.ServiceAccount.Account("default", new()
{
AccountId = "service-account-id",
DisplayName = "Service Account",
});
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "marcellus-wallace",
Location = "us-central1-a",
InitialNodeCount = 3,
NodeConfig = new Gcp.Container.Inputs.ClusterNodeConfigArgs
{
ServiceAccount = @default.Email,
OauthScopes = new[]
{
"https://www.googleapis.com/auth/cloud-platform",
},
Labels =
{
{ "foo", "bar" },
},
Tags = new[]
{
"foo",
"bar",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/serviceaccount"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := serviceaccount.NewAccount(ctx, "default", &serviceaccount.AccountArgs{
AccountId: pulumi.String("service-account-id"),
DisplayName: pulumi.String("Service Account"),
})
if err != nil {
return err
}
_, err = container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("marcellus-wallace"),
Location: pulumi.String("us-central1-a"),
InitialNodeCount: pulumi.Int(3),
NodeConfig: &container.ClusterNodeConfigArgs{
ServiceAccount: _default.Email,
OauthScopes: pulumi.StringArray{
pulumi.String("https://www.googleapis.com/auth/cloud-platform"),
},
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Tags: pulumi.StringArray{
pulumi.String("foo"),
pulumi.String("bar"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.serviceaccount.Account;
import com.pulumi.gcp.serviceaccount.AccountArgs;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterNodeConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new Account("default", AccountArgs.builder()
.accountId("service-account-id")
.displayName("Service Account")
.build());
var primary = new Cluster("primary", ClusterArgs.builder()
.name("marcellus-wallace")
.location("us-central1-a")
.initialNodeCount(3)
.nodeConfig(ClusterNodeConfigArgs.builder()
.serviceAccount(default_.email())
.oauthScopes("https://www.googleapis.com/auth/cloud-platform")
.labels(Map.of("foo", "bar"))
.tags(
"foo",
"bar")
.build())
.build());
}
}
resources:
default:
type: gcp:serviceaccount:Account
properties:
accountId: service-account-id
displayName: Service Account
primary:
type: gcp:container:Cluster
properties:
name: marcellus-wallace
location: us-central1-a
initialNodeCount: 3
nodeConfig:
serviceAccount: ${default.email}
oauthScopes:
- https://www.googleapis.com/auth/cloud-platform
labels:
foo: bar
tags:
- foo
- bar

Autopilot

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.serviceaccount.Account("default", {
accountId: "service-account-id",
displayName: "Service Account",
});
const primary = new gcp.container.Cluster("primary", {
name: "marcellus-wallace",
location: "us-central1-a",
enableAutopilot: true,
});
import pulumi
import pulumi_gcp as gcp
default = gcp.serviceaccount.Account("default",
account_id="service-account-id",
display_name="Service Account")
primary = gcp.container.Cluster("primary",
name="marcellus-wallace",
location="us-central1-a",
enable_autopilot=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.ServiceAccount.Account("default", new()
{
AccountId = "service-account-id",
DisplayName = "Service Account",
});
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "marcellus-wallace",
Location = "us-central1-a",
EnableAutopilot = true,
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/serviceaccount"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := serviceaccount.NewAccount(ctx, "default", &serviceaccount.AccountArgs{
AccountId: pulumi.String("service-account-id"),
DisplayName: pulumi.String("Service Account"),
})
if err != nil {
return err
}
_, err = container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("marcellus-wallace"),
Location: pulumi.String("us-central1-a"),
EnableAutopilot: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.serviceaccount.Account;
import com.pulumi.gcp.serviceaccount.AccountArgs;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new Account("default", AccountArgs.builder()
.accountId("service-account-id")
.displayName("Service Account")
.build());
var primary = new Cluster("primary", ClusterArgs.builder()
.name("marcellus-wallace")
.location("us-central1-a")
.enableAutopilot(true)
.build());
}
}
resources:
default:
type: gcp:serviceaccount:Account
properties:
accountId: service-account-id
displayName: Service Account
primary:
type: gcp:container:Cluster
properties:
name: marcellus-wallace
location: us-central1-a
enableAutopilot: true

Import

GKE clusters can be imported using the project , location, and name. If the project is omitted, the default provider value will be used. Examples:

  • projects/{{project_id}}/locations/{{location}}/clusters/{{cluster_id}}

  • {{project_id}}/{{location}}/{{cluster_id}}

  • {{location}}/{{cluster_id}} When using the pulumi import command, GKE clusters can be imported using one of the formats above. For example:

$ pulumi import gcp:container/cluster:Cluster default projects/{{project_id}}/locations/{{location}}/clusters/{{cluster_id}}
$ pulumi import gcp:container/cluster:Cluster default {{project_id}}/{{location}}/{{cluster_id}}
$ pulumi import gcp:container/cluster:Cluster default {{location}}/{{cluster_id}}

For example, the following fields will show diffs if set in config:

  • min_master_version

  • remove_default_node_pool

Constructors

Link copied to clipboard
constructor(addonsConfig: Output<ClusterAddonsConfigArgs>? = null, allowNetAdmin: Output<Boolean>? = null, authenticatorGroupsConfig: Output<ClusterAuthenticatorGroupsConfigArgs>? = null, binaryAuthorization: Output<ClusterBinaryAuthorizationArgs>? = null, clusterAutoscaling: Output<ClusterClusterAutoscalingArgs>? = null, clusterIpv4Cidr: Output<String>? = null, clusterTelemetry: Output<ClusterClusterTelemetryArgs>? = null, confidentialNodes: Output<ClusterConfidentialNodesArgs>? = null, controlPlaneEndpointsConfig: Output<ClusterControlPlaneEndpointsConfigArgs>? = null, costManagementConfig: Output<ClusterCostManagementConfigArgs>? = null, databaseEncryption: Output<ClusterDatabaseEncryptionArgs>? = null, datapathProvider: Output<String>? = null, defaultMaxPodsPerNode: Output<Int>? = null, defaultSnatStatus: Output<ClusterDefaultSnatStatusArgs>? = null, deletionProtection: Output<Boolean>? = null, description: Output<String>? = null, disableL4LbFirewallReconciliation: Output<Boolean>? = null, dnsConfig: Output<ClusterDnsConfigArgs>? = null, enableAutopilot: Output<Boolean>? = null, enableCiliumClusterwideNetworkPolicy: Output<Boolean>? = null, enableFqdnNetworkPolicy: Output<Boolean>? = null, enableIntranodeVisibility: Output<Boolean>? = null, enableK8sBetaApis: Output<ClusterEnableK8sBetaApisArgs>? = null, enableKubernetesAlpha: Output<Boolean>? = null, enableL4IlbSubsetting: Output<Boolean>? = null, enableLegacyAbac: Output<Boolean>? = null, enableMultiNetworking: Output<Boolean>? = null, enableShieldedNodes: Output<Boolean>? = null, enableTpu: Output<Boolean>? = null, enterpriseConfig: Output<ClusterEnterpriseConfigArgs>? = null, fleet: Output<ClusterFleetArgs>? = null, gatewayApiConfig: Output<ClusterGatewayApiConfigArgs>? = null, identityServiceConfig: Output<ClusterIdentityServiceConfigArgs>? = null, initialNodeCount: Output<Int>? = null, ipAllocationPolicy: Output<ClusterIpAllocationPolicyArgs>? = null, location: Output<String>? = null, loggingConfig: Output<ClusterLoggingConfigArgs>? = null, loggingService: Output<String>? = null, maintenancePolicy: Output<ClusterMaintenancePolicyArgs>? = null, masterAuth: Output<ClusterMasterAuthArgs>? = null, masterAuthorizedNetworksConfig: Output<ClusterMasterAuthorizedNetworksConfigArgs>? = null, meshCertificates: Output<ClusterMeshCertificatesArgs>? = null, minMasterVersion: Output<String>? = null, monitoringConfig: Output<ClusterMonitoringConfigArgs>? = null, monitoringService: Output<String>? = null, name: Output<String>? = null, network: Output<String>? = null, networkPolicy: Output<ClusterNetworkPolicyArgs>? = null, networkingMode: Output<String>? = null, nodeConfig: Output<ClusterNodeConfigArgs>? = null, nodeLocations: Output<List<String>>? = null, nodePoolAutoConfig: Output<ClusterNodePoolAutoConfigArgs>? = null, nodePoolDefaults: Output<ClusterNodePoolDefaultsArgs>? = null, nodePools: Output<List<ClusterNodePoolArgs>>? = null, nodeVersion: Output<String>? = null, notificationConfig: Output<ClusterNotificationConfigArgs>? = null, podAutoscaling: Output<ClusterPodAutoscalingArgs>? = null, podSecurityPolicyConfig: Output<ClusterPodSecurityPolicyConfigArgs>? = null, privateClusterConfig: Output<ClusterPrivateClusterConfigArgs>? = null, privateIpv6GoogleAccess: Output<String>? = null, project: Output<String>? = null, protectConfig: Output<ClusterProtectConfigArgs>? = null, releaseChannel: Output<ClusterReleaseChannelArgs>? = null, removeDefaultNodePool: Output<Boolean>? = null, resourceLabels: Output<Map<String, String>>? = null, resourceUsageExportConfig: Output<ClusterResourceUsageExportConfigArgs>? = null, secretManagerConfig: Output<ClusterSecretManagerConfigArgs>? = null, securityPostureConfig: Output<ClusterSecurityPostureConfigArgs>? = null, serviceExternalIpsConfig: Output<ClusterServiceExternalIpsConfigArgs>? = null, subnetwork: Output<String>? = null, tpuConfig: Output<ClusterTpuConfigArgs>? = null, userManagedKeysConfig: Output<ClusterUserManagedKeysConfigArgs>? = null, verticalPodAutoscaling: Output<ClusterVerticalPodAutoscalingArgs>? = null, workloadAltsConfig: Output<ClusterWorkloadAltsConfigArgs>? = null, workloadIdentityConfig: Output<ClusterWorkloadIdentityConfigArgs>? = null)

Properties

Link copied to clipboard

The configuration for addons supported by GKE. Structure is documented below.

Link copied to clipboard
val allowNetAdmin: Output<Boolean>? = null

Enable NET_ADMIN for the cluster. Defaults to false. This field should only be enabled for Autopilot clusters (enable_autopilot set to true).

Link copied to clipboard

Configuration for the Google Groups for GKE feature. Structure is documented below.

Link copied to clipboard

Configuration options for the Binary Authorization feature. Structure is documented below.

Link copied to clipboard

Per-cluster configuration of Node Auto-Provisioning with Cluster Autoscaler to automatically adjust the size of the cluster and create/delete node pools based on the current needs of the cluster's workload. See the guide to using Node Auto-Provisioning for more details. Structure is documented below.

Link copied to clipboard
val clusterIpv4Cidr: Output<String>? = null

The IP address range of the Kubernetes pods in this cluster in CIDR notation (e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8. This field will default a new cluster to routes-based, where ip_allocation_policy is not defined.

Link copied to clipboard

Configuration for ClusterTelemetry feature, Structure is documented below.

Link copied to clipboard

Configuration for Confidential Nodes feature. Structure is documented below documented below.

Link copied to clipboard

Configuration for all of the cluster's control plane endpoints. Structure is documented below.

Link copied to clipboard

Configuration for the Cost Allocation feature. Structure is documented below.

Link copied to clipboard

Structure is documented below.

Link copied to clipboard
val datapathProvider: Output<String>? = null

The desired datapath provider for this cluster. This is set to LEGACY_DATAPATH by default, which uses the IPTables-based kube-proxy implementation. Set to ADVANCED_DATAPATH to enable Dataplane v2.

Link copied to clipboard
val defaultMaxPodsPerNode: Output<Int>? = null

The default maximum number of pods per node in this cluster. This doesn't work on "routes-based" clusters, clusters that don't have IP Aliasing enabled. See the official documentation for more information.

Link copied to clipboard

GKE SNAT DefaultSnatStatus contains the desired state of whether default sNAT should be disabled on the cluster, API doc. Structure is documented below

Link copied to clipboard
val deletionProtection: Output<Boolean>? = null
Link copied to clipboard
val description: Output<String>? = null

Description of the cluster.

Link copied to clipboard

Disable L4 load balancer VPC firewalls to enable firewall policies.

Link copied to clipboard
val dnsConfig: Output<ClusterDnsConfigArgs>? = null

Configuration for Using Cloud DNS for GKE. Structure is documented below.

Link copied to clipboard
val enableAutopilot: Output<Boolean>? = null

Enable Autopilot for this cluster. Defaults to false. Note that when this option is enabled, certain features of Standard GKE are not available. See the official documentation for available features.

Link copied to clipboard

Whether CiliumClusterWideNetworkPolicy is enabled on this cluster. Defaults to false.

Link copied to clipboard
val enableFqdnNetworkPolicy: Output<Boolean>? = null

Whether FQDN Network Policy is enabled on this cluster. Users who enable this feature for existing Standard clusters must restart the GKE Dataplane V2 anetd DaemonSet after enabling it. See the Enable FQDN Network Policy in an existing cluster for more information.

Link copied to clipboard
val enableIntranodeVisibility: Output<Boolean>? = null

Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network.

Link copied to clipboard

Configuration for Kubernetes Beta APIs. Structure is documented below.

Link copied to clipboard
val enableKubernetesAlpha: Output<Boolean>? = null

Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days.

Link copied to clipboard
val enableL4IlbSubsetting: Output<Boolean>? = null

Whether L4ILB Subsetting is enabled for this cluster.

Link copied to clipboard
val enableLegacyAbac: Output<Boolean>? = null

Whether the ABAC authorizer is enabled for this cluster. When enabled, identities in the system, including service accounts, nodes, and controllers, will have statically granted permissions beyond those provided by the RBAC configuration or IAM. Defaults to false

Link copied to clipboard
val enableMultiNetworking: Output<Boolean>? = null

Whether multi-networking is enabled for this cluster.

Link copied to clipboard
val enableShieldedNodes: Output<Boolean>? = null

Enable Shielded Nodes features on all nodes in this cluster. Defaults to true.

Link copied to clipboard
val enableTpu: Output<Boolean>? = null

Whether to enable Cloud TPU resources in this cluster. See the official documentation.

Link copied to clipboard

Configuration for Enterprise edition.(https://cloud.google.com/kubernetes-engine/enterprise/docs/concepts/gke-editions). Structure is documented below. The default_snat_status block supports

Link copied to clipboard
val fleet: Output<ClusterFleetArgs>? = null

Fleet configuration for the cluster. Structure is documented below.

Link copied to clipboard

Configuration for GKE Gateway API controller. Structure is documented below.

Link copied to clipboard

. Structure is documented below.

Link copied to clipboard
val initialNodeCount: Output<Int>? = null

The number of nodes to create in this cluster's default node pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Must be set if node_pool is not set. If you're using gcp.container.NodePool objects with no default node pool, you'll need to set this to a value of at least 1, alongside setting remove_default_node_pool to true.

Link copied to clipboard

Configuration of cluster IP allocation for VPC-native clusters. If this block is unset during creation, it will be set by the GKE backend. Structure is documented below.

Link copied to clipboard
val location: Output<String>? = null

The location (region or zone) in which the cluster master will be created, as well as the default node location. If you specify a zone (such as us-central1-a), the cluster will be a zonal cluster with a single cluster master. If you specify a region (such as us-west1), the cluster will be a regional cluster with multiple masters spread across zones in the region, and with default node locations in those zones as well

Link copied to clipboard

Logging configuration for the cluster. Structure is documented below.

Link copied to clipboard
val loggingService: Output<String>? = null

The logging service that the cluster should write logs to. Available options include logging.googleapis.com(Legacy Stackdriver), logging.googleapis.com/kubernetes(Stackdriver Kubernetes Engine Logging), and none. Defaults to logging.googleapis.com/kubernetes

Link copied to clipboard

The maintenance policy to use for the cluster. Structure is documented below.

Link copied to clipboard
val masterAuth: Output<ClusterMasterAuthArgs>? = null

The authentication information for accessing the Kubernetes master. Some values in this block are only returned by the API if your service account has permission to get credentials for your GKE cluster. If you see an unexpected diff unsetting your client cert, ensure you have the container.clusters.getCredentials permission. Structure is documented below.

Link copied to clipboard

The desired configuration options for master authorized networks. Omit the nested cidr_blocks attribute to disallow external access (except the cluster node IPs, which GKE automatically whitelists). Structure is documented below.

Link copied to clipboard

Structure is documented below.

Link copied to clipboard
val minMasterVersion: Output<String>? = null

The minimum version of the master. GKE will auto-update the master to new versions, so this does not guarantee the current master version--use the read-only master_version field to obtain that. If unset, the cluster's version will be set by GKE to the version of the most recent official release (which is not necessarily the latest version). Most users will find the gcp.container.getEngineVersions data source useful - it indicates which versions are available. If you intend to specify versions manually, the docs describe the various acceptable formats for this field.

Link copied to clipboard

Monitoring configuration for the cluster. Structure is documented below.

Link copied to clipboard
val monitoringService: Output<String>? = null

The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com(Legacy Stackdriver), monitoring.googleapis.com/kubernetes(Stackdriver Kubernetes Engine Monitoring), and none. Defaults to monitoring.googleapis.com/kubernetes

Link copied to clipboard
val name: Output<String>? = null

The name of the cluster, unique within the project and location.

Link copied to clipboard
val network: Output<String>? = null

The name or self_link of the Google Compute Engine network to which the cluster is connected. For Shared VPC, set this to the self link of the shared network.

Link copied to clipboard
val networkingMode: Output<String>? = null

Determines whether alias IPs or routes will be used for pod IPs in the cluster. Options are VPC_NATIVE or ROUTES. VPC_NATIVE enables IP aliasing. Newly created clusters will default to VPC_NATIVE.

Link copied to clipboard

Configuration options for the NetworkPolicy feature. Structure is documented below.

Link copied to clipboard
val nodeConfig: Output<ClusterNodeConfigArgs>? = null

Parameters used in creating the default node pool. Generally, this field should not be used at the same time as a gcp.container.NodePool or a node_pool block; this configuration manages the default node pool, which isn't recommended to be used. Structure is documented below.

Link copied to clipboard
val nodeLocations: Output<List<String>>? = null

The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. If this is specified for a zonal cluster, omit the cluster's zone.

Link copied to clipboard

Node pool configs that apply to auto-provisioned node pools in autopilot clusters and node auto-provisioning-enabled clusters. Structure is documented below.

Link copied to clipboard

Default NodePool settings for the entire cluster. These settings are overridden if specified on the specific NodePool object. Structure is documented below.

Link copied to clipboard
val nodePools: Output<List<ClusterNodePoolArgs>>? = null

List of node pools associated with this cluster. See gcp.container.NodePool for schema. Warning: node pools defined inside a cluster can't be changed (or added/removed) after cluster creation without deleting and recreating the entire cluster. Unless you absolutely need the ability to say "these are the only node pools associated with this cluster", use the gcp.container.NodePool resource instead of this property.

Link copied to clipboard
val nodeVersion: Output<String>? = null

The Kubernetes version on the nodes. Must either be unset or set to the same value as min_master_version on create. Defaults to the default version set by GKE which is not necessarily the latest version. This only affects nodes in the default node pool. While a fuzzy version can be specified, it's recommended that you specify explicit versions as the provider will see spurious diffs when fuzzy versions are used. See the gcp.container.getEngineVersions data source's version_prefix field to approximate fuzzy versions. To update nodes in other node pools, use the version attribute on the node pool.

Link copied to clipboard

Configuration for the cluster upgrade notifications feature. Structure is documented below.

Link copied to clipboard

Configuration for the Structure is documented below.

Link copied to clipboard

Configuration for the PodSecurityPolicy feature. Structure is documented below.

Link copied to clipboard

Configuration for private clusters, clusters with private nodes. Structure is documented below.

Link copied to clipboard
val privateIpv6GoogleAccess: Output<String>? = null

The desired state of IPv6 connectivity to Google Services. By default, no private IPv6 access to or from Google Services (all access will be via IPv4).

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard

Enable/Disable Protect API features for the cluster. Structure is documented below.

Link copied to clipboard

Configuration options for the Release channel feature, which provide more control over automatic upgrades of your GKE clusters. When updating this field, GKE imposes specific version requirements. See Selecting a new release channel for more details; the gcp.container.getEngineVersions datasource can provide the default version for a channel. Note that removing the release_channel field from your config will cause the provider to stop managing your cluster's release channel, but will not unenroll it. Instead, use the "UNSPECIFIED" channel. Structure is documented below.

Link copied to clipboard
val removeDefaultNodePool: Output<Boolean>? = null

If true, deletes the default node pool upon cluster creation. If you're using gcp.container.NodePool resources with no default node pool, this should be set to true, alongside setting initial_node_count to at least 1.

Link copied to clipboard
val resourceLabels: Output<Map<String, String>>? = null

The GCE resource labels (a map of key/value pairs) to be applied to the cluster. 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.

Link copied to clipboard

Configuration for the ResourceUsageExportConfig feature. Structure is documented below.

Link copied to clipboard

Configuration for the SecretManagerConfig feature. Structure is documented below.

Link copied to clipboard

Enable/Disable Security Posture API features for the cluster. Structure is documented below.

Link copied to clipboard

Structure is documented below.

Link copied to clipboard
val subnetwork: Output<String>? = null

The name or self_link of the Google Compute Engine subnetwork in which the cluster's instances are launched.

Link copied to clipboard
val tpuConfig: Output<ClusterTpuConfigArgs>? = null

TPU configuration for the cluster.

Link copied to clipboard

The custom keys configuration of the cluster.

Link copied to clipboard

Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it. Structure is documented below.

Link copied to clipboard

Configuration for direct-path (via ALTS) with workload identity.. Structure is documented below.

Link copied to clipboard

Workload Identity allows Kubernetes service accounts to act as a user-managed Google IAM Service Account. Structure is documented below.

Functions

Link copied to clipboard
open override fun toJava(): ClusterArgs