1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. managedkafka
  5. Cluster
Google Cloud v8.25.0 published on Thursday, Apr 3, 2025 by Pulumi

gcp.managedkafka.Cluster

Explore with Pulumi AI

A Managed Service for Apache Kafka cluster. Apache Kafka is a trademark owned by the Apache Software Foundation.

Example Usage

Managedkafka Cluster Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const project = gcp.organizations.getProject({});
const example = new gcp.managedkafka.Cluster("example", {
    clusterId: "my-cluster",
    location: "us-central1",
    capacityConfig: {
        vcpuCount: "3",
        memoryBytes: "3221225472",
    },
    gcpConfig: {
        accessConfig: {
            networkConfigs: [{
                subnet: project.then(project => `projects/${project.number}/regions/us-central1/subnetworks/default`),
            }],
        },
    },
    rebalanceConfig: {
        mode: "AUTO_REBALANCE_ON_SCALE_UP",
    },
    labels: {
        key: "value",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

project = gcp.organizations.get_project()
example = gcp.managedkafka.Cluster("example",
    cluster_id="my-cluster",
    location="us-central1",
    capacity_config={
        "vcpu_count": "3",
        "memory_bytes": "3221225472",
    },
    gcp_config={
        "access_config": {
            "network_configs": [{
                "subnet": f"projects/{project.number}/regions/us-central1/subnetworks/default",
            }],
        },
    },
    rebalance_config={
        "mode": "AUTO_REBALANCE_ON_SCALE_UP",
    },
    labels={
        "key": "value",
    })
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/managedkafka"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = managedkafka.NewCluster(ctx, "example", &managedkafka.ClusterArgs{
			ClusterId: pulumi.String("my-cluster"),
			Location:  pulumi.String("us-central1"),
			CapacityConfig: &managedkafka.ClusterCapacityConfigArgs{
				VcpuCount:   pulumi.String("3"),
				MemoryBytes: pulumi.String("3221225472"),
			},
			GcpConfig: &managedkafka.ClusterGcpConfigArgs{
				AccessConfig: &managedkafka.ClusterGcpConfigAccessConfigArgs{
					NetworkConfigs: managedkafka.ClusterGcpConfigAccessConfigNetworkConfigArray{
						&managedkafka.ClusterGcpConfigAccessConfigNetworkConfigArgs{
							Subnet: pulumi.Sprintf("projects/%v/regions/us-central1/subnetworks/default", project.Number),
						},
					},
				},
			},
			RebalanceConfig: &managedkafka.ClusterRebalanceConfigArgs{
				Mode: pulumi.String("AUTO_REBALANCE_ON_SCALE_UP"),
			},
			Labels: pulumi.StringMap{
				"key": pulumi.String("value"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var project = Gcp.Organizations.GetProject.Invoke();

    var example = new Gcp.ManagedKafka.Cluster("example", new()
    {
        ClusterId = "my-cluster",
        Location = "us-central1",
        CapacityConfig = new Gcp.ManagedKafka.Inputs.ClusterCapacityConfigArgs
        {
            VcpuCount = "3",
            MemoryBytes = "3221225472",
        },
        GcpConfig = new Gcp.ManagedKafka.Inputs.ClusterGcpConfigArgs
        {
            AccessConfig = new Gcp.ManagedKafka.Inputs.ClusterGcpConfigAccessConfigArgs
            {
                NetworkConfigs = new[]
                {
                    new Gcp.ManagedKafka.Inputs.ClusterGcpConfigAccessConfigNetworkConfigArgs
                    {
                        Subnet = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/regions/us-central1/subnetworks/default",
                    },
                },
            },
        },
        RebalanceConfig = new Gcp.ManagedKafka.Inputs.ClusterRebalanceConfigArgs
        {
            Mode = "AUTO_REBALANCE_ON_SCALE_UP",
        },
        Labels = 
        {
            { "key", "value" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.managedkafka.Cluster;
import com.pulumi.gcp.managedkafka.ClusterArgs;
import com.pulumi.gcp.managedkafka.inputs.ClusterCapacityConfigArgs;
import com.pulumi.gcp.managedkafka.inputs.ClusterGcpConfigArgs;
import com.pulumi.gcp.managedkafka.inputs.ClusterGcpConfigAccessConfigArgs;
import com.pulumi.gcp.managedkafka.inputs.ClusterRebalanceConfigArgs;
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) {
        final var project = OrganizationsFunctions.getProject();

        var example = new Cluster("example", ClusterArgs.builder()
            .clusterId("my-cluster")
            .location("us-central1")
            .capacityConfig(ClusterCapacityConfigArgs.builder()
                .vcpuCount(3)
                .memoryBytes(3221225472)
                .build())
            .gcpConfig(ClusterGcpConfigArgs.builder()
                .accessConfig(ClusterGcpConfigAccessConfigArgs.builder()
                    .networkConfigs(ClusterGcpConfigAccessConfigNetworkConfigArgs.builder()
                        .subnet(String.format("projects/%s/regions/us-central1/subnetworks/default", project.applyValue(getProjectResult -> getProjectResult.number())))
                        .build())
                    .build())
                .build())
            .rebalanceConfig(ClusterRebalanceConfigArgs.builder()
                .mode("AUTO_REBALANCE_ON_SCALE_UP")
                .build())
            .labels(Map.of("key", "value"))
            .build());

    }
}
Copy
resources:
  example:
    type: gcp:managedkafka:Cluster
    properties:
      clusterId: my-cluster
      location: us-central1
      capacityConfig:
        vcpuCount: 3
        memoryBytes: 3.221225472e+09
      gcpConfig:
        accessConfig:
          networkConfigs:
            - subnet: projects/${project.number}/regions/us-central1/subnetworks/default
      rebalanceConfig:
        mode: AUTO_REBALANCE_ON_SCALE_UP
      labels:
        key: value
variables:
  project:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}
Copy

Managedkafka Cluster Cmek

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const keyRing = new gcp.kms.KeyRing("key_ring", {
    name: "example-key-ring",
    location: "us-central1",
});
const key = new gcp.kms.CryptoKey("key", {
    name: "example-key",
    keyRing: keyRing.id,
});
const project = gcp.organizations.getProject({});
const example = new gcp.managedkafka.Cluster("example", {
    clusterId: "my-cluster",
    location: "us-central1",
    capacityConfig: {
        vcpuCount: "3",
        memoryBytes: "3221225472",
    },
    gcpConfig: {
        accessConfig: {
            networkConfigs: [{
                subnet: project.then(project => `projects/${project.number}/regions/us-central1/subnetworks/default`),
            }],
        },
        kmsKey: key.id,
    },
});
const kafkaServiceIdentity = new gcp.projects.ServiceIdentity("kafka_service_identity", {
    project: project.then(project => project.projectId),
    service: "managedkafka.googleapis.com",
});
const cryptoKeyBinding = new gcp.kms.CryptoKeyIAMBinding("crypto_key_binding", {
    cryptoKeyId: key.id,
    role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
    members: [project.then(project => `serviceAccount:service-${project.number}@gcp-sa-managedkafka.iam.gserviceaccount.com`)],
});
Copy
import pulumi
import pulumi_gcp as gcp

key_ring = gcp.kms.KeyRing("key_ring",
    name="example-key-ring",
    location="us-central1")
key = gcp.kms.CryptoKey("key",
    name="example-key",
    key_ring=key_ring.id)
project = gcp.organizations.get_project()
example = gcp.managedkafka.Cluster("example",
    cluster_id="my-cluster",
    location="us-central1",
    capacity_config={
        "vcpu_count": "3",
        "memory_bytes": "3221225472",
    },
    gcp_config={
        "access_config": {
            "network_configs": [{
                "subnet": f"projects/{project.number}/regions/us-central1/subnetworks/default",
            }],
        },
        "kms_key": key.id,
    })
kafka_service_identity = gcp.projects.ServiceIdentity("kafka_service_identity",
    project=project.project_id,
    service="managedkafka.googleapis.com")
crypto_key_binding = gcp.kms.CryptoKeyIAMBinding("crypto_key_binding",
    crypto_key_id=key.id,
    role="roles/cloudkms.cryptoKeyEncrypterDecrypter",
    members=[f"serviceAccount:service-{project.number}@gcp-sa-managedkafka.iam.gserviceaccount.com"])
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/kms"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/managedkafka"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		keyRing, err := kms.NewKeyRing(ctx, "key_ring", &kms.KeyRingArgs{
			Name:     pulumi.String("example-key-ring"),
			Location: pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		key, err := kms.NewCryptoKey(ctx, "key", &kms.CryptoKeyArgs{
			Name:    pulumi.String("example-key"),
			KeyRing: keyRing.ID(),
		})
		if err != nil {
			return err
		}
		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = managedkafka.NewCluster(ctx, "example", &managedkafka.ClusterArgs{
			ClusterId: pulumi.String("my-cluster"),
			Location:  pulumi.String("us-central1"),
			CapacityConfig: &managedkafka.ClusterCapacityConfigArgs{
				VcpuCount:   pulumi.String("3"),
				MemoryBytes: pulumi.String("3221225472"),
			},
			GcpConfig: &managedkafka.ClusterGcpConfigArgs{
				AccessConfig: &managedkafka.ClusterGcpConfigAccessConfigArgs{
					NetworkConfigs: managedkafka.ClusterGcpConfigAccessConfigNetworkConfigArray{
						&managedkafka.ClusterGcpConfigAccessConfigNetworkConfigArgs{
							Subnet: pulumi.Sprintf("projects/%v/regions/us-central1/subnetworks/default", project.Number),
						},
					},
				},
				KmsKey: key.ID(),
			},
		})
		if err != nil {
			return err
		}
		_, err = projects.NewServiceIdentity(ctx, "kafka_service_identity", &projects.ServiceIdentityArgs{
			Project: pulumi.String(project.ProjectId),
			Service: pulumi.String("managedkafka.googleapis.com"),
		})
		if err != nil {
			return err
		}
		_, err = kms.NewCryptoKeyIAMBinding(ctx, "crypto_key_binding", &kms.CryptoKeyIAMBindingArgs{
			CryptoKeyId: key.ID(),
			Role:        pulumi.String("roles/cloudkms.cryptoKeyEncrypterDecrypter"),
			Members: pulumi.StringArray{
				pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-managedkafka.iam.gserviceaccount.com", project.Number),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var keyRing = new Gcp.Kms.KeyRing("key_ring", new()
    {
        Name = "example-key-ring",
        Location = "us-central1",
    });

    var key = new Gcp.Kms.CryptoKey("key", new()
    {
        Name = "example-key",
        KeyRing = keyRing.Id,
    });

    var project = Gcp.Organizations.GetProject.Invoke();

    var example = new Gcp.ManagedKafka.Cluster("example", new()
    {
        ClusterId = "my-cluster",
        Location = "us-central1",
        CapacityConfig = new Gcp.ManagedKafka.Inputs.ClusterCapacityConfigArgs
        {
            VcpuCount = "3",
            MemoryBytes = "3221225472",
        },
        GcpConfig = new Gcp.ManagedKafka.Inputs.ClusterGcpConfigArgs
        {
            AccessConfig = new Gcp.ManagedKafka.Inputs.ClusterGcpConfigAccessConfigArgs
            {
                NetworkConfigs = new[]
                {
                    new Gcp.ManagedKafka.Inputs.ClusterGcpConfigAccessConfigNetworkConfigArgs
                    {
                        Subnet = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/regions/us-central1/subnetworks/default",
                    },
                },
            },
            KmsKey = key.Id,
        },
    });

    var kafkaServiceIdentity = new Gcp.Projects.ServiceIdentity("kafka_service_identity", new()
    {
        Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
        Service = "managedkafka.googleapis.com",
    });

    var cryptoKeyBinding = new Gcp.Kms.CryptoKeyIAMBinding("crypto_key_binding", new()
    {
        CryptoKeyId = key.Id,
        Role = "roles/cloudkms.cryptoKeyEncrypterDecrypter",
        Members = new[]
        {
            $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-managedkafka.iam.gserviceaccount.com",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.kms.KeyRing;
import com.pulumi.gcp.kms.KeyRingArgs;
import com.pulumi.gcp.kms.CryptoKey;
import com.pulumi.gcp.kms.CryptoKeyArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.managedkafka.Cluster;
import com.pulumi.gcp.managedkafka.ClusterArgs;
import com.pulumi.gcp.managedkafka.inputs.ClusterCapacityConfigArgs;
import com.pulumi.gcp.managedkafka.inputs.ClusterGcpConfigArgs;
import com.pulumi.gcp.managedkafka.inputs.ClusterGcpConfigAccessConfigArgs;
import com.pulumi.gcp.projects.ServiceIdentity;
import com.pulumi.gcp.projects.ServiceIdentityArgs;
import com.pulumi.gcp.kms.CryptoKeyIAMBinding;
import com.pulumi.gcp.kms.CryptoKeyIAMBindingArgs;
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 keyRing = new KeyRing("keyRing", KeyRingArgs.builder()
            .name("example-key-ring")
            .location("us-central1")
            .build());

        var key = new CryptoKey("key", CryptoKeyArgs.builder()
            .name("example-key")
            .keyRing(keyRing.id())
            .build());

        final var project = OrganizationsFunctions.getProject();

        var example = new Cluster("example", ClusterArgs.builder()
            .clusterId("my-cluster")
            .location("us-central1")
            .capacityConfig(ClusterCapacityConfigArgs.builder()
                .vcpuCount(3)
                .memoryBytes(3221225472)
                .build())
            .gcpConfig(ClusterGcpConfigArgs.builder()
                .accessConfig(ClusterGcpConfigAccessConfigArgs.builder()
                    .networkConfigs(ClusterGcpConfigAccessConfigNetworkConfigArgs.builder()
                        .subnet(String.format("projects/%s/regions/us-central1/subnetworks/default", project.applyValue(getProjectResult -> getProjectResult.number())))
                        .build())
                    .build())
                .kmsKey(key.id())
                .build())
            .build());

        var kafkaServiceIdentity = new ServiceIdentity("kafkaServiceIdentity", ServiceIdentityArgs.builder()
            .project(project.applyValue(getProjectResult -> getProjectResult.projectId()))
            .service("managedkafka.googleapis.com")
            .build());

        var cryptoKeyBinding = new CryptoKeyIAMBinding("cryptoKeyBinding", CryptoKeyIAMBindingArgs.builder()
            .cryptoKeyId(key.id())
            .role("roles/cloudkms.cryptoKeyEncrypterDecrypter")
            .members(String.format("serviceAccount:service-%s@gcp-sa-managedkafka.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
            .build());

    }
}
Copy
resources:
  example:
    type: gcp:managedkafka:Cluster
    properties:
      clusterId: my-cluster
      location: us-central1
      capacityConfig:
        vcpuCount: 3
        memoryBytes: 3.221225472e+09
      gcpConfig:
        accessConfig:
          networkConfigs:
            - subnet: projects/${project.number}/regions/us-central1/subnetworks/default
        kmsKey: ${key.id}
  kafkaServiceIdentity:
    type: gcp:projects:ServiceIdentity
    name: kafka_service_identity
    properties:
      project: ${project.projectId}
      service: managedkafka.googleapis.com
  key:
    type: gcp:kms:CryptoKey
    properties:
      name: example-key
      keyRing: ${keyRing.id}
  keyRing:
    type: gcp:kms:KeyRing
    name: key_ring
    properties:
      name: example-key-ring
      location: us-central1
  cryptoKeyBinding:
    type: gcp:kms:CryptoKeyIAMBinding
    name: crypto_key_binding
    properties:
      cryptoKeyId: ${key.id}
      role: roles/cloudkms.cryptoKeyEncrypterDecrypter
      members:
        - serviceAccount:service-${project.number}@gcp-sa-managedkafka.iam.gserviceaccount.com
variables:
  project:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}
Copy

Create Cluster Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Cluster(name: string, args: ClusterArgs, opts?: CustomResourceOptions);
@overload
def Cluster(resource_name: str,
            args: ClusterArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Cluster(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            capacity_config: Optional[ClusterCapacityConfigArgs] = None,
            cluster_id: Optional[str] = None,
            gcp_config: Optional[ClusterGcpConfigArgs] = None,
            location: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            project: Optional[str] = None,
            rebalance_config: Optional[ClusterRebalanceConfigArgs] = None)
func NewCluster(ctx *Context, name string, args ClusterArgs, opts ...ResourceOption) (*Cluster, error)
public Cluster(string name, ClusterArgs args, CustomResourceOptions? opts = null)
public Cluster(String name, ClusterArgs args)
public Cluster(String name, ClusterArgs args, CustomResourceOptions options)
type: gcp:managedkafka:Cluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var exampleclusterResourceResourceFromManagedkafkacluster = new Gcp.ManagedKafka.Cluster("exampleclusterResourceResourceFromManagedkafkacluster", new()
{
    CapacityConfig = new Gcp.ManagedKafka.Inputs.ClusterCapacityConfigArgs
    {
        MemoryBytes = "string",
        VcpuCount = "string",
    },
    ClusterId = "string",
    GcpConfig = new Gcp.ManagedKafka.Inputs.ClusterGcpConfigArgs
    {
        AccessConfig = new Gcp.ManagedKafka.Inputs.ClusterGcpConfigAccessConfigArgs
        {
            NetworkConfigs = new[]
            {
                new Gcp.ManagedKafka.Inputs.ClusterGcpConfigAccessConfigNetworkConfigArgs
                {
                    Subnet = "string",
                },
            },
        },
        KmsKey = "string",
    },
    Location = "string",
    Labels = 
    {
        { "string", "string" },
    },
    Project = "string",
    RebalanceConfig = new Gcp.ManagedKafka.Inputs.ClusterRebalanceConfigArgs
    {
        Mode = "string",
    },
});
Copy
example, err := managedkafka.NewCluster(ctx, "exampleclusterResourceResourceFromManagedkafkacluster", &managedkafka.ClusterArgs{
	CapacityConfig: &managedkafka.ClusterCapacityConfigArgs{
		MemoryBytes: pulumi.String("string"),
		VcpuCount:   pulumi.String("string"),
	},
	ClusterId: pulumi.String("string"),
	GcpConfig: &managedkafka.ClusterGcpConfigArgs{
		AccessConfig: &managedkafka.ClusterGcpConfigAccessConfigArgs{
			NetworkConfigs: managedkafka.ClusterGcpConfigAccessConfigNetworkConfigArray{
				&managedkafka.ClusterGcpConfigAccessConfigNetworkConfigArgs{
					Subnet: pulumi.String("string"),
				},
			},
		},
		KmsKey: pulumi.String("string"),
	},
	Location: pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Project: pulumi.String("string"),
	RebalanceConfig: &managedkafka.ClusterRebalanceConfigArgs{
		Mode: pulumi.String("string"),
	},
})
Copy
var exampleclusterResourceResourceFromManagedkafkacluster = new Cluster("exampleclusterResourceResourceFromManagedkafkacluster", ClusterArgs.builder()
    .capacityConfig(ClusterCapacityConfigArgs.builder()
        .memoryBytes("string")
        .vcpuCount("string")
        .build())
    .clusterId("string")
    .gcpConfig(ClusterGcpConfigArgs.builder()
        .accessConfig(ClusterGcpConfigAccessConfigArgs.builder()
            .networkConfigs(ClusterGcpConfigAccessConfigNetworkConfigArgs.builder()
                .subnet("string")
                .build())
            .build())
        .kmsKey("string")
        .build())
    .location("string")
    .labels(Map.of("string", "string"))
    .project("string")
    .rebalanceConfig(ClusterRebalanceConfigArgs.builder()
        .mode("string")
        .build())
    .build());
Copy
examplecluster_resource_resource_from_managedkafkacluster = gcp.managedkafka.Cluster("exampleclusterResourceResourceFromManagedkafkacluster",
    capacity_config={
        "memory_bytes": "string",
        "vcpu_count": "string",
    },
    cluster_id="string",
    gcp_config={
        "access_config": {
            "network_configs": [{
                "subnet": "string",
            }],
        },
        "kms_key": "string",
    },
    location="string",
    labels={
        "string": "string",
    },
    project="string",
    rebalance_config={
        "mode": "string",
    })
Copy
const exampleclusterResourceResourceFromManagedkafkacluster = new gcp.managedkafka.Cluster("exampleclusterResourceResourceFromManagedkafkacluster", {
    capacityConfig: {
        memoryBytes: "string",
        vcpuCount: "string",
    },
    clusterId: "string",
    gcpConfig: {
        accessConfig: {
            networkConfigs: [{
                subnet: "string",
            }],
        },
        kmsKey: "string",
    },
    location: "string",
    labels: {
        string: "string",
    },
    project: "string",
    rebalanceConfig: {
        mode: "string",
    },
});
Copy
type: gcp:managedkafka:Cluster
properties:
    capacityConfig:
        memoryBytes: string
        vcpuCount: string
    clusterId: string
    gcpConfig:
        accessConfig:
            networkConfigs:
                - subnet: string
        kmsKey: string
    labels:
        string: string
    location: string
    project: string
    rebalanceConfig:
        mode: string
Copy

Cluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Cluster resource accepts the following input properties:

CapacityConfig This property is required. ClusterCapacityConfig
A capacity configuration of a Kafka cluster. Structure is documented below.
ClusterId
This property is required.
Changes to this property will trigger replacement.
string
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
GcpConfig This property is required. ClusterGcpConfig
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
Location
This property is required.
Changes to this property will trigger replacement.
string
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
Labels Dictionary<string, string>
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
Project Changes to this property will trigger replacement. string
RebalanceConfig ClusterRebalanceConfig
Defines rebalancing behavior of a Kafka cluster.
CapacityConfig This property is required. ClusterCapacityConfigArgs
A capacity configuration of a Kafka cluster. Structure is documented below.
ClusterId
This property is required.
Changes to this property will trigger replacement.
string
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
GcpConfig This property is required. ClusterGcpConfigArgs
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
Location
This property is required.
Changes to this property will trigger replacement.
string
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
Labels map[string]string
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
Project Changes to this property will trigger replacement. string
RebalanceConfig ClusterRebalanceConfigArgs
Defines rebalancing behavior of a Kafka cluster.
capacityConfig This property is required. ClusterCapacityConfig
A capacity configuration of a Kafka cluster. Structure is documented below.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
gcpConfig This property is required. ClusterGcpConfig
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
location
This property is required.
Changes to this property will trigger replacement.
String
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
labels Map<String,String>
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
project Changes to this property will trigger replacement. String
rebalanceConfig ClusterRebalanceConfig
Defines rebalancing behavior of a Kafka cluster.
capacityConfig This property is required. ClusterCapacityConfig
A capacity configuration of a Kafka cluster. Structure is documented below.
clusterId
This property is required.
Changes to this property will trigger replacement.
string
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
gcpConfig This property is required. ClusterGcpConfig
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
location
This property is required.
Changes to this property will trigger replacement.
string
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
labels {[key: string]: string}
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
project Changes to this property will trigger replacement. string
rebalanceConfig ClusterRebalanceConfig
Defines rebalancing behavior of a Kafka cluster.
capacity_config This property is required. ClusterCapacityConfigArgs
A capacity configuration of a Kafka cluster. Structure is documented below.
cluster_id
This property is required.
Changes to this property will trigger replacement.
str
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
gcp_config This property is required. ClusterGcpConfigArgs
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
location
This property is required.
Changes to this property will trigger replacement.
str
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
labels Mapping[str, str]
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
project Changes to this property will trigger replacement. str
rebalance_config ClusterRebalanceConfigArgs
Defines rebalancing behavior of a Kafka cluster.
capacityConfig This property is required. Property Map
A capacity configuration of a Kafka cluster. Structure is documented below.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
gcpConfig This property is required. Property Map
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
location
This property is required.
Changes to this property will trigger replacement.
String
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
labels Map<String>
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
project Changes to this property will trigger replacement. String
rebalanceConfig Property Map
Defines rebalancing behavior of a Kafka cluster.

Outputs

All input properties are implicitly available as output properties. Additionally, the Cluster resource produces the following output properties:

CreateTime string
The time when the cluster was created.
EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
State string
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
UpdateTime string
The time when the cluster was last updated.
CreateTime string
The time when the cluster was created.
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
State string
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
UpdateTime string
The time when the cluster was last updated.
createTime String
The time when the cluster was created.
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
state String
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
updateTime String
The time when the cluster was last updated.
createTime string
The time when the cluster was created.
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
state string
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
updateTime string
The time when the cluster was last updated.
create_time str
The time when the cluster was created.
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
state str
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
update_time str
The time when the cluster was last updated.
createTime String
The time when the cluster was created.
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
state String
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
updateTime String
The time when the cluster was last updated.

Look up Existing Cluster Resource

Get an existing Cluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ClusterState, opts?: CustomResourceOptions): Cluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        capacity_config: Optional[ClusterCapacityConfigArgs] = None,
        cluster_id: Optional[str] = None,
        create_time: Optional[str] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        gcp_config: Optional[ClusterGcpConfigArgs] = None,
        labels: Optional[Mapping[str, str]] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        rebalance_config: Optional[ClusterRebalanceConfigArgs] = None,
        state: Optional[str] = None,
        update_time: Optional[str] = None) -> Cluster
func GetCluster(ctx *Context, name string, id IDInput, state *ClusterState, opts ...ResourceOption) (*Cluster, error)
public static Cluster Get(string name, Input<string> id, ClusterState? state, CustomResourceOptions? opts = null)
public static Cluster get(String name, Output<String> id, ClusterState state, CustomResourceOptions options)
resources:  _:    type: gcp:managedkafka:Cluster    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CapacityConfig ClusterCapacityConfig
A capacity configuration of a Kafka cluster. Structure is documented below.
ClusterId Changes to this property will trigger replacement. string
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
CreateTime string
The time when the cluster was created.
EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
GcpConfig ClusterGcpConfig
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
Labels Dictionary<string, string>
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
Location Changes to this property will trigger replacement. string
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
Name string
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
Project Changes to this property will trigger replacement. string
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
RebalanceConfig ClusterRebalanceConfig
Defines rebalancing behavior of a Kafka cluster.
State string
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
UpdateTime string
The time when the cluster was last updated.
CapacityConfig ClusterCapacityConfigArgs
A capacity configuration of a Kafka cluster. Structure is documented below.
ClusterId Changes to this property will trigger replacement. string
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
CreateTime string
The time when the cluster was created.
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
GcpConfig ClusterGcpConfigArgs
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
Labels map[string]string
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
Location Changes to this property will trigger replacement. string
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
Name string
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
Project Changes to this property will trigger replacement. string
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
RebalanceConfig ClusterRebalanceConfigArgs
Defines rebalancing behavior of a Kafka cluster.
State string
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
UpdateTime string
The time when the cluster was last updated.
capacityConfig ClusterCapacityConfig
A capacity configuration of a Kafka cluster. Structure is documented below.
clusterId Changes to this property will trigger replacement. String
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
createTime String
The time when the cluster was created.
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
gcpConfig ClusterGcpConfig
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
labels Map<String,String>
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
location Changes to this property will trigger replacement. String
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
name String
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
project Changes to this property will trigger replacement. String
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
rebalanceConfig ClusterRebalanceConfig
Defines rebalancing behavior of a Kafka cluster.
state String
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
updateTime String
The time when the cluster was last updated.
capacityConfig ClusterCapacityConfig
A capacity configuration of a Kafka cluster. Structure is documented below.
clusterId Changes to this property will trigger replacement. string
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
createTime string
The time when the cluster was created.
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
gcpConfig ClusterGcpConfig
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
labels {[key: string]: string}
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
location Changes to this property will trigger replacement. string
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
name string
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
project Changes to this property will trigger replacement. string
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
rebalanceConfig ClusterRebalanceConfig
Defines rebalancing behavior of a Kafka cluster.
state string
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
updateTime string
The time when the cluster was last updated.
capacity_config ClusterCapacityConfigArgs
A capacity configuration of a Kafka cluster. Structure is documented below.
cluster_id Changes to this property will trigger replacement. str
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
create_time str
The time when the cluster was created.
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
gcp_config ClusterGcpConfigArgs
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
labels Mapping[str, str]
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
location Changes to this property will trigger replacement. str
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
name str
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
project Changes to this property will trigger replacement. str
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
rebalance_config ClusterRebalanceConfigArgs
Defines rebalancing behavior of a Kafka cluster.
state str
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
update_time str
The time when the cluster was last updated.
capacityConfig Property Map
A capacity configuration of a Kafka cluster. Structure is documented below.
clusterId Changes to this property will trigger replacement. String
The ID to use for the cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression a-z? to comply with RFC 1035. This value is structured like: my-cluster-id.
createTime String
The time when the cluster was created.
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
gcpConfig Property Map
Configuration properties for a Kafka cluster deployed to Google Cloud Platform. Structure is documented below.
labels Map<String>
List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers. 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.
location Changes to this property will trigger replacement. String
ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
name String
The name of the cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
project Changes to this property will trigger replacement. String
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
rebalanceConfig Property Map
Defines rebalancing behavior of a Kafka cluster.
state String
The current state of the cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
updateTime String
The time when the cluster was last updated.

Supporting Types

ClusterCapacityConfig
, ClusterCapacityConfigArgs

MemoryBytes This property is required. string
The memory to provision for the cluster in bytes. The value must be between 1 GiB and 8 GiB per vCPU. Ex. 1024Mi, 4Gi.


VcpuCount This property is required. string
The number of vCPUs to provision for the cluster. The minimum is 3.
MemoryBytes This property is required. string
The memory to provision for the cluster in bytes. The value must be between 1 GiB and 8 GiB per vCPU. Ex. 1024Mi, 4Gi.


VcpuCount This property is required. string
The number of vCPUs to provision for the cluster. The minimum is 3.
memoryBytes This property is required. String
The memory to provision for the cluster in bytes. The value must be between 1 GiB and 8 GiB per vCPU. Ex. 1024Mi, 4Gi.


vcpuCount This property is required. String
The number of vCPUs to provision for the cluster. The minimum is 3.
memoryBytes This property is required. string
The memory to provision for the cluster in bytes. The value must be between 1 GiB and 8 GiB per vCPU. Ex. 1024Mi, 4Gi.


vcpuCount This property is required. string
The number of vCPUs to provision for the cluster. The minimum is 3.
memory_bytes This property is required. str
The memory to provision for the cluster in bytes. The value must be between 1 GiB and 8 GiB per vCPU. Ex. 1024Mi, 4Gi.


vcpu_count This property is required. str
The number of vCPUs to provision for the cluster. The minimum is 3.
memoryBytes This property is required. String
The memory to provision for the cluster in bytes. The value must be between 1 GiB and 8 GiB per vCPU. Ex. 1024Mi, 4Gi.


vcpuCount This property is required. String
The number of vCPUs to provision for the cluster. The minimum is 3.

ClusterGcpConfig
, ClusterGcpConfigArgs

AccessConfig This property is required. ClusterGcpConfigAccessConfig
The configuration of access to the Kafka cluster. Structure is documented below.
KmsKey Changes to this property will trigger replacement. string
The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Must be in the format projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY.
AccessConfig This property is required. ClusterGcpConfigAccessConfig
The configuration of access to the Kafka cluster. Structure is documented below.
KmsKey Changes to this property will trigger replacement. string
The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Must be in the format projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY.
accessConfig This property is required. ClusterGcpConfigAccessConfig
The configuration of access to the Kafka cluster. Structure is documented below.
kmsKey Changes to this property will trigger replacement. String
The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Must be in the format projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY.
accessConfig This property is required. ClusterGcpConfigAccessConfig
The configuration of access to the Kafka cluster. Structure is documented below.
kmsKey Changes to this property will trigger replacement. string
The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Must be in the format projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY.
access_config This property is required. ClusterGcpConfigAccessConfig
The configuration of access to the Kafka cluster. Structure is documented below.
kms_key Changes to this property will trigger replacement. str
The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Must be in the format projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY.
accessConfig This property is required. Property Map
The configuration of access to the Kafka cluster. Structure is documented below.
kmsKey Changes to this property will trigger replacement. String
The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Must be in the format projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY.

ClusterGcpConfigAccessConfig
, ClusterGcpConfigAccessConfigArgs

NetworkConfigs This property is required. List<ClusterGcpConfigAccessConfigNetworkConfig>
Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka cluster are allocated. To make the cluster available in a VPC, you must specify at least one subnet per network. You must specify between 1 and 10 subnets. Additional subnets may be specified with additional network_configs blocks. Structure is documented below.
NetworkConfigs This property is required. []ClusterGcpConfigAccessConfigNetworkConfig
Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka cluster are allocated. To make the cluster available in a VPC, you must specify at least one subnet per network. You must specify between 1 and 10 subnets. Additional subnets may be specified with additional network_configs blocks. Structure is documented below.
networkConfigs This property is required. List<ClusterGcpConfigAccessConfigNetworkConfig>
Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka cluster are allocated. To make the cluster available in a VPC, you must specify at least one subnet per network. You must specify between 1 and 10 subnets. Additional subnets may be specified with additional network_configs blocks. Structure is documented below.
networkConfigs This property is required. ClusterGcpConfigAccessConfigNetworkConfig[]
Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka cluster are allocated. To make the cluster available in a VPC, you must specify at least one subnet per network. You must specify between 1 and 10 subnets. Additional subnets may be specified with additional network_configs blocks. Structure is documented below.
network_configs This property is required. Sequence[ClusterGcpConfigAccessConfigNetworkConfig]
Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka cluster are allocated. To make the cluster available in a VPC, you must specify at least one subnet per network. You must specify between 1 and 10 subnets. Additional subnets may be specified with additional network_configs blocks. Structure is documented below.
networkConfigs This property is required. List<Property Map>
Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka cluster are allocated. To make the cluster available in a VPC, you must specify at least one subnet per network. You must specify between 1 and 10 subnets. Additional subnets may be specified with additional network_configs blocks. Structure is documented below.

ClusterGcpConfigAccessConfigNetworkConfig
, ClusterGcpConfigAccessConfigNetworkConfigArgs

Subnet This property is required. string
Name of the VPC subnet from which the cluster is accessible. Both broker and bootstrap server IP addresses and DNS entries are automatically created in the subnet. The subnet must be located in the same region as the cluster. The project may differ. The name of the subnet must be in the format projects/PROJECT_ID/regions/REGION/subnetworks/SUBNET.
Subnet This property is required. string
Name of the VPC subnet from which the cluster is accessible. Both broker and bootstrap server IP addresses and DNS entries are automatically created in the subnet. The subnet must be located in the same region as the cluster. The project may differ. The name of the subnet must be in the format projects/PROJECT_ID/regions/REGION/subnetworks/SUBNET.
subnet This property is required. String
Name of the VPC subnet from which the cluster is accessible. Both broker and bootstrap server IP addresses and DNS entries are automatically created in the subnet. The subnet must be located in the same region as the cluster. The project may differ. The name of the subnet must be in the format projects/PROJECT_ID/regions/REGION/subnetworks/SUBNET.
subnet This property is required. string
Name of the VPC subnet from which the cluster is accessible. Both broker and bootstrap server IP addresses and DNS entries are automatically created in the subnet. The subnet must be located in the same region as the cluster. The project may differ. The name of the subnet must be in the format projects/PROJECT_ID/regions/REGION/subnetworks/SUBNET.
subnet This property is required. str
Name of the VPC subnet from which the cluster is accessible. Both broker and bootstrap server IP addresses and DNS entries are automatically created in the subnet. The subnet must be located in the same region as the cluster. The project may differ. The name of the subnet must be in the format projects/PROJECT_ID/regions/REGION/subnetworks/SUBNET.
subnet This property is required. String
Name of the VPC subnet from which the cluster is accessible. Both broker and bootstrap server IP addresses and DNS entries are automatically created in the subnet. The subnet must be located in the same region as the cluster. The project may differ. The name of the subnet must be in the format projects/PROJECT_ID/regions/REGION/subnetworks/SUBNET.

ClusterRebalanceConfig
, ClusterRebalanceConfigArgs

Mode string
The rebalance behavior for the cluster. When not specified, defaults to NO_REBALANCE. Possible values: MODE_UNSPECIFIED, NO_REBALANCE, AUTO_REBALANCE_ON_SCALE_UP.
Mode string
The rebalance behavior for the cluster. When not specified, defaults to NO_REBALANCE. Possible values: MODE_UNSPECIFIED, NO_REBALANCE, AUTO_REBALANCE_ON_SCALE_UP.
mode String
The rebalance behavior for the cluster. When not specified, defaults to NO_REBALANCE. Possible values: MODE_UNSPECIFIED, NO_REBALANCE, AUTO_REBALANCE_ON_SCALE_UP.
mode string
The rebalance behavior for the cluster. When not specified, defaults to NO_REBALANCE. Possible values: MODE_UNSPECIFIED, NO_REBALANCE, AUTO_REBALANCE_ON_SCALE_UP.
mode str
The rebalance behavior for the cluster. When not specified, defaults to NO_REBALANCE. Possible values: MODE_UNSPECIFIED, NO_REBALANCE, AUTO_REBALANCE_ON_SCALE_UP.
mode String
The rebalance behavior for the cluster. When not specified, defaults to NO_REBALANCE. Possible values: MODE_UNSPECIFIED, NO_REBALANCE, AUTO_REBALANCE_ON_SCALE_UP.

Import

Cluster can be imported using any of these accepted formats:

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

  • {{project}}/{{location}}/{{cluster_id}}

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

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

$ pulumi import gcp:managedkafka/cluster:Cluster default projects/{{project}}/locations/{{location}}/clusters/{{cluster_id}}
Copy
$ pulumi import gcp:managedkafka/cluster:Cluster default {{project}}/{{location}}/{{cluster_id}}
Copy
$ pulumi import gcp:managedkafka/cluster:Cluster default {{location}}/{{cluster_id}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.