Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.container.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.container.kotlin.outputs.ClusterAddonsConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterAuthenticatorGroupsConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterBinaryAuthorization
import com.pulumi.gcp.container.kotlin.outputs.ClusterClusterAutoscaling
import com.pulumi.gcp.container.kotlin.outputs.ClusterClusterTelemetry
import com.pulumi.gcp.container.kotlin.outputs.ClusterConfidentialNodes
import com.pulumi.gcp.container.kotlin.outputs.ClusterCostManagementConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterDatabaseEncryption
import com.pulumi.gcp.container.kotlin.outputs.ClusterDefaultSnatStatus
import com.pulumi.gcp.container.kotlin.outputs.ClusterDnsConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterEnableK8sBetaApis
import com.pulumi.gcp.container.kotlin.outputs.ClusterFleet
import com.pulumi.gcp.container.kotlin.outputs.ClusterGatewayApiConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterIdentityServiceConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterIpAllocationPolicy
import com.pulumi.gcp.container.kotlin.outputs.ClusterLoggingConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterMaintenancePolicy
import com.pulumi.gcp.container.kotlin.outputs.ClusterMasterAuth
import com.pulumi.gcp.container.kotlin.outputs.ClusterMasterAuthorizedNetworksConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterMeshCertificates
import com.pulumi.gcp.container.kotlin.outputs.ClusterMonitoringConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterNetworkPolicy
import com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterNodePool
import com.pulumi.gcp.container.kotlin.outputs.ClusterNodePoolAutoConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterNodePoolDefaults
import com.pulumi.gcp.container.kotlin.outputs.ClusterNotificationConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterPodSecurityPolicyConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterPrivateClusterConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterProtectConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterReleaseChannel
import com.pulumi.gcp.container.kotlin.outputs.ClusterResourceUsageExportConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterSecretManagerConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterSecurityPostureConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterServiceExternalIpsConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterTpuConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterVerticalPodAutoscaling
import com.pulumi.gcp.container.kotlin.outputs.ClusterWorkloadAltsConfig
import com.pulumi.gcp.container.kotlin.outputs.ClusterWorkloadIdentityConfig
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.gcp.container.kotlin.outputs.ClusterAddonsConfig.Companion.toKotlin as clusterAddonsConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterAuthenticatorGroupsConfig.Companion.toKotlin as clusterAuthenticatorGroupsConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterBinaryAuthorization.Companion.toKotlin as clusterBinaryAuthorizationToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterClusterAutoscaling.Companion.toKotlin as clusterClusterAutoscalingToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterClusterTelemetry.Companion.toKotlin as clusterClusterTelemetryToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterConfidentialNodes.Companion.toKotlin as clusterConfidentialNodesToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterCostManagementConfig.Companion.toKotlin as clusterCostManagementConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterDatabaseEncryption.Companion.toKotlin as clusterDatabaseEncryptionToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterDefaultSnatStatus.Companion.toKotlin as clusterDefaultSnatStatusToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterDnsConfig.Companion.toKotlin as clusterDnsConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterEnableK8sBetaApis.Companion.toKotlin as clusterEnableK8sBetaApisToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterFleet.Companion.toKotlin as clusterFleetToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterGatewayApiConfig.Companion.toKotlin as clusterGatewayApiConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterIdentityServiceConfig.Companion.toKotlin as clusterIdentityServiceConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterIpAllocationPolicy.Companion.toKotlin as clusterIpAllocationPolicyToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterLoggingConfig.Companion.toKotlin as clusterLoggingConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterMaintenancePolicy.Companion.toKotlin as clusterMaintenancePolicyToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterMasterAuth.Companion.toKotlin as clusterMasterAuthToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterMasterAuthorizedNetworksConfig.Companion.toKotlin as clusterMasterAuthorizedNetworksConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterMeshCertificates.Companion.toKotlin as clusterMeshCertificatesToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterMonitoringConfig.Companion.toKotlin as clusterMonitoringConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterNetworkPolicy.Companion.toKotlin as clusterNetworkPolicyToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfig.Companion.toKotlin as clusterNodeConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterNodePool.Companion.toKotlin as clusterNodePoolToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterNodePoolAutoConfig.Companion.toKotlin as clusterNodePoolAutoConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterNodePoolDefaults.Companion.toKotlin as clusterNodePoolDefaultsToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterNotificationConfig.Companion.toKotlin as clusterNotificationConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterPodSecurityPolicyConfig.Companion.toKotlin as clusterPodSecurityPolicyConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterPrivateClusterConfig.Companion.toKotlin as clusterPrivateClusterConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterProtectConfig.Companion.toKotlin as clusterProtectConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterReleaseChannel.Companion.toKotlin as clusterReleaseChannelToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterResourceUsageExportConfig.Companion.toKotlin as clusterResourceUsageExportConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterSecretManagerConfig.Companion.toKotlin as clusterSecretManagerConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterSecurityPostureConfig.Companion.toKotlin as clusterSecurityPostureConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterServiceExternalIpsConfig.Companion.toKotlin as clusterServiceExternalIpsConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterTpuConfig.Companion.toKotlin as clusterTpuConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterVerticalPodAutoscaling.Companion.toKotlin as clusterVerticalPodAutoscalingToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterWorkloadAltsConfig.Companion.toKotlin as clusterWorkloadAltsConfigToKotlin
import com.pulumi.gcp.container.kotlin.outputs.ClusterWorkloadIdentityConfig.Companion.toKotlin as clusterWorkloadIdentityConfigToKotlin
/**
* Builder for [Cluster].
*/
@PulumiTagMarker
public class ClusterResourceBuilder internal constructor() {
public var name: String? = null
public var args: ClusterArgs = ClusterArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend ClusterArgsBuilder.() -> Unit) {
val builder = ClusterArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Cluster {
val builtJavaResource = com.pulumi.gcp.container.Cluster(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Cluster(builtJavaResource)
}
}
/**
* Manages a Google Kubernetes Engine (GKE) cluster.
* To get more information about GKE clusters, see:
* * [The API reference](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters)
* * How-to guides
* * [GKE overview](https://cloud.google.com/kubernetes-engine/docs/concepts/kubernetes-engine-overview)
* * [About cluster configuration choices](https://cloud.google.com/kubernetes-engine/docs/concepts/types-of-clusters)
* > 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](https://www.pulumi.com/docs/intro/concepts/programming-model/#secrets).
* ## Example Usage
* ### With A Separately Managed Node Pool (Recommended)
*
* ```typescript
* 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.googleapis.com/auth/cloud-platform"],
* },
* });
* ```
* ```python
* 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.googleapis.com/auth/cloud-platform"],
* })
* ```
* ```csharp
* 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",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
* "github.com/pulumi/pulumi-gcp/sdk/v7/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
* }
* 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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* 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
*
* ```typescript
* 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.googleapis.com/auth/cloud-platform"],
* labels: {
* foo: "bar",
* },
* tags: [
* "foo",
* "bar",
* ],
* },
* });
* ```
* ```python
* 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.googleapis.com/auth/cloud-platform"],
* "labels": {
* "foo": "bar",
* },
* "tags": [
* "foo",
* "bar",
* ],
* })
* ```
* ```csharp
* 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",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
* "github.com/pulumi/pulumi-gcp/sdk/v7/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"),
* 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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* 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
*
* ```typescript
* 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,
* });
* ```
* ```python
* 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)
* ```
* ```csharp
* 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,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
* "github.com/pulumi/pulumi-gcp/sdk/v7/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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* 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:
* ```sh
* $ pulumi import gcp:container/cluster:Cluster default projects/{{project_id}}/locations/{{location}}/clusters/{{cluster_id}}
* ```
* ```sh
* $ pulumi import gcp:container/cluster:Cluster default {{project_id}}/{{location}}/{{cluster_id}}
* ```
* ```sh
* $ 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`
*/
public class Cluster internal constructor(
override val javaResource: com.pulumi.gcp.container.Cluster,
) : KotlinCustomResource(javaResource, ClusterMapper) {
/**
* The configuration for addons supported by GKE.
* Structure is documented below.
*/
public val addonsConfig: Output
get() = javaResource.addonsConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterAddonsConfigToKotlin(args0)
})
})
/**
* Enable NET_ADMIN for the cluster. Defaults to
* `false`. This field should only be enabled for Autopilot clusters (`enable_autopilot`
* set to `true`).
*/
public val allowNetAdmin: Output?
get() = javaResource.allowNetAdmin().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Configuration for the
* [Google Groups for GKE](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#groups-setup-gsuite) feature.
* Structure is documented below.
*/
public val authenticatorGroupsConfig: Output
get() = javaResource.authenticatorGroupsConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterAuthenticatorGroupsConfigToKotlin(args0)
})
})
/**
* Configuration options for the Binary
* Authorization feature. Structure is documented below.
*/
public val binaryAuthorization: Output?
get() = javaResource.binaryAuthorization().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterBinaryAuthorizationToKotlin(args0) })
}).orElse(null)
})
/**
* 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](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning)
* for more details. Structure is documented below.
*/
public val clusterAutoscaling: Output
get() = javaResource.clusterAutoscaling().applyValue({ args0 ->
args0.let({ args0 ->
clusterClusterAutoscalingToKotlin(args0)
})
})
/**
* 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.
*/
public val clusterIpv4Cidr: Output
get() = javaResource.clusterIpv4Cidr().applyValue({ args0 -> args0 })
/**
* Configuration for
* [ClusterTelemetry](https://cloud.google.com/monitoring/kubernetes-engine/installing#controlling_the_collection_of_application_logs) feature,
* Structure is documented below.
*/
public val clusterTelemetry: Output
get() = javaResource.clusterTelemetry().applyValue({ args0 ->
args0.let({ args0 ->
clusterClusterTelemetryToKotlin(args0)
})
})
/**
* Configuration for [Confidential Nodes](https://cloud.google.com/kubernetes-engine/docs/how-to/confidential-gke-nodes) feature. Structure is documented below documented below.
*/
public val confidentialNodes: Output
get() = javaResource.confidentialNodes().applyValue({ args0 ->
args0.let({ args0 ->
clusterConfidentialNodesToKotlin(args0)
})
})
/**
* Configuration for the
* [Cost Allocation](https://cloud.google.com/kubernetes-engine/docs/how-to/cost-allocations) feature.
* Structure is documented below.
*/
public val costManagementConfig: Output
get() = javaResource.costManagementConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterCostManagementConfigToKotlin(args0)
})
})
/**
* Structure is documented below.
*/
public val databaseEncryption: Output
get() = javaResource.databaseEncryption().applyValue({ args0 ->
args0.let({ args0 ->
clusterDatabaseEncryptionToKotlin(args0)
})
})
/**
* 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.
*/
public val datapathProvider: Output
get() = javaResource.datapathProvider().applyValue({ args0 -> args0 })
/**
* 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](https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr)
* for more information.
*/
public val defaultMaxPodsPerNode: Output
get() = javaResource.defaultMaxPodsPerNode().applyValue({ args0 -> args0 })
/**
* [GKE SNAT](https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent#how_ipmasq_works) DefaultSnatStatus contains the desired state of whether default sNAT should be disabled on the cluster, [API doc](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#networkconfig). Structure is documented below
*/
public val defaultSnatStatus: Output
get() = javaResource.defaultSnatStatus().applyValue({ args0 ->
args0.let({ args0 ->
clusterDefaultSnatStatusToKotlin(args0)
})
})
public val deletionProtection: Output?
get() = javaResource.deletionProtection().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Description of the cluster.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Configuration for [Using Cloud DNS for GKE](https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns). Structure is documented below.
*/
public val dnsConfig: Output?
get() = javaResource.dnsConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
clusterDnsConfigToKotlin(args0)
})
}).orElse(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](https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#comparison)
* for available features.
*/
public val enableAutopilot: Output?
get() = javaResource.enableAutopilot().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Whether CiliumClusterWideNetworkPolicy is enabled on this cluster. Defaults to false.
*/
public val enableCiliumClusterwideNetworkPolicy: Output?
get() = javaResource.enableCiliumClusterwideNetworkPolicy().applyValue({ args0 ->
args0.map({ args0 -> args0 }).orElse(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](https://cloud.google.com/kubernetes-engine/docs/how-to/fqdn-network-policies#enable_fqdn_network_policy_in_an_existing_cluster) for more information.
*/
public val enableFqdnNetworkPolicy: Output?
get() = javaResource.enableFqdnNetworkPolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network.
*/
public val enableIntranodeVisibility: Output
get() = javaResource.enableIntranodeVisibility().applyValue({ args0 -> args0 })
/**
* Configuration for Kubernetes Beta APIs.
* Structure is documented below.
*/
public val enableK8sBetaApis: Output?
get() = javaResource.enableK8sBetaApis().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterEnableK8sBetaApisToKotlin(args0) })
}).orElse(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.
*/
public val enableKubernetesAlpha: Output?
get() = javaResource.enableKubernetesAlpha().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Whether L4ILB Subsetting is enabled for this cluster.
*/
public val enableL4IlbSubsetting: Output?
get() = javaResource.enableL4IlbSubsetting().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(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`
*/
public val enableLegacyAbac: Output?
get() = javaResource.enableLegacyAbac().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Whether multi-networking is enabled for this cluster.
*/
public val enableMultiNetworking: Output?
get() = javaResource.enableMultiNetworking().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Enable Shielded Nodes features on all nodes in this cluster. Defaults to `true`.
*/
public val enableShieldedNodes: Output?
get() = javaResource.enableShieldedNodes().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Whether to enable Cloud TPU resources in this cluster.
* See the [official documentation](https://cloud.google.com/tpu/docs/kubernetes-engine-setup).
*/
public val enableTpu: Output
get() = javaResource.enableTpu().applyValue({ args0 -> args0 })
/**
* The IP address of this cluster's Kubernetes master.
*/
public val endpoint: Output
get() = javaResource.endpoint().applyValue({ args0 -> args0 })
/**
* Fleet configuration for the cluster. Structure is documented below.
*/
public val fleet: Output?
get() = javaResource.fleet().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
clusterFleetToKotlin(args0)
})
}).orElse(null)
})
/**
* Configuration for [GKE Gateway API controller](https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api). Structure is documented below.
*/
public val gatewayApiConfig: Output
get() = javaResource.gatewayApiConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterGatewayApiConfigToKotlin(args0)
})
})
/**
* . Structure is documented below.
*/
public val identityServiceConfig: Output
get() = javaResource.identityServiceConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterIdentityServiceConfigToKotlin(args0)
})
})
/**
* 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`.
*/
public val initialNodeCount: Output?
get() = javaResource.initialNodeCount().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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.
*/
public val ipAllocationPolicy: Output
get() = javaResource.ipAllocationPolicy().applyValue({ args0 ->
args0.let({ args0 ->
clusterIpAllocationPolicyToKotlin(args0)
})
})
/**
* The fingerprint of the set of labels for this cluster.
*/
public val labelFingerprint: Output
get() = javaResource.labelFingerprint().applyValue({ args0 -> args0 })
/**
* 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
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Logging configuration for the cluster.
* Structure is documented below.
*/
public val loggingConfig: Output
get() = javaResource.loggingConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterLoggingConfigToKotlin(args0)
})
})
/**
* 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`
*/
public val loggingService: Output
get() = javaResource.loggingService().applyValue({ args0 -> args0 })
/**
* The maintenance policy to use for the cluster. Structure is
* documented below.
*/
public val maintenancePolicy: Output?
get() = javaResource.maintenancePolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterMaintenancePolicyToKotlin(args0) })
}).orElse(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.
*/
public val masterAuth: Output
get() = javaResource.masterAuth().applyValue({ args0 ->
args0.let({ args0 ->
clusterMasterAuthToKotlin(args0)
})
})
/**
* 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.
*/
public val masterAuthorizedNetworksConfig: Output
get() = javaResource.masterAuthorizedNetworksConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterMasterAuthorizedNetworksConfigToKotlin(args0)
})
})
/**
* The current version of the master in the cluster. This may
* be different than the `min_master_version` set in the config if the master
* has been updated by GKE.
*/
public val masterVersion: Output
get() = javaResource.masterVersion().applyValue({ args0 -> args0 })
/**
* Structure is documented below.
*/
public val meshCertificates: Output
get() = javaResource.meshCertificates().applyValue({ args0 ->
args0.let({ args0 ->
clusterMeshCertificatesToKotlin(args0)
})
})
/**
* 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](https://cloud.google.com/kubernetes-engine/versioning-and-upgrades#specifying_cluster_version)
* describe the various acceptable formats for this field.
* > If you are using the `gcp.container.getEngineVersions` datasource with a regional cluster, ensure that you have provided a `location`
* to the datasource. A region can have a different set of supported versions than its corresponding zones, and not all zones in a
* region are guaranteed to support the same version.
*/
public val minMasterVersion: Output?
get() = javaResource.minMasterVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Monitoring configuration for the cluster.
* Structure is documented below.
*/
public val monitoringConfig: Output
get() = javaResource.monitoringConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterMonitoringConfigToKotlin(args0)
})
})
/**
* 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`
*/
public val monitoringService: Output
get() = javaResource.monitoringService().applyValue({ args0 -> args0 })
/**
* The name of the cluster, unique within the project and
* location.
* - - -
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val network: Output?
get() = javaResource.network().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Configuration options for the
* [NetworkPolicy](https://kubernetes.io/docs/concepts/services-networking/networkpolicies/)
* feature. Structure is documented below.
*/
public val networkPolicy: Output?
get() = javaResource.networkPolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterNetworkPolicyToKotlin(args0) })
}).orElse(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](https://cloud.google.com/kubernetes-engine/docs/how-to/ip-aliases). Newly created clusters will default to `VPC_NATIVE`.
*/
public val networkingMode: Output
get() = javaResource.networkingMode().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val nodeConfig: Output
get() = javaResource.nodeConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterNodeConfigToKotlin(args0)
})
})
/**
* 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.
* > A "multi-zonal" cluster is a zonal cluster with at least one additional zone
* defined; in a multi-zonal cluster, the cluster master is only present in a
* single zone while nodes are present in each of the primary zone and the node
* locations. In contrast, in a regional cluster, cluster master nodes are present
* in multiple zones in the region. For that reason, regional clusters should be
* preferred.
*/
public val nodeLocations: Output>
get() = javaResource.nodeLocations().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Node pool configs that apply to auto-provisioned node pools in
* [autopilot](https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#comparison) clusters and
* [node auto-provisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning)-enabled clusters. Structure is documented below.
*/
public val nodePoolAutoConfig: Output
get() = javaResource.nodePoolAutoConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterNodePoolAutoConfigToKotlin(args0)
})
})
/**
* Default NodePool settings for the entire cluster. These settings are overridden if specified on the specific NodePool object. Structure is documented below.
*/
public val nodePoolDefaults: Output
get() = javaResource.nodePoolDefaults().applyValue({ args0 ->
args0.let({ args0 ->
clusterNodePoolDefaultsToKotlin(args0)
})
})
/**
* 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.
*/
public val nodePools: Output>
get() = javaResource.nodePools().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
clusterNodePoolToKotlin(args0)
})
})
})
/**
* 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.
*/
public val nodeVersion: Output
get() = javaResource.nodeVersion().applyValue({ args0 -> args0 })
/**
* Configuration for the [cluster upgrade notifications](https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-upgrade-notifications) feature. Structure is documented below.
*/
public val notificationConfig: Output
get() = javaResource.notificationConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterNotificationConfigToKotlin(args0)
})
})
public val operation: Output
get() = javaResource.operation().applyValue({ args0 -> args0 })
/**
* Configuration for the
* [PodSecurityPolicy](https://cloud.google.com/kubernetes-engine/docs/how-to/pod-security-policies) feature.
* Structure is documented below.
*/
public val podSecurityPolicyConfig: Output?
get() = javaResource.podSecurityPolicyConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterPodSecurityPolicyConfigToKotlin(args0) })
}).orElse(null)
})
/**
* Configuration for [private clusters](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters),
* clusters with private nodes. Structure is documented below.
*/
public val privateClusterConfig: Output
get() = javaResource.privateClusterConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterPrivateClusterConfigToKotlin(args0)
})
})
/**
* 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).
*/
public val privateIpv6GoogleAccess: Output
get() = javaResource.privateIpv6GoogleAccess().applyValue({ args0 -> args0 })
/**
* The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* Enable/Disable Protect API features for the cluster. Structure is documented below.
*/
public val protectConfig: Output
get() = javaResource.protectConfig().applyValue({ args0 ->
args0.let({ args0 ->
clusterProtectConfigToKotlin(args0)
})
})
/**
* Configuration options for the [Release channel](https://cloud.google.com/kubernetes-engine/docs/concepts/release-channels)
* 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](https://cloud.google.com/kubernetes-engine/docs/concepts/release-channels#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.
*/
public val releaseChannel: Output
get() = javaResource.releaseChannel().applyValue({ args0 ->
args0.let({ args0 ->
clusterReleaseChannelToKotlin(args0)
})
})
/**
* 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`.
*/
public val removeDefaultNodePool: Output?
get() = javaResource.removeDefaultNodePool().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The GCE resource labels (a map of key/value pairs) to be applied to the cluster.
*/
public val resourceLabels: Output