1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. managedkafka
  5. ConnectCluster
Google Cloud v8.28.0 published on Tuesday, Apr 29, 2025 by Pulumi

gcp.managedkafka.ConnectCluster

Explore with Pulumi AI

gcp logo
Google Cloud v8.28.0 published on Tuesday, Apr 29, 2025 by Pulumi

    Example Usage

    Managedkafka Connect Cluster Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as time from "@pulumi/time";
    
    const project = new gcp.organizations.Project("project", {
        projectId: "tf-test_91980",
        name: "tf-test_37118",
        orgId: "123456789",
        billingAccount: "000000-0000000-0000000-000000",
        deletionPolicy: "DELETE",
    });
    const wait60Seconds = new time.index.Sleep("wait_60_seconds", {createDuration: "60s"}, {
        dependsOn: [project],
    });
    const compute = new gcp.projects.Service("compute", {
        project: project.projectId,
        service: "compute.googleapis.com",
    }, {
        dependsOn: [wait60Seconds],
    });
    const managedkafka = new gcp.projects.Service("managedkafka", {
        project: project.projectId,
        service: "managedkafka.googleapis.com",
    }, {
        dependsOn: [compute],
    });
    const wait120Seconds = new time.index.Sleep("wait_120_seconds", {createDuration: "120s"}, {
        dependsOn: [managedkafka],
    });
    const mkcSecondarySubnet = new gcp.compute.Subnetwork("mkc_secondary_subnet", {
        project: project.projectId,
        name: "my-secondary-subnetwork",
        ipCidrRange: "10.3.0.0/16",
        region: "us-central1",
        network: "default",
    }, {
        dependsOn: [wait120Seconds],
    });
    const gmkCluster = new gcp.managedkafka.Cluster("gmk_cluster", {
        project: project.projectId,
        clusterId: "my-cluster",
        location: "us-central1",
        capacityConfig: {
            vcpuCount: "3",
            memoryBytes: "3221225472",
        },
        gcpConfig: {
            accessConfig: {
                networkConfigs: [{
                    subnet: pulumi.interpolate`projects/${project.projectId}/regions/us-central1/subnetworks/default`,
                }],
            },
        },
    }, {
        dependsOn: [managedkafka],
    });
    const example = new gcp.managedkafka.ConnectCluster("example", {
        project: project.projectId,
        connectClusterId: "my-connect-cluster",
        kafkaCluster: pulumi.interpolate`projects/${project.projectId}/locations/us-central1/clusters/${gmkCluster.clusterId}`,
        location: "us-central1",
        capacityConfig: {
            vcpuCount: "12",
            memoryBytes: "21474836480",
        },
        gcpConfig: {
            accessConfig: {
                networkConfigs: [{
                    primarySubnet: pulumi.interpolate`projects/${project.projectId}/regions/us-central1/subnetworks/default`,
                    additionalSubnets: [mkcSecondarySubnet.id],
                    dnsDomainNames: [pulumi.interpolate`${gmkCluster.clusterId}.us-central1.managedkafka.${project.projectId}.cloud.goog`],
                }],
            },
        },
        labels: {
            key: "value",
        },
    }, {
        dependsOn: [managedkafka],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_time as time
    
    project = gcp.organizations.Project("project",
        project_id="tf-test_91980",
        name="tf-test_37118",
        org_id="123456789",
        billing_account="000000-0000000-0000000-000000",
        deletion_policy="DELETE")
    wait60_seconds = time.index.Sleep("wait_60_seconds", create_duration=60s,
    opts = pulumi.ResourceOptions(depends_on=[project]))
    compute = gcp.projects.Service("compute",
        project=project.project_id,
        service="compute.googleapis.com",
        opts = pulumi.ResourceOptions(depends_on=[wait60_seconds]))
    managedkafka = gcp.projects.Service("managedkafka",
        project=project.project_id,
        service="managedkafka.googleapis.com",
        opts = pulumi.ResourceOptions(depends_on=[compute]))
    wait120_seconds = time.index.Sleep("wait_120_seconds", create_duration=120s,
    opts = pulumi.ResourceOptions(depends_on=[managedkafka]))
    mkc_secondary_subnet = gcp.compute.Subnetwork("mkc_secondary_subnet",
        project=project.project_id,
        name="my-secondary-subnetwork",
        ip_cidr_range="10.3.0.0/16",
        region="us-central1",
        network="default",
        opts = pulumi.ResourceOptions(depends_on=[wait120_seconds]))
    gmk_cluster = gcp.managedkafka.Cluster("gmk_cluster",
        project=project.project_id,
        cluster_id="my-cluster",
        location="us-central1",
        capacity_config={
            "vcpu_count": "3",
            "memory_bytes": "3221225472",
        },
        gcp_config={
            "access_config": {
                "network_configs": [{
                    "subnet": project.project_id.apply(lambda project_id: f"projects/{project_id}/regions/us-central1/subnetworks/default"),
                }],
            },
        },
        opts = pulumi.ResourceOptions(depends_on=[managedkafka]))
    example = gcp.managedkafka.ConnectCluster("example",
        project=project.project_id,
        connect_cluster_id="my-connect-cluster",
        kafka_cluster=pulumi.Output.all(
            project_id=project.project_id,
            cluster_id=gmk_cluster.cluster_id
    ).apply(lambda resolved_outputs: f"projects/{resolved_outputs['project_id']}/locations/us-central1/clusters/{resolved_outputs['cluster_id']}")
    ,
        location="us-central1",
        capacity_config={
            "vcpu_count": "12",
            "memory_bytes": "21474836480",
        },
        gcp_config={
            "access_config": {
                "network_configs": [{
                    "primary_subnet": project.project_id.apply(lambda project_id: f"projects/{project_id}/regions/us-central1/subnetworks/default"),
                    "additional_subnets": [mkc_secondary_subnet.id],
                    "dns_domain_names": [pulumi.Output.all(
                        cluster_id=gmk_cluster.cluster_id,
                        project_id=project.project_id
    ).apply(lambda resolved_outputs: f"{resolved_outputs['cluster_id']}.us-central1.managedkafka.{resolved_outputs['project_id']}.cloud.goog")
    ],
                }],
            },
        },
        labels={
            "key": "value",
        },
        opts = pulumi.ResourceOptions(depends_on=[managedkafka]))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"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-time/sdk/go/time"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
    			ProjectId:      pulumi.String("tf-test_91980"),
    			Name:           pulumi.String("tf-test_37118"),
    			OrgId:          pulumi.String("123456789"),
    			BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
    			DeletionPolicy: pulumi.String("DELETE"),
    		})
    		if err != nil {
    			return err
    		}
    		wait60Seconds, err := time.NewSleep(ctx, "wait_60_seconds", &time.SleepArgs{
    			CreateDuration: "60s",
    		}, pulumi.DependsOn([]pulumi.Resource{
    			project,
    		}))
    		if err != nil {
    			return err
    		}
    		compute, err := projects.NewService(ctx, "compute", &projects.ServiceArgs{
    			Project: project.ProjectId,
    			Service: pulumi.String("compute.googleapis.com"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			wait60Seconds,
    		}))
    		if err != nil {
    			return err
    		}
    		managedkafka, err := projects.NewService(ctx, "managedkafka", &projects.ServiceArgs{
    			Project: project.ProjectId,
    			Service: pulumi.String("managedkafka.googleapis.com"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			compute,
    		}))
    		if err != nil {
    			return err
    		}
    		wait120Seconds, err := time.NewSleep(ctx, "wait_120_seconds", &time.SleepArgs{
    			CreateDuration: "120s",
    		}, pulumi.DependsOn([]pulumi.Resource{
    			managedkafka,
    		}))
    		if err != nil {
    			return err
    		}
    		mkcSecondarySubnet, err := compute.NewSubnetwork(ctx, "mkc_secondary_subnet", &compute.SubnetworkArgs{
    			Project:     project.ProjectId,
    			Name:        pulumi.String("my-secondary-subnetwork"),
    			IpCidrRange: pulumi.String("10.3.0.0/16"),
    			Region:      pulumi.String("us-central1"),
    			Network:     pulumi.String("default"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			wait120Seconds,
    		}))
    		if err != nil {
    			return err
    		}
    		gmkCluster, err := managedkafka.NewCluster(ctx, "gmk_cluster", &managedkafka.ClusterArgs{
    			Project:   project.ProjectId,
    			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: project.ProjectId.ApplyT(func(projectId string) (string, error) {
    								return fmt.Sprintf("projects/%v/regions/us-central1/subnetworks/default", projectId), nil
    							}).(pulumi.StringOutput),
    						},
    					},
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			managedkafka,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = managedkafka.NewConnectCluster(ctx, "example", &managedkafka.ConnectClusterArgs{
    			Project:          project.ProjectId,
    			ConnectClusterId: pulumi.String("my-connect-cluster"),
    			KafkaCluster: pulumi.All(project.ProjectId, gmkCluster.ClusterId).ApplyT(func(_args []interface{}) (string, error) {
    				projectId := _args[0].(string)
    				clusterId := _args[1].(string)
    				return fmt.Sprintf("projects/%v/locations/us-central1/clusters/%v", projectId, clusterId), nil
    			}).(pulumi.StringOutput),
    			Location: pulumi.String("us-central1"),
    			CapacityConfig: &managedkafka.ConnectClusterCapacityConfigArgs{
    				VcpuCount:   pulumi.String("12"),
    				MemoryBytes: pulumi.String("21474836480"),
    			},
    			GcpConfig: &managedkafka.ConnectClusterGcpConfigArgs{
    				AccessConfig: &managedkafka.ConnectClusterGcpConfigAccessConfigArgs{
    					NetworkConfigs: managedkafka.ConnectClusterGcpConfigAccessConfigNetworkConfigArray{
    						&managedkafka.ConnectClusterGcpConfigAccessConfigNetworkConfigArgs{
    							PrimarySubnet: project.ProjectId.ApplyT(func(projectId string) (string, error) {
    								return fmt.Sprintf("projects/%v/regions/us-central1/subnetworks/default", projectId), nil
    							}).(pulumi.StringOutput),
    							AdditionalSubnets: pulumi.StringArray{
    								mkcSecondarySubnet.ID(),
    							},
    							DnsDomainNames: pulumi.StringArray{
    								pulumi.All(gmkCluster.ClusterId, project.ProjectId).ApplyT(func(_args []interface{}) (string, error) {
    									clusterId := _args[0].(string)
    									projectId := _args[1].(string)
    									return fmt.Sprintf("%v.us-central1.managedkafka.%v.cloud.goog", clusterId, projectId), nil
    								}).(pulumi.StringOutput),
    							},
    						},
    					},
    				},
    			},
    			Labels: pulumi.StringMap{
    				"key": pulumi.String("value"),
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			managedkafka,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Time = Pulumi.Time;
    
    return await Deployment.RunAsync(() => 
    {
        var project = new Gcp.Organizations.Project("project", new()
        {
            ProjectId = "tf-test_91980",
            Name = "tf-test_37118",
            OrgId = "123456789",
            BillingAccount = "000000-0000000-0000000-000000",
            DeletionPolicy = "DELETE",
        });
    
        var wait60Seconds = new Time.Index.Sleep("wait_60_seconds", new()
        {
            CreateDuration = "60s",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                project,
            },
        });
    
        var compute = new Gcp.Projects.Service("compute", new()
        {
            Project = project.ProjectId,
            ServiceName = "compute.googleapis.com",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                wait60Seconds,
            },
        });
    
        var managedkafka = new Gcp.Projects.Service("managedkafka", new()
        {
            Project = project.ProjectId,
            ServiceName = "managedkafka.googleapis.com",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                compute,
            },
        });
    
        var wait120Seconds = new Time.Index.Sleep("wait_120_seconds", new()
        {
            CreateDuration = "120s",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                managedkafka,
            },
        });
    
        var mkcSecondarySubnet = new Gcp.Compute.Subnetwork("mkc_secondary_subnet", new()
        {
            Project = project.ProjectId,
            Name = "my-secondary-subnetwork",
            IpCidrRange = "10.3.0.0/16",
            Region = "us-central1",
            Network = "default",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                wait120Seconds,
            },
        });
    
        var gmkCluster = new Gcp.ManagedKafka.Cluster("gmk_cluster", new()
        {
            Project = project.ProjectId,
            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 = project.ProjectId.Apply(projectId => $"projects/{projectId}/regions/us-central1/subnetworks/default"),
                        },
                    },
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                managedkafka,
            },
        });
    
        var example = new Gcp.ManagedKafka.ConnectCluster("example", new()
        {
            Project = project.ProjectId,
            ConnectClusterId = "my-connect-cluster",
            KafkaCluster = Output.Tuple(project.ProjectId, gmkCluster.ClusterId).Apply(values =>
            {
                var projectId = values.Item1;
                var clusterId = values.Item2;
                return $"projects/{projectId}/locations/us-central1/clusters/{clusterId}";
            }),
            Location = "us-central1",
            CapacityConfig = new Gcp.ManagedKafka.Inputs.ConnectClusterCapacityConfigArgs
            {
                VcpuCount = "12",
                MemoryBytes = "21474836480",
            },
            GcpConfig = new Gcp.ManagedKafka.Inputs.ConnectClusterGcpConfigArgs
            {
                AccessConfig = new Gcp.ManagedKafka.Inputs.ConnectClusterGcpConfigAccessConfigArgs
                {
                    NetworkConfigs = new[]
                    {
                        new Gcp.ManagedKafka.Inputs.ConnectClusterGcpConfigAccessConfigNetworkConfigArgs
                        {
                            PrimarySubnet = project.ProjectId.Apply(projectId => $"projects/{projectId}/regions/us-central1/subnetworks/default"),
                            AdditionalSubnets = new[]
                            {
                                mkcSecondarySubnet.Id,
                            },
                            DnsDomainNames = new[]
                            {
                                Output.Tuple(gmkCluster.ClusterId, project.ProjectId).Apply(values =>
                                {
                                    var clusterId = values.Item1;
                                    var projectId = values.Item2;
                                    return $"{clusterId}.us-central1.managedkafka.{projectId}.cloud.goog";
                                }),
                            },
                        },
                    },
                },
            },
            Labels = 
            {
                { "key", "value" },
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                managedkafka,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.Project;
    import com.pulumi.gcp.organizations.ProjectArgs;
    import com.pulumi.time.sleep;
    import com.pulumi.time.sleepArgs;
    import com.pulumi.gcp.projects.Service;
    import com.pulumi.gcp.projects.ServiceArgs;
    import com.pulumi.gcp.compute.Subnetwork;
    import com.pulumi.gcp.compute.SubnetworkArgs;
    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.ConnectCluster;
    import com.pulumi.gcp.managedkafka.ConnectClusterArgs;
    import com.pulumi.gcp.managedkafka.inputs.ConnectClusterCapacityConfigArgs;
    import com.pulumi.gcp.managedkafka.inputs.ConnectClusterGcpConfigArgs;
    import com.pulumi.gcp.managedkafka.inputs.ConnectClusterGcpConfigAccessConfigArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 project = new Project("project", ProjectArgs.builder()
                .projectId("tf-test_91980")
                .name("tf-test_37118")
                .orgId("123456789")
                .billingAccount("000000-0000000-0000000-000000")
                .deletionPolicy("DELETE")
                .build());
    
            var wait60Seconds = new Sleep("wait60Seconds", SleepArgs.builder()
                .createDuration("60s")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(List.of(project))
                    .build());
    
            var compute = new Service("compute", ServiceArgs.builder()
                .project(project.projectId())
                .service("compute.googleapis.com")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(wait60Seconds)
                    .build());
    
            var managedkafka = new Service("managedkafka", ServiceArgs.builder()
                .project(project.projectId())
                .service("managedkafka.googleapis.com")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(compute)
                    .build());
    
            var wait120Seconds = new Sleep("wait120Seconds", SleepArgs.builder()
                .createDuration("120s")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(List.of(managedkafka))
                    .build());
    
            var mkcSecondarySubnet = new Subnetwork("mkcSecondarySubnet", SubnetworkArgs.builder()
                .project(project.projectId())
                .name("my-secondary-subnetwork")
                .ipCidrRange("10.3.0.0/16")
                .region("us-central1")
                .network("default")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(wait120Seconds)
                    .build());
    
            var gmkCluster = new Cluster("gmkCluster", ClusterArgs.builder()
                .project(project.projectId())
                .clusterId("my-cluster")
                .location("us-central1")
                .capacityConfig(ClusterCapacityConfigArgs.builder()
                    .vcpuCount("3")
                    .memoryBytes("3221225472")
                    .build())
                .gcpConfig(ClusterGcpConfigArgs.builder()
                    .accessConfig(ClusterGcpConfigAccessConfigArgs.builder()
                        .networkConfigs(ClusterGcpConfigAccessConfigNetworkConfigArgs.builder()
                            .subnet(project.projectId().applyValue(_projectId -> String.format("projects/%s/regions/us-central1/subnetworks/default", _projectId)))
                            .build())
                        .build())
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(managedkafka)
                    .build());
    
            var example = new ConnectCluster("example", ConnectClusterArgs.builder()
                .project(project.projectId())
                .connectClusterId("my-connect-cluster")
                .kafkaCluster(Output.tuple(project.projectId(), gmkCluster.clusterId()).applyValue(values -> {
                    var projectId = values.t1;
                    var clusterId = values.t2;
                    return String.format("projects/%s/locations/us-central1/clusters/%s", projectId,clusterId);
                }))
                .location("us-central1")
                .capacityConfig(ConnectClusterCapacityConfigArgs.builder()
                    .vcpuCount("12")
                    .memoryBytes("21474836480")
                    .build())
                .gcpConfig(ConnectClusterGcpConfigArgs.builder()
                    .accessConfig(ConnectClusterGcpConfigAccessConfigArgs.builder()
                        .networkConfigs(ConnectClusterGcpConfigAccessConfigNetworkConfigArgs.builder()
                            .primarySubnet(project.projectId().applyValue(_projectId -> String.format("projects/%s/regions/us-central1/subnetworks/default", _projectId)))
                            .additionalSubnets(mkcSecondarySubnet.id())
                            .dnsDomainNames(Output.tuple(gmkCluster.clusterId(), project.projectId()).applyValue(values -> {
                                var clusterId = values.t1;
                                var projectId = values.t2;
                                return String.format("%s.us-central1.managedkafka.%s.cloud.goog", clusterId,projectId);
                            }))
                            .build())
                        .build())
                    .build())
                .labels(Map.of("key", "value"))
                .build(), CustomResourceOptions.builder()
                    .dependsOn(managedkafka)
                    .build());
    
        }
    }
    
    resources:
      project:
        type: gcp:organizations:Project
        properties:
          projectId: tf-test_91980
          name: tf-test_37118
          orgId: '123456789'
          billingAccount: 000000-0000000-0000000-000000
          deletionPolicy: DELETE
      wait60Seconds:
        type: time:sleep
        name: wait_60_seconds
        properties:
          createDuration: 60s
        options:
          dependsOn:
            - ${project}
      compute:
        type: gcp:projects:Service
        properties:
          project: ${project.projectId}
          service: compute.googleapis.com
        options:
          dependsOn:
            - ${wait60Seconds}
      managedkafka:
        type: gcp:projects:Service
        properties:
          project: ${project.projectId}
          service: managedkafka.googleapis.com
        options:
          dependsOn:
            - ${compute}
      wait120Seconds:
        type: time:sleep
        name: wait_120_seconds
        properties:
          createDuration: 120s
        options:
          dependsOn:
            - ${managedkafka}
      mkcSecondarySubnet:
        type: gcp:compute:Subnetwork
        name: mkc_secondary_subnet
        properties:
          project: ${project.projectId}
          name: my-secondary-subnetwork
          ipCidrRange: 10.3.0.0/16
          region: us-central1
          network: default
        options:
          dependsOn:
            - ${wait120Seconds}
      gmkCluster:
        type: gcp:managedkafka:Cluster
        name: gmk_cluster
        properties:
          project: ${project.projectId}
          clusterId: my-cluster
          location: us-central1
          capacityConfig:
            vcpuCount: 3
            memoryBytes: 3.221225472e+09
          gcpConfig:
            accessConfig:
              networkConfigs:
                - subnet: projects/${project.projectId}/regions/us-central1/subnetworks/default
        options:
          dependsOn:
            - ${managedkafka}
      example:
        type: gcp:managedkafka:ConnectCluster
        properties:
          project: ${project.projectId}
          connectClusterId: my-connect-cluster
          kafkaCluster: projects/${project.projectId}/locations/us-central1/clusters/${gmkCluster.clusterId}
          location: us-central1
          capacityConfig:
            vcpuCount: 12
            memoryBytes: 2.147483648e+10
          gcpConfig:
            accessConfig:
              networkConfigs:
                - primarySubnet: projects/${project.projectId}/regions/us-central1/subnetworks/default
                  additionalSubnets:
                    - ${mkcSecondarySubnet.id}
                  dnsDomainNames:
                    - ${gmkCluster.clusterId}.us-central1.managedkafka.${project.projectId}.cloud.goog
          labels:
            key: value
        options:
          dependsOn:
            - ${managedkafka}
    

    Create ConnectCluster Resource

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

    Constructor syntax

    new ConnectCluster(name: string, args: ConnectClusterArgs, opts?: CustomResourceOptions);
    @overload
    def ConnectCluster(resource_name: str,
                       args: ConnectClusterArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConnectCluster(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       capacity_config: Optional[ConnectClusterCapacityConfigArgs] = None,
                       connect_cluster_id: Optional[str] = None,
                       gcp_config: Optional[ConnectClusterGcpConfigArgs] = None,
                       kafka_cluster: Optional[str] = None,
                       location: Optional[str] = None,
                       labels: Optional[Mapping[str, str]] = None,
                       project: Optional[str] = None)
    func NewConnectCluster(ctx *Context, name string, args ConnectClusterArgs, opts ...ResourceOption) (*ConnectCluster, error)
    public ConnectCluster(string name, ConnectClusterArgs args, CustomResourceOptions? opts = null)
    public ConnectCluster(String name, ConnectClusterArgs args)
    public ConnectCluster(String name, ConnectClusterArgs args, CustomResourceOptions options)
    
    type: gcp:managedkafka:ConnectCluster
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConnectClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConnectClusterArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConnectClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectClusterArgs
    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 connectClusterResource = new Gcp.ManagedKafka.ConnectCluster("connectClusterResource", new()
    {
        CapacityConfig = new Gcp.ManagedKafka.Inputs.ConnectClusterCapacityConfigArgs
        {
            MemoryBytes = "string",
            VcpuCount = "string",
        },
        ConnectClusterId = "string",
        GcpConfig = new Gcp.ManagedKafka.Inputs.ConnectClusterGcpConfigArgs
        {
            AccessConfig = new Gcp.ManagedKafka.Inputs.ConnectClusterGcpConfigAccessConfigArgs
            {
                NetworkConfigs = new[]
                {
                    new Gcp.ManagedKafka.Inputs.ConnectClusterGcpConfigAccessConfigNetworkConfigArgs
                    {
                        PrimarySubnet = "string",
                        AdditionalSubnets = new[]
                        {
                            "string",
                        },
                        DnsDomainNames = new[]
                        {
                            "string",
                        },
                    },
                },
            },
        },
        KafkaCluster = "string",
        Location = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Project = "string",
    });
    
    example, err := managedkafka.NewConnectCluster(ctx, "connectClusterResource", &managedkafka.ConnectClusterArgs{
    	CapacityConfig: &managedkafka.ConnectClusterCapacityConfigArgs{
    		MemoryBytes: pulumi.String("string"),
    		VcpuCount:   pulumi.String("string"),
    	},
    	ConnectClusterId: pulumi.String("string"),
    	GcpConfig: &managedkafka.ConnectClusterGcpConfigArgs{
    		AccessConfig: &managedkafka.ConnectClusterGcpConfigAccessConfigArgs{
    			NetworkConfigs: managedkafka.ConnectClusterGcpConfigAccessConfigNetworkConfigArray{
    				&managedkafka.ConnectClusterGcpConfigAccessConfigNetworkConfigArgs{
    					PrimarySubnet: pulumi.String("string"),
    					AdditionalSubnets: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					DnsDomainNames: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    		},
    	},
    	KafkaCluster: pulumi.String("string"),
    	Location:     pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Project: pulumi.String("string"),
    })
    
    var connectClusterResource = new ConnectCluster("connectClusterResource", ConnectClusterArgs.builder()
        .capacityConfig(ConnectClusterCapacityConfigArgs.builder()
            .memoryBytes("string")
            .vcpuCount("string")
            .build())
        .connectClusterId("string")
        .gcpConfig(ConnectClusterGcpConfigArgs.builder()
            .accessConfig(ConnectClusterGcpConfigAccessConfigArgs.builder()
                .networkConfigs(ConnectClusterGcpConfigAccessConfigNetworkConfigArgs.builder()
                    .primarySubnet("string")
                    .additionalSubnets("string")
                    .dnsDomainNames("string")
                    .build())
                .build())
            .build())
        .kafkaCluster("string")
        .location("string")
        .labels(Map.of("string", "string"))
        .project("string")
        .build());
    
    connect_cluster_resource = gcp.managedkafka.ConnectCluster("connectClusterResource",
        capacity_config={
            "memory_bytes": "string",
            "vcpu_count": "string",
        },
        connect_cluster_id="string",
        gcp_config={
            "access_config": {
                "network_configs": [{
                    "primary_subnet": "string",
                    "additional_subnets": ["string"],
                    "dns_domain_names": ["string"],
                }],
            },
        },
        kafka_cluster="string",
        location="string",
        labels={
            "string": "string",
        },
        project="string")
    
    const connectClusterResource = new gcp.managedkafka.ConnectCluster("connectClusterResource", {
        capacityConfig: {
            memoryBytes: "string",
            vcpuCount: "string",
        },
        connectClusterId: "string",
        gcpConfig: {
            accessConfig: {
                networkConfigs: [{
                    primarySubnet: "string",
                    additionalSubnets: ["string"],
                    dnsDomainNames: ["string"],
                }],
            },
        },
        kafkaCluster: "string",
        location: "string",
        labels: {
            string: "string",
        },
        project: "string",
    });
    
    type: gcp:managedkafka:ConnectCluster
    properties:
        capacityConfig:
            memoryBytes: string
            vcpuCount: string
        connectClusterId: string
        gcpConfig:
            accessConfig:
                networkConfigs:
                    - additionalSubnets:
                        - string
                      dnsDomainNames:
                        - string
                      primarySubnet: string
        kafkaCluster: string
        labels:
            string: string
        location: string
        project: string
    

    ConnectCluster 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 ConnectCluster resource accepts the following input properties:

    CapacityConfig ConnectClusterCapacityConfig
    A capacity configuration of a Kafka cluster. Structure is documented below.
    ConnectClusterId string
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-cluster-id.
    GcpConfig ConnectClusterGcpConfig
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    KafkaCluster string
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    Location string
    ID of the location of the Kafka Connect 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 string
    CapacityConfig ConnectClusterCapacityConfigArgs
    A capacity configuration of a Kafka cluster. Structure is documented below.
    ConnectClusterId string
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-cluster-id.
    GcpConfig ConnectClusterGcpConfigArgs
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    KafkaCluster string
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    Location string
    ID of the location of the Kafka Connect 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 string
    capacityConfig ConnectClusterCapacityConfig
    A capacity configuration of a Kafka cluster. Structure is documented below.
    connectClusterId String
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-cluster-id.
    gcpConfig ConnectClusterGcpConfig
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    kafkaCluster String
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    location String
    ID of the location of the Kafka Connect 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 String
    capacityConfig ConnectClusterCapacityConfig
    A capacity configuration of a Kafka cluster. Structure is documented below.
    connectClusterId string
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-cluster-id.
    gcpConfig ConnectClusterGcpConfig
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    kafkaCluster string
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    location string
    ID of the location of the Kafka Connect 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 string
    capacity_config ConnectClusterCapacityConfigArgs
    A capacity configuration of a Kafka cluster. Structure is documented below.
    connect_cluster_id str
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-cluster-id.
    gcp_config ConnectClusterGcpConfigArgs
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    kafka_cluster str
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    location str
    ID of the location of the Kafka Connect 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 str
    capacityConfig Property Map
    A capacity configuration of a Kafka cluster. Structure is documented below.
    connectClusterId String
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-cluster-id.
    gcpConfig Property Map
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    kafkaCluster String
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    location String
    ID of the location of the Kafka Connect 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 String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ConnectCluster 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 connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_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 connect 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 connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_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 connect 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 connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_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 connect 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 connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_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 connect 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 connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_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 connect 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 connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_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 connect cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
    updateTime String
    The time when the cluster was last updated.

    Look up Existing ConnectCluster Resource

    Get an existing ConnectCluster 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?: ConnectClusterState, opts?: CustomResourceOptions): ConnectCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            capacity_config: Optional[ConnectClusterCapacityConfigArgs] = None,
            connect_cluster_id: Optional[str] = None,
            create_time: Optional[str] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            gcp_config: Optional[ConnectClusterGcpConfigArgs] = None,
            kafka_cluster: Optional[str] = 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,
            state: Optional[str] = None,
            update_time: Optional[str] = None) -> ConnectCluster
    func GetConnectCluster(ctx *Context, name string, id IDInput, state *ConnectClusterState, opts ...ResourceOption) (*ConnectCluster, error)
    public static ConnectCluster Get(string name, Input<string> id, ConnectClusterState? state, CustomResourceOptions? opts = null)
    public static ConnectCluster get(String name, Output<String> id, ConnectClusterState state, CustomResourceOptions options)
    resources:  _:    type: gcp:managedkafka:ConnectCluster    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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 ConnectClusterCapacityConfig
    A capacity configuration of a Kafka cluster. Structure is documented below.
    ConnectClusterId string
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-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 ConnectClusterGcpConfig
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    KafkaCluster string
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    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 string
    ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
    Name string
    The name of the connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER_ID.
    Project string
    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 connect cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
    UpdateTime string
    The time when the cluster was last updated.
    CapacityConfig ConnectClusterCapacityConfigArgs
    A capacity configuration of a Kafka cluster. Structure is documented below.
    ConnectClusterId string
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-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 ConnectClusterGcpConfigArgs
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    KafkaCluster string
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    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 string
    ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
    Name string
    The name of the connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER_ID.
    Project string
    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 connect cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
    UpdateTime string
    The time when the cluster was last updated.
    capacityConfig ConnectClusterCapacityConfig
    A capacity configuration of a Kafka cluster. Structure is documented below.
    connectClusterId String
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-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 ConnectClusterGcpConfig
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    kafkaCluster String
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    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 String
    ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
    name String
    The name of the connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER_ID.
    project String
    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 connect cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
    updateTime String
    The time when the cluster was last updated.
    capacityConfig ConnectClusterCapacityConfig
    A capacity configuration of a Kafka cluster. Structure is documented below.
    connectClusterId string
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-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 ConnectClusterGcpConfig
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    kafkaCluster string
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    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 string
    ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
    name string
    The name of the connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER_ID.
    project string
    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 connect cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
    updateTime string
    The time when the cluster was last updated.
    capacity_config ConnectClusterCapacityConfigArgs
    A capacity configuration of a Kafka cluster. Structure is documented below.
    connect_cluster_id str
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-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 ConnectClusterGcpConfigArgs
    Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    kafka_cluster str
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    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 str
    ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
    name str
    The name of the connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER_ID.
    project str
    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 connect 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.
    connectClusterId String
    The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: my-connect-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 Connect cluster deployed to Google Cloud Platform. Structure is documented below.
    kafkaCluster String
    The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID.
    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 String
    ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
    name String
    The name of the connect cluster. Structured like: projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER_ID.
    project String
    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 connect cluster. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING.
    updateTime String
    The time when the cluster was last updated.

    Supporting Types

    ConnectClusterCapacityConfig, ConnectClusterCapacityConfigArgs

    MemoryBytes string
    The memory to provision for the cluster in bytes. The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. Minimum: 3221225472 (3 GiB).
    VcpuCount string
    The number of vCPUs to provision for the cluster. The minimum is 3.
    MemoryBytes string
    The memory to provision for the cluster in bytes. The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. Minimum: 3221225472 (3 GiB).
    VcpuCount string
    The number of vCPUs to provision for the cluster. The minimum is 3.
    memoryBytes String
    The memory to provision for the cluster in bytes. The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. Minimum: 3221225472 (3 GiB).
    vcpuCount String
    The number of vCPUs to provision for the cluster. The minimum is 3.
    memoryBytes string
    The memory to provision for the cluster in bytes. The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. Minimum: 3221225472 (3 GiB).
    vcpuCount string
    The number of vCPUs to provision for the cluster. The minimum is 3.
    memory_bytes str
    The memory to provision for the cluster in bytes. The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. Minimum: 3221225472 (3 GiB).
    vcpu_count str
    The number of vCPUs to provision for the cluster. The minimum is 3.
    memoryBytes String
    The memory to provision for the cluster in bytes. The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. Minimum: 3221225472 (3 GiB).
    vcpuCount String
    The number of vCPUs to provision for the cluster. The minimum is 3.

    ConnectClusterGcpConfig, ConnectClusterGcpConfigArgs

    AccessConfig ConnectClusterGcpConfigAccessConfig
    The configuration of access to the Kafka Connect cluster. Structure is documented below.
    AccessConfig ConnectClusterGcpConfigAccessConfig
    The configuration of access to the Kafka Connect cluster. Structure is documented below.
    accessConfig ConnectClusterGcpConfigAccessConfig
    The configuration of access to the Kafka Connect cluster. Structure is documented below.
    accessConfig ConnectClusterGcpConfigAccessConfig
    The configuration of access to the Kafka Connect cluster. Structure is documented below.
    access_config ConnectClusterGcpConfigAccessConfig
    The configuration of access to the Kafka Connect cluster. Structure is documented below.
    accessConfig Property Map
    The configuration of access to the Kafka Connect cluster. Structure is documented below.

    ConnectClusterGcpConfigAccessConfig, ConnectClusterGcpConfigAccessConfigArgs

    NetworkConfigs List<ConnectClusterGcpConfigAccessConfigNetworkConfig>
    Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka Connect cluster are allocated. To make the connect 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 []ConnectClusterGcpConfigAccessConfigNetworkConfig
    Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka Connect cluster are allocated. To make the connect 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 List<ConnectClusterGcpConfigAccessConfigNetworkConfig>
    Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka Connect cluster are allocated. To make the connect 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 ConnectClusterGcpConfigAccessConfigNetworkConfig[]
    Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka Connect cluster are allocated. To make the connect 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 Sequence[ConnectClusterGcpConfigAccessConfigNetworkConfig]
    Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka Connect cluster are allocated. To make the connect 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 List<Property Map>
    Virtual Private Cloud (VPC) subnets where IP addresses for the Kafka Connect cluster are allocated. To make the connect 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.

    ConnectClusterGcpConfigAccessConfigNetworkConfig, ConnectClusterGcpConfigAccessConfigNetworkConfigArgs

    PrimarySubnet string
    VPC subnet to make available to the Kafka Connect cluster. Structured like: projects/{project}/regions/{region}/subnetworks/{subnet_id}. It is used to create a Private Service Connect (PSC) interface for the Kafka Connect workers. It must be located in the same region as the Kafka Connect cluster. The CIDR range of the subnet must be within the IPv4 address ranges for private networks, as specified in RFC 1918. The primary subnet CIDR range must have a minimum size of /22 (1024 addresses).
    AdditionalSubnets List<string>
    Additional subnets may be specified. They may be in another region, but must be in the same VPC network. The Connect workers can communicate with network endpoints in either the primary or additional subnets.
    DnsDomainNames List<string>
    Additional DNS domain names from the subnet's network to be made visible to the Connect Cluster. When using MirrorMaker2, it's necessary to add the bootstrap address's dns domain name of the target cluster to make it visible to the connector. For example: my-kafka-cluster.us-central1.managedkafka.my-project.cloud.goog


    PrimarySubnet string
    VPC subnet to make available to the Kafka Connect cluster. Structured like: projects/{project}/regions/{region}/subnetworks/{subnet_id}. It is used to create a Private Service Connect (PSC) interface for the Kafka Connect workers. It must be located in the same region as the Kafka Connect cluster. The CIDR range of the subnet must be within the IPv4 address ranges for private networks, as specified in RFC 1918. The primary subnet CIDR range must have a minimum size of /22 (1024 addresses).
    AdditionalSubnets []string
    Additional subnets may be specified. They may be in another region, but must be in the same VPC network. The Connect workers can communicate with network endpoints in either the primary or additional subnets.
    DnsDomainNames []string
    Additional DNS domain names from the subnet's network to be made visible to the Connect Cluster. When using MirrorMaker2, it's necessary to add the bootstrap address's dns domain name of the target cluster to make it visible to the connector. For example: my-kafka-cluster.us-central1.managedkafka.my-project.cloud.goog


    primarySubnet String
    VPC subnet to make available to the Kafka Connect cluster. Structured like: projects/{project}/regions/{region}/subnetworks/{subnet_id}. It is used to create a Private Service Connect (PSC) interface for the Kafka Connect workers. It must be located in the same region as the Kafka Connect cluster. The CIDR range of the subnet must be within the IPv4 address ranges for private networks, as specified in RFC 1918. The primary subnet CIDR range must have a minimum size of /22 (1024 addresses).
    additionalSubnets List<String>
    Additional subnets may be specified. They may be in another region, but must be in the same VPC network. The Connect workers can communicate with network endpoints in either the primary or additional subnets.
    dnsDomainNames List<String>
    Additional DNS domain names from the subnet's network to be made visible to the Connect Cluster. When using MirrorMaker2, it's necessary to add the bootstrap address's dns domain name of the target cluster to make it visible to the connector. For example: my-kafka-cluster.us-central1.managedkafka.my-project.cloud.goog


    primarySubnet string
    VPC subnet to make available to the Kafka Connect cluster. Structured like: projects/{project}/regions/{region}/subnetworks/{subnet_id}. It is used to create a Private Service Connect (PSC) interface for the Kafka Connect workers. It must be located in the same region as the Kafka Connect cluster. The CIDR range of the subnet must be within the IPv4 address ranges for private networks, as specified in RFC 1918. The primary subnet CIDR range must have a minimum size of /22 (1024 addresses).
    additionalSubnets string[]
    Additional subnets may be specified. They may be in another region, but must be in the same VPC network. The Connect workers can communicate with network endpoints in either the primary or additional subnets.
    dnsDomainNames string[]
    Additional DNS domain names from the subnet's network to be made visible to the Connect Cluster. When using MirrorMaker2, it's necessary to add the bootstrap address's dns domain name of the target cluster to make it visible to the connector. For example: my-kafka-cluster.us-central1.managedkafka.my-project.cloud.goog


    primary_subnet str
    VPC subnet to make available to the Kafka Connect cluster. Structured like: projects/{project}/regions/{region}/subnetworks/{subnet_id}. It is used to create a Private Service Connect (PSC) interface for the Kafka Connect workers. It must be located in the same region as the Kafka Connect cluster. The CIDR range of the subnet must be within the IPv4 address ranges for private networks, as specified in RFC 1918. The primary subnet CIDR range must have a minimum size of /22 (1024 addresses).
    additional_subnets Sequence[str]
    Additional subnets may be specified. They may be in another region, but must be in the same VPC network. The Connect workers can communicate with network endpoints in either the primary or additional subnets.
    dns_domain_names Sequence[str]
    Additional DNS domain names from the subnet's network to be made visible to the Connect Cluster. When using MirrorMaker2, it's necessary to add the bootstrap address's dns domain name of the target cluster to make it visible to the connector. For example: my-kafka-cluster.us-central1.managedkafka.my-project.cloud.goog


    primarySubnet String
    VPC subnet to make available to the Kafka Connect cluster. Structured like: projects/{project}/regions/{region}/subnetworks/{subnet_id}. It is used to create a Private Service Connect (PSC) interface for the Kafka Connect workers. It must be located in the same region as the Kafka Connect cluster. The CIDR range of the subnet must be within the IPv4 address ranges for private networks, as specified in RFC 1918. The primary subnet CIDR range must have a minimum size of /22 (1024 addresses).
    additionalSubnets List<String>
    Additional subnets may be specified. They may be in another region, but must be in the same VPC network. The Connect workers can communicate with network endpoints in either the primary or additional subnets.
    dnsDomainNames List<String>
    Additional DNS domain names from the subnet's network to be made visible to the Connect Cluster. When using MirrorMaker2, it's necessary to add the bootstrap address's dns domain name of the target cluster to make it visible to the connector. For example: my-kafka-cluster.us-central1.managedkafka.my-project.cloud.goog


    Import

    ConnectCluster can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{location}}/connectClusters/{{connect_cluster_id}}

    • {{project}}/{{location}}/{{connect_cluster_id}}

    • {{location}}/{{connect_cluster_id}}

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

    $ pulumi import gcp:managedkafka/connectCluster:ConnectCluster default projects/{{project}}/locations/{{location}}/connectClusters/{{connect_cluster_id}}
    
    $ pulumi import gcp:managedkafka/connectCluster:ConnectCluster default {{project}}/{{location}}/{{connect_cluster_id}}
    
    $ pulumi import gcp:managedkafka/connectCluster:ConnectCluster default {{location}}/{{connect_cluster_id}}
    

    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.
    gcp logo
    Google Cloud v8.28.0 published on Tuesday, Apr 29, 2025 by Pulumi