1. Packages
  2. Packages
  3. Redpanda Provider
  4. API Docs
  5. getServerlessCluster
Viewing docs for redpanda 2.1.0
published on Wednesday, Jun 24, 2026 by redpanda-data
Viewing docs for redpanda 2.1.0
published on Wednesday, Jun 24, 2026 by redpanda-data

    Data source for a Redpanda Cloud serverless cluster

    Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as redpanda from "@pulumi/redpanda";
    
    const example = redpanda.getServerlessCluster({
        id: "serverless_cluster_id",
    });
    
    import pulumi
    import pulumi_redpanda as redpanda
    
    example = redpanda.get_serverless_cluster(id="serverless_cluster_id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/redpanda/v2/redpanda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redpanda.LookupServerlessCluster(ctx, &redpanda.LookupServerlessClusterArgs{
    			Id: "serverless_cluster_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Redpanda = Pulumi.Redpanda;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Redpanda.GetServerlessCluster.Invoke(new()
        {
            Id = "serverless_cluster_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.redpanda.RedpandaFunctions;
    import com.pulumi.redpanda.inputs.GetServerlessClusterArgs;
    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 example = RedpandaFunctions.getServerlessCluster(GetServerlessClusterArgs.builder()
                .id("serverless_cluster_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: redpanda:getServerlessCluster
          arguments:
            id: serverless_cluster_id
    
    Example coming soon!
    

    Example Usage to create a serverless cluster

    import * as pulumi from "@pulumi/pulumi";
    import * as redpanda from "@pulumi/redpanda";
    
    const test = new redpanda.ResourceGroup("test", {name: resourceGroupName});
    const testServerlessPrivateLink: redpanda.ServerlessPrivateLink[] = [];
    for (const range = {value: 0}; range.value < (privateNetworking == "STATE_ENABLED" ? 1 : 0); range.value++) {
        testServerlessPrivateLink.push(new redpanda.ServerlessPrivateLink(`test-${range.value}`, {
            name: `${clusterName}-private-link`,
            resourceGroupId: test.id,
            cloudProvider: "aws",
            serverlessRegion: region,
            allowDeletion: allowPrivateLinkDeletion,
            awsConfig: {
                allowedPrincipals: allowedPrincipals,
            },
        }));
    }
    const testServerlessCluster = new redpanda.ServerlessCluster("test", {
        name: clusterName,
        resourceGroupId: test.id,
        serverlessRegion: region,
        allowDeletion: clusterAllowDeletion,
        privateLinkId: privateNetworking == "STATE_ENABLED" ? testServerlessPrivateLink[0].id : null,
        networkingConfig: {
            "public": publicNetworking,
            "private": privateNetworking,
        },
    });
    const testTopic = new redpanda.Topic("test", {
        name: topicName,
        partitionCount: partitionCount,
        replicationFactor: replicationFactor,
        clusterApiUrl: testServerlessCluster.clusterApiUrl,
        allowDeletion: true,
    });
    const testUser = new redpanda.User("test", {
        name: userName,
        password: userPw,
        mechanism: mechanism,
        clusterApiUrl: testServerlessCluster.clusterApiUrl,
        allowDeletion: userAllowDeletion,
    });
    // Schema Registry against a serverless cluster keys off cluster_id (control
    // plane), not cluster_api_url; cluster_id resolves the SR endpoint via the
    // ServerlessClusterService fallback in GetSchemaRegistryClientForCluster.
    // Both redpanda_schema_registry_acl and redpanda_schema route through it.
    const providerBootstrapSubject = new redpanda.SchemaRegistryAcl("provider_bootstrap_subject", {
        clusterId: testServerlessCluster.id,
        principal: "User:*",
        resourceType: "SUBJECT",
        resourceName: resourceGroupName,
        patternType: "PREFIXED",
        host: "*",
        operation: "ALL",
        permission: "ALLOW",
        allowDeletion: true,
    });
    const providerBootstrapRegistry = new redpanda.SchemaRegistryAcl("provider_bootstrap_registry", {
        clusterId: testServerlessCluster.id,
        principal: "User:*",
        resourceType: "REGISTRY",
        resourceName: "*",
        patternType: "LITERAL",
        host: "*",
        operation: "ALL",
        permission: "ALLOW",
        allowDeletion: true,
    });
    const userSchema = new redpanda.Schema("user_schema", {
        clusterId: testServerlessCluster.id,
        subject: `${resourceGroupName}-value`,
        schemaType: "AVRO",
        compatibility: "BACKWARD",
        allowDeletion: true,
        schema: JSON.stringify({
            type: "record",
            name: "User",
            fields: [
                {
                    name: "id",
                    type: "long",
                },
                {
                    name: "name",
                    type: "string",
                },
            ],
        }),
    }, {
        dependsOn: [
            providerBootstrapSubject,
            providerBootstrapRegistry,
        ],
    });
    
    import pulumi
    import json
    import pulumi_redpanda as redpanda
    
    test = redpanda.ResourceGroup("test", name=resource_group_name)
    test_serverless_private_link = []
    for range in [{"value": i} for i in range(0, 1 if private_networking == STATE_ENABLED else 0)]:
        test_serverless_private_link.append(redpanda.ServerlessPrivateLink(f"test-{range['value']}",
            name=f"{cluster_name}-private-link",
            resource_group_id=test.id,
            cloud_provider="aws",
            serverless_region=region,
            allow_deletion=allow_private_link_deletion,
            aws_config={
                "allowed_principals": allowed_principals,
            }))
    test_serverless_cluster = redpanda.ServerlessCluster("test",
        name=cluster_name,
        resource_group_id=test.id,
        serverless_region=region,
        allow_deletion=cluster_allow_deletion,
        private_link_id=test_serverless_private_link[0].id if private_networking == "STATE_ENABLED" else None,
        networking_config={
            "public": public_networking,
            "private": private_networking,
        })
    test_topic = redpanda.Topic("test",
        name=topic_name,
        partition_count=partition_count,
        replication_factor=replication_factor,
        cluster_api_url=test_serverless_cluster.cluster_api_url,
        allow_deletion=True)
    test_user = redpanda.User("test",
        name=user_name,
        password=user_pw,
        mechanism=mechanism,
        cluster_api_url=test_serverless_cluster.cluster_api_url,
        allow_deletion=user_allow_deletion)
    # Schema Registry against a serverless cluster keys off cluster_id (control
    # plane), not cluster_api_url; cluster_id resolves the SR endpoint via the
    # ServerlessClusterService fallback in GetSchemaRegistryClientForCluster.
    # Both redpanda_schema_registry_acl and redpanda_schema route through it.
    provider_bootstrap_subject = redpanda.SchemaRegistryAcl("provider_bootstrap_subject",
        cluster_id=test_serverless_cluster.id,
        principal="User:*",
        resource_type="SUBJECT",
        resource_name_=resource_group_name,
        pattern_type="PREFIXED",
        host="*",
        operation="ALL",
        permission="ALLOW",
        allow_deletion=True)
    provider_bootstrap_registry = redpanda.SchemaRegistryAcl("provider_bootstrap_registry",
        cluster_id=test_serverless_cluster.id,
        principal="User:*",
        resource_type="REGISTRY",
        resource_name_="*",
        pattern_type="LITERAL",
        host="*",
        operation="ALL",
        permission="ALLOW",
        allow_deletion=True)
    user_schema = redpanda.Schema("user_schema",
        cluster_id=test_serverless_cluster.id,
        subject=f"{resource_group_name}-value",
        schema_type="AVRO",
        compatibility="BACKWARD",
        allow_deletion=True,
        schema=json.dumps({
            "type": "record",
            "name": "User",
            "fields": [
                {
                    "name": "id",
                    "type": "long",
                },
                {
                    "name": "name",
                    "type": "string",
                },
            ],
        }),
        opts = pulumi.ResourceOptions(depends_on=[
                provider_bootstrap_subject,
                provider_bootstrap_registry,
            ]))
    
    package main
    
    import (
    	"encoding/json"
    	"fmt"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/redpanda/v2/redpanda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := redpanda.NewResourceGroup(ctx, "test", &redpanda.ResourceGroupArgs{
    			Name: pulumi.Any(resourceGroupName),
    		})
    		if err != nil {
    			return err
    		}
    		var tmp0 float64
    		if privateNetworking == "STATE_ENABLED" {
    			tmp0 = 1
    		} else {
    			tmp0 = 0
    		}
    		var testServerlessPrivateLink []*redpanda.ServerlessPrivateLink
    		for index := 0; index < tmp0; index++ {
    			key0 := index
    			_ := index
    			__res, err := redpanda.NewServerlessPrivateLink(ctx, fmt.Sprintf("test-%v", key0), &redpanda.ServerlessPrivateLinkArgs{
    				Name:             pulumi.Sprintf("%v-private-link", clusterName),
    				ResourceGroupId:  test.ID(),
    				CloudProvider:    pulumi.String("aws"),
    				ServerlessRegion: pulumi.Any(region),
    				AllowDeletion:    pulumi.Any(allowPrivateLinkDeletion),
    				AwsConfig: &redpanda.ServerlessPrivateLinkAwsConfigArgs{
    					AllowedPrincipals: pulumi.Any(allowedPrincipals),
    				},
    			})
    			if err != nil {
    				return err
    			}
    			testServerlessPrivateLink = append(testServerlessPrivateLink, __res)
    		}
    		var tmp1 pulumi.String
    		if privateNetworking == "STATE_ENABLED" {
    			tmp1 = testServerlessPrivateLink[0].ID()
    		} else {
    			tmp1 = nil
    		}
    		testServerlessCluster, err := redpanda.NewServerlessCluster(ctx, "test", &redpanda.ServerlessClusterArgs{
    			Name:             pulumi.Any(clusterName),
    			ResourceGroupId:  test.ID(),
    			ServerlessRegion: pulumi.Any(region),
    			AllowDeletion:    pulumi.Any(clusterAllowDeletion),
    			PrivateLinkId:    pulumi.String(tmp1),
    			NetworkingConfig: &redpanda.ServerlessClusterNetworkingConfigArgs{
    				Public:  pulumi.Any(publicNetworking),
    				Private: pulumi.Any(privateNetworking),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = redpanda.NewTopic(ctx, "test", &redpanda.TopicArgs{
    			Name:              pulumi.Any(topicName),
    			PartitionCount:    pulumi.Any(partitionCount),
    			ReplicationFactor: pulumi.Any(replicationFactor),
    			ClusterApiUrl:     testServerlessCluster.ClusterApiUrl,
    			AllowDeletion:     pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = redpanda.NewUser(ctx, "test", &redpanda.UserArgs{
    			Name:          pulumi.Any(userName),
    			Password:      pulumi.Any(userPw),
    			Mechanism:     pulumi.Any(mechanism),
    			ClusterApiUrl: testServerlessCluster.ClusterApiUrl,
    			AllowDeletion: pulumi.Any(userAllowDeletion),
    		})
    		if err != nil {
    			return err
    		}
    		// Schema Registry against a serverless cluster keys off cluster_id (control
    		// plane), not cluster_api_url; cluster_id resolves the SR endpoint via the
    		// ServerlessClusterService fallback in GetSchemaRegistryClientForCluster.
    		// Both redpanda_schema_registry_acl and redpanda_schema route through it.
    		providerBootstrapSubject, err := redpanda.NewSchemaRegistryAcl(ctx, "provider_bootstrap_subject", &redpanda.SchemaRegistryAclArgs{
    			ClusterId:     testServerlessCluster.ID(),
    			Principal:     pulumi.String("User:*"),
    			ResourceType:  pulumi.String("SUBJECT"),
    			ResourceName:  pulumi.Any(resourceGroupName),
    			PatternType:   pulumi.String("PREFIXED"),
    			Host:          pulumi.String("*"),
    			Operation:     pulumi.String("ALL"),
    			Permission:    pulumi.String("ALLOW"),
    			AllowDeletion: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		providerBootstrapRegistry, err := redpanda.NewSchemaRegistryAcl(ctx, "provider_bootstrap_registry", &redpanda.SchemaRegistryAclArgs{
    			ClusterId:     testServerlessCluster.ID(),
    			Principal:     pulumi.String("User:*"),
    			ResourceType:  pulumi.String("REGISTRY"),
    			ResourceName:  pulumi.String("*"),
    			PatternType:   pulumi.String("LITERAL"),
    			Host:          pulumi.String("*"),
    			Operation:     pulumi.String("ALL"),
    			Permission:    pulumi.String("ALLOW"),
    			AllowDeletion: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"type": "record",
    			"name": "User",
    			"fields": []map[string]interface{}{
    				map[string]interface{}{
    					"name": "id",
    					"type": "long",
    				},
    				map[string]interface{}{
    					"name": "name",
    					"type": "string",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = redpanda.NewSchema(ctx, "user_schema", &redpanda.SchemaArgs{
    			ClusterId:     testServerlessCluster.ID(),
    			Subject:       pulumi.Sprintf("%v-value", resourceGroupName),
    			SchemaType:    pulumi.String("AVRO"),
    			Compatibility: pulumi.String("BACKWARD"),
    			AllowDeletion: pulumi.Bool(true),
    			Schema:        pulumi.String(json0),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			providerBootstrapSubject,
    			providerBootstrapRegistry,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Redpanda = Pulumi.Redpanda;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Redpanda.ResourceGroup("test", new()
        {
            Name = resourceGroupName,
        });
    
        var testServerlessPrivateLink = new List<Redpanda.ServerlessPrivateLink>();
        for (var rangeIndex = 0; rangeIndex < (privateNetworking == "STATE_ENABLED" ? 1 : 0); rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            testServerlessPrivateLink.Add(new Redpanda.ServerlessPrivateLink($"test-{range.Value}", new()
            {
                Name = $"{clusterName}-private-link",
                ResourceGroupId = test.Id,
                CloudProvider = "aws",
                ServerlessRegion = region,
                AllowDeletion = allowPrivateLinkDeletion,
                AwsConfig = new Redpanda.Inputs.ServerlessPrivateLinkAwsConfigArgs
                {
                    AllowedPrincipals = allowedPrincipals,
                },
            }));
        }
        var testServerlessCluster = new Redpanda.ServerlessCluster("test", new()
        {
            Name = clusterName,
            ResourceGroupId = test.Id,
            ServerlessRegion = region,
            AllowDeletion = clusterAllowDeletion,
            PrivateLinkId = privateNetworking == "STATE_ENABLED" ? testServerlessPrivateLink[0].Id : null,
            NetworkingConfig = new Redpanda.Inputs.ServerlessClusterNetworkingConfigArgs
            {
                Public = publicNetworking,
                Private = privateNetworking,
            },
        });
    
        var testTopic = new Redpanda.Topic("test", new()
        {
            Name = topicName,
            PartitionCount = partitionCount,
            ReplicationFactor = replicationFactor,
            ClusterApiUrl = testServerlessCluster.ClusterApiUrl,
            AllowDeletion = true,
        });
    
        var testUser = new Redpanda.User("test", new()
        {
            Name = userName,
            Password = userPw,
            Mechanism = mechanism,
            ClusterApiUrl = testServerlessCluster.ClusterApiUrl,
            AllowDeletion = userAllowDeletion,
        });
    
        // Schema Registry against a serverless cluster keys off cluster_id (control
        // plane), not cluster_api_url; cluster_id resolves the SR endpoint via the
        // ServerlessClusterService fallback in GetSchemaRegistryClientForCluster.
        // Both redpanda_schema_registry_acl and redpanda_schema route through it.
        var providerBootstrapSubject = new Redpanda.SchemaRegistryAcl("provider_bootstrap_subject", new()
        {
            ClusterId = testServerlessCluster.Id,
            Principal = "User:*",
            ResourceType = "SUBJECT",
            ResourceName = resourceGroupName,
            PatternType = "PREFIXED",
            Host = "*",
            Operation = "ALL",
            Permission = "ALLOW",
            AllowDeletion = true,
        });
    
        var providerBootstrapRegistry = new Redpanda.SchemaRegistryAcl("provider_bootstrap_registry", new()
        {
            ClusterId = testServerlessCluster.Id,
            Principal = "User:*",
            ResourceType = "REGISTRY",
            ResourceName = "*",
            PatternType = "LITERAL",
            Host = "*",
            Operation = "ALL",
            Permission = "ALLOW",
            AllowDeletion = true,
        });
    
        var userSchema = new Redpanda.Schema("user_schema", new()
        {
            ClusterId = testServerlessCluster.Id,
            Subject = $"{resourceGroupName}-value",
            SchemaType = "AVRO",
            Compatibility = "BACKWARD",
            AllowDeletion = true,
            Schema = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["type"] = "record",
                ["name"] = "User",
                ["fields"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["name"] = "id",
                        ["type"] = "long",
                    },
                    new Dictionary<string, object?>
                    {
                        ["name"] = "name",
                        ["type"] = "string",
                    },
                },
            }),
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                providerBootstrapSubject,
                providerBootstrapRegistry,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.redpanda.ResourceGroup;
    import com.pulumi.redpanda.ResourceGroupArgs;
    import com.pulumi.redpanda.ServerlessPrivateLink;
    import com.pulumi.redpanda.ServerlessPrivateLinkArgs;
    import com.pulumi.redpanda.inputs.ServerlessPrivateLinkAwsConfigArgs;
    import com.pulumi.redpanda.ServerlessCluster;
    import com.pulumi.redpanda.ServerlessClusterArgs;
    import com.pulumi.redpanda.inputs.ServerlessClusterNetworkingConfigArgs;
    import com.pulumi.redpanda.Topic;
    import com.pulumi.redpanda.TopicArgs;
    import com.pulumi.redpanda.User;
    import com.pulumi.redpanda.UserArgs;
    import com.pulumi.redpanda.SchemaRegistryAcl;
    import com.pulumi.redpanda.SchemaRegistryAclArgs;
    import com.pulumi.redpanda.Schema;
    import com.pulumi.redpanda.SchemaArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import com.pulumi.codegen.internal.KeyedValue;
    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 test = new ResourceGroup("test", ResourceGroupArgs.builder()
                .name(resourceGroupName)
                .build());
    
            for (var i = 0; i < (privateNetworking == "STATE_ENABLED" ? 1 : 0); i++) {
                new ServerlessPrivateLink("testServerlessPrivateLink-" + i, ServerlessPrivateLinkArgs.builder()
                    .name(String.format("%s-private-link", clusterName))
                    .resourceGroupId(test.id())
                    .cloudProvider("aws")
                    .serverlessRegion(region)
                    .allowDeletion(allowPrivateLinkDeletion)
                    .awsConfig(ServerlessPrivateLinkAwsConfigArgs.builder()
                        .allowedPrincipals(allowedPrincipals)
                        .build())
                    .build());
    
            
    }
            var testServerlessCluster = new ServerlessCluster("testServerlessCluster", ServerlessClusterArgs.builder()
                .name(clusterName)
                .resourceGroupId(test.id())
                .serverlessRegion(region)
                .allowDeletion(clusterAllowDeletion)
                .privateLinkId(privateNetworking == "STATE_ENABLED" ? testServerlessPrivateLink[0].id() : null)
                .networkingConfig(ServerlessClusterNetworkingConfigArgs.builder()
                    .public_(publicNetworking)
                    .private_(privateNetworking)
                    .build())
                .build());
    
            var testTopic = new Topic("testTopic", TopicArgs.builder()
                .name(topicName)
                .partitionCount(partitionCount)
                .replicationFactor(replicationFactor)
                .clusterApiUrl(testServerlessCluster.clusterApiUrl())
                .allowDeletion(true)
                .build());
    
            var testUser = new User("testUser", UserArgs.builder()
                .name(userName)
                .password(userPw)
                .mechanism(mechanism)
                .clusterApiUrl(testServerlessCluster.clusterApiUrl())
                .allowDeletion(userAllowDeletion)
                .build());
    
            // Schema Registry against a serverless cluster keys off cluster_id (control
            // plane), not cluster_api_url; cluster_id resolves the SR endpoint via the
            // ServerlessClusterService fallback in GetSchemaRegistryClientForCluster.
            // Both redpanda_schema_registry_acl and redpanda_schema route through it.
            var providerBootstrapSubject = new SchemaRegistryAcl("providerBootstrapSubject", SchemaRegistryAclArgs.builder()
                .clusterId(testServerlessCluster.id())
                .principal("User:*")
                .resourceType("SUBJECT")
                .resourceName(resourceGroupName)
                .patternType("PREFIXED")
                .host("*")
                .operation("ALL")
                .permission("ALLOW")
                .allowDeletion(true)
                .build());
    
            var providerBootstrapRegistry = new SchemaRegistryAcl("providerBootstrapRegistry", SchemaRegistryAclArgs.builder()
                .clusterId(testServerlessCluster.id())
                .principal("User:*")
                .resourceType("REGISTRY")
                .resourceName("*")
                .patternType("LITERAL")
                .host("*")
                .operation("ALL")
                .permission("ALLOW")
                .allowDeletion(true)
                .build());
    
            var userSchema = new Schema("userSchema", SchemaArgs.builder()
                .clusterId(testServerlessCluster.id())
                .subject(String.format("%s-value", resourceGroupName))
                .schemaType("AVRO")
                .compatibility("BACKWARD")
                .allowDeletion(true)
                .schema(serializeJson(
                    jsonObject(
                        jsonProperty("type", "record"),
                        jsonProperty("name", "User"),
                        jsonProperty("fields", jsonArray(
                            jsonObject(
                                jsonProperty("name", "id"),
                                jsonProperty("type", "long")
                            ), 
                            jsonObject(
                                jsonProperty("name", "name"),
                                jsonProperty("type", "string")
                            )
                        ))
                    )))
                .build(), CustomResourceOptions.builder()
                    .dependsOn(                
                        providerBootstrapSubject,
                        providerBootstrapRegistry)
                    .build());
    
        }
    }
    
    Example coming soon!
    
    Example coming soon!
    

    Limitations

    Can only be used with Redpanda Cloud serverless clusters.

    Using getServerlessCluster

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getServerlessCluster(args: GetServerlessClusterArgs, opts?: InvokeOptions): Promise<GetServerlessClusterResult>
    function getServerlessClusterOutput(args: GetServerlessClusterOutputArgs, opts?: InvokeOptions): Output<GetServerlessClusterResult>
    def get_serverless_cluster(id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetServerlessClusterResult
    def get_serverless_cluster_output(id: pulumi.Input[Optional[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetServerlessClusterResult]
    func LookupServerlessCluster(ctx *Context, args *LookupServerlessClusterArgs, opts ...InvokeOption) (*LookupServerlessClusterResult, error)
    func LookupServerlessClusterOutput(ctx *Context, args *LookupServerlessClusterOutputArgs, opts ...InvokeOption) LookupServerlessClusterResultOutput

    > Note: This function is named LookupServerlessCluster in the Go SDK.

    public static class GetServerlessCluster 
    {
        public static Task<GetServerlessClusterResult> InvokeAsync(GetServerlessClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetServerlessClusterResult> Invoke(GetServerlessClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServerlessClusterResult> getServerlessCluster(GetServerlessClusterArgs args, InvokeOptions options)
    public static Output<GetServerlessClusterResult> getServerlessCluster(GetServerlessClusterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: redpanda:index/getServerlessCluster:getServerlessCluster
      arguments:
        # arguments dictionary
    data "redpanda_getserverlesscluster" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    Id string
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    id string
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    id String
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    id string
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    id str
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    id String
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.

    getServerlessCluster Result

    The following output properties are available:

    ClusterApiUrl string
    The URL of the dataplane API for the serverless cluster.
    ConsolePrivateUrl string
    Private Console URL for the serverless cluster.
    ConsoleUrl string
    Public Console URL for the serverless cluster.
    DataplaneApi GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    Id string
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    KafkaApi GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    Name string
    Unique name of the Serverless cluster.
    NetworkingConfig GetServerlessClusterNetworkingConfig
    Networking Config configuration
    PlannedDeletion GetServerlessClusterPlannedDeletion
    Date after which this cluster can and should be deleted.
    PrivateLinkId string
    Private link ID for the serverless cluster. Must be set if private networking is enabled.
    Prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    ResourceGroupId string
    Resource group ID of the cluster.
    SchemaRegistry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    ServerlessRegion string
    Serverless region in which the cluster is placed, backed by a cloud provider region.
    State string
    State describes the state of the ServerlessCluster. - STATEPLACING: Serverless cluster is in the process of being placed on a cell with sufficient resources in the data plane. - STATECREATING: Serverless cluster is in the process of having its control plane state created. - STATEREADY: Serverless cluster is in execution and accepting external requests. - STATEDELETING: Serverless cluster is in the process of having its control plane state removed. Resources dedicated to the cluster in the data plane will be released. - STATEFAILED: Serverless cluster was unable to enter the ready state from either the creating or placing states. - STATESUSPENDED: Serverless cluster is in execution but blocks all external requests.
    Tags Dictionary<string, string>
    User-defined tags for the Serverless cluster
    ClusterApiUrl string
    The URL of the dataplane API for the serverless cluster.
    ConsolePrivateUrl string
    Private Console URL for the serverless cluster.
    ConsoleUrl string
    Public Console URL for the serverless cluster.
    DataplaneApi GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    Id string
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    KafkaApi GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    Name string
    Unique name of the Serverless cluster.
    NetworkingConfig GetServerlessClusterNetworkingConfig
    Networking Config configuration
    PlannedDeletion GetServerlessClusterPlannedDeletion
    Date after which this cluster can and should be deleted.
    PrivateLinkId string
    Private link ID for the serverless cluster. Must be set if private networking is enabled.
    Prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    ResourceGroupId string
    Resource group ID of the cluster.
    SchemaRegistry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    ServerlessRegion string
    Serverless region in which the cluster is placed, backed by a cloud provider region.
    State string
    State describes the state of the ServerlessCluster. - STATEPLACING: Serverless cluster is in the process of being placed on a cell with sufficient resources in the data plane. - STATECREATING: Serverless cluster is in the process of having its control plane state created. - STATEREADY: Serverless cluster is in execution and accepting external requests. - STATEDELETING: Serverless cluster is in the process of having its control plane state removed. Resources dedicated to the cluster in the data plane will be released. - STATEFAILED: Serverless cluster was unable to enter the ready state from either the creating or placing states. - STATESUSPENDED: Serverless cluster is in execution but blocks all external requests.
    Tags map[string]string
    User-defined tags for the Serverless cluster
    cluster_api_url string
    The URL of the dataplane API for the serverless cluster.
    console_private_url string
    Private Console URL for the serverless cluster.
    console_url string
    Public Console URL for the serverless cluster.
    dataplane_api object
    Cluster's Data Plane API properties.
    id string
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    kafka_api object
    Cluster's Kafka API properties.
    name string
    Unique name of the Serverless cluster.
    networking_config object
    Networking Config configuration
    planned_deletion object
    Date after which this cluster can and should be deleted.
    private_link_id string
    Private link ID for the serverless cluster. Must be set if private networking is enabled.
    prometheus object
    Prometheus metrics endpoint properties.
    resource_group_id string
    Resource group ID of the cluster.
    schema_registry object
    Cluster's Schema Registry properties.
    serverless_region string
    Serverless region in which the cluster is placed, backed by a cloud provider region.
    state string
    State describes the state of the ServerlessCluster. - STATEPLACING: Serverless cluster is in the process of being placed on a cell with sufficient resources in the data plane. - STATECREATING: Serverless cluster is in the process of having its control plane state created. - STATEREADY: Serverless cluster is in execution and accepting external requests. - STATEDELETING: Serverless cluster is in the process of having its control plane state removed. Resources dedicated to the cluster in the data plane will be released. - STATEFAILED: Serverless cluster was unable to enter the ready state from either the creating or placing states. - STATESUSPENDED: Serverless cluster is in execution but blocks all external requests.
    tags map(string)
    User-defined tags for the Serverless cluster
    clusterApiUrl String
    The URL of the dataplane API for the serverless cluster.
    consolePrivateUrl String
    Private Console URL for the serverless cluster.
    consoleUrl String
    Public Console URL for the serverless cluster.
    dataplaneApi GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    id String
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    kafkaApi GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    name String
    Unique name of the Serverless cluster.
    networkingConfig GetServerlessClusterNetworkingConfig
    Networking Config configuration
    plannedDeletion GetServerlessClusterPlannedDeletion
    Date after which this cluster can and should be deleted.
    privateLinkId String
    Private link ID for the serverless cluster. Must be set if private networking is enabled.
    prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    resourceGroupId String
    Resource group ID of the cluster.
    schemaRegistry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    serverlessRegion String
    Serverless region in which the cluster is placed, backed by a cloud provider region.
    state String
    State describes the state of the ServerlessCluster. - STATEPLACING: Serverless cluster is in the process of being placed on a cell with sufficient resources in the data plane. - STATECREATING: Serverless cluster is in the process of having its control plane state created. - STATEREADY: Serverless cluster is in execution and accepting external requests. - STATEDELETING: Serverless cluster is in the process of having its control plane state removed. Resources dedicated to the cluster in the data plane will be released. - STATEFAILED: Serverless cluster was unable to enter the ready state from either the creating or placing states. - STATESUSPENDED: Serverless cluster is in execution but blocks all external requests.
    tags Map<String,String>
    User-defined tags for the Serverless cluster
    clusterApiUrl string
    The URL of the dataplane API for the serverless cluster.
    consolePrivateUrl string
    Private Console URL for the serverless cluster.
    consoleUrl string
    Public Console URL for the serverless cluster.
    dataplaneApi GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    id string
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    kafkaApi GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    name string
    Unique name of the Serverless cluster.
    networkingConfig GetServerlessClusterNetworkingConfig
    Networking Config configuration
    plannedDeletion GetServerlessClusterPlannedDeletion
    Date after which this cluster can and should be deleted.
    privateLinkId string
    Private link ID for the serverless cluster. Must be set if private networking is enabled.
    prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    resourceGroupId string
    Resource group ID of the cluster.
    schemaRegistry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    serverlessRegion string
    Serverless region in which the cluster is placed, backed by a cloud provider region.
    state string
    State describes the state of the ServerlessCluster. - STATEPLACING: Serverless cluster is in the process of being placed on a cell with sufficient resources in the data plane. - STATECREATING: Serverless cluster is in the process of having its control plane state created. - STATEREADY: Serverless cluster is in execution and accepting external requests. - STATEDELETING: Serverless cluster is in the process of having its control plane state removed. Resources dedicated to the cluster in the data plane will be released. - STATEFAILED: Serverless cluster was unable to enter the ready state from either the creating or placing states. - STATESUSPENDED: Serverless cluster is in execution but blocks all external requests.
    tags {[key: string]: string}
    User-defined tags for the Serverless cluster
    cluster_api_url str
    The URL of the dataplane API for the serverless cluster.
    console_private_url str
    Private Console URL for the serverless cluster.
    console_url str
    Public Console URL for the serverless cluster.
    dataplane_api GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    id str
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    kafka_api GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    name str
    Unique name of the Serverless cluster.
    networking_config GetServerlessClusterNetworkingConfig
    Networking Config configuration
    planned_deletion GetServerlessClusterPlannedDeletion
    Date after which this cluster can and should be deleted.
    private_link_id str
    Private link ID for the serverless cluster. Must be set if private networking is enabled.
    prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    resource_group_id str
    Resource group ID of the cluster.
    schema_registry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    serverless_region str
    Serverless region in which the cluster is placed, backed by a cloud provider region.
    state str
    State describes the state of the ServerlessCluster. - STATEPLACING: Serverless cluster is in the process of being placed on a cell with sufficient resources in the data plane. - STATECREATING: Serverless cluster is in the process of having its control plane state created. - STATEREADY: Serverless cluster is in execution and accepting external requests. - STATEDELETING: Serverless cluster is in the process of having its control plane state removed. Resources dedicated to the cluster in the data plane will be released. - STATEFAILED: Serverless cluster was unable to enter the ready state from either the creating or placing states. - STATESUSPENDED: Serverless cluster is in execution but blocks all external requests.
    tags Mapping[str, str]
    User-defined tags for the Serverless cluster
    clusterApiUrl String
    The URL of the dataplane API for the serverless cluster.
    consolePrivateUrl String
    Private Console URL for the serverless cluster.
    consoleUrl String
    Public Console URL for the serverless cluster.
    dataplaneApi Property Map
    Cluster's Data Plane API properties.
    id String
    ID of the Serverless cluster. ID is an output from the Create Serverless Cluster operation and cannot be set by the caller.
    kafkaApi Property Map
    Cluster's Kafka API properties.
    name String
    Unique name of the Serverless cluster.
    networkingConfig Property Map
    Networking Config configuration
    plannedDeletion Property Map
    Date after which this cluster can and should be deleted.
    privateLinkId String
    Private link ID for the serverless cluster. Must be set if private networking is enabled.
    prometheus Property Map
    Prometheus metrics endpoint properties.
    resourceGroupId String
    Resource group ID of the cluster.
    schemaRegistry Property Map
    Cluster's Schema Registry properties.
    serverlessRegion String
    Serverless region in which the cluster is placed, backed by a cloud provider region.
    state String
    State describes the state of the ServerlessCluster. - STATEPLACING: Serverless cluster is in the process of being placed on a cell with sufficient resources in the data plane. - STATECREATING: Serverless cluster is in the process of having its control plane state created. - STATEREADY: Serverless cluster is in execution and accepting external requests. - STATEDELETING: Serverless cluster is in the process of having its control plane state removed. Resources dedicated to the cluster in the data plane will be released. - STATEFAILED: Serverless cluster was unable to enter the ready state from either the creating or placing states. - STATESUSPENDED: Serverless cluster is in execution but blocks all external requests.
    tags Map<String>
    User-defined tags for the Serverless cluster

    Supporting Types

    GetServerlessClusterDataplaneApi

    PrivateUrl string
    private_url is the private url of the dataplane api if private networking is enabled for this cluster.
    Url string
    Dataplane API URL
    PrivateUrl string
    private_url is the private url of the dataplane api if private networking is enabled for this cluster.
    Url string
    Dataplane API URL
    private_url string
    private_url is the private url of the dataplane api if private networking is enabled for this cluster.
    url string
    Dataplane API URL
    privateUrl String
    private_url is the private url of the dataplane api if private networking is enabled for this cluster.
    url String
    Dataplane API URL
    privateUrl string
    private_url is the private url of the dataplane api if private networking is enabled for this cluster.
    url string
    Dataplane API URL
    private_url str
    private_url is the private url of the dataplane api if private networking is enabled for this cluster.
    url str
    Dataplane API URL
    privateUrl String
    private_url is the private url of the dataplane api if private networking is enabled for this cluster.
    url String
    Dataplane API URL

    GetServerlessClusterKafkaApi

    PrivateSeedBrokers List<string>
    Kafka API seed brokers (also known as bootstrap servers). Private addresses
    SeedBrokers List<string>
    Kafka API seed brokers (also known as bootstrap servers). Implicitly public
    PrivateSeedBrokers []string
    Kafka API seed brokers (also known as bootstrap servers). Private addresses
    SeedBrokers []string
    Kafka API seed brokers (also known as bootstrap servers). Implicitly public
    private_seed_brokers list(string)
    Kafka API seed brokers (also known as bootstrap servers). Private addresses
    seed_brokers list(string)
    Kafka API seed brokers (also known as bootstrap servers). Implicitly public
    privateSeedBrokers List<String>
    Kafka API seed brokers (also known as bootstrap servers). Private addresses
    seedBrokers List<String>
    Kafka API seed brokers (also known as bootstrap servers). Implicitly public
    privateSeedBrokers string[]
    Kafka API seed brokers (also known as bootstrap servers). Private addresses
    seedBrokers string[]
    Kafka API seed brokers (also known as bootstrap servers). Implicitly public
    private_seed_brokers Sequence[str]
    Kafka API seed brokers (also known as bootstrap servers). Private addresses
    seed_brokers Sequence[str]
    Kafka API seed brokers (also known as bootstrap servers). Implicitly public
    privateSeedBrokers List<String>
    Kafka API seed brokers (also known as bootstrap servers). Private addresses
    seedBrokers List<String>
    Kafka API seed brokers (also known as bootstrap servers). Implicitly public

    GetServerlessClusterNetworkingConfig

    Private string
    Private network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    Public string
    Public network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    Private string
    Private network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    Public string
    Public network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    private string
    Private network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    public string
    Public network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    private_ String
    Private network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    public_ String
    Public network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    private string
    Private network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    public string
    Public network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    private str
    Private network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    public str
    Public network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    private String
    Private network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.
    public String
    Public network state. Valid values: STATEUNSPECIFIED, STATEDISABLED, STATE_ENABLED.

    GetServerlessClusterPlannedDeletion

    DeleteAfter string
    Delete After
    Reason string
    Reason
    DeleteAfter string
    Delete After
    Reason string
    Reason
    delete_after string
    Delete After
    reason string
    Reason
    deleteAfter String
    Delete After
    reason String
    Reason
    deleteAfter string
    Delete After
    reason string
    Reason
    delete_after str
    Delete After
    reason str
    Reason
    deleteAfter String
    Delete After
    reason String
    Reason

    GetServerlessClusterPrometheus

    PrivateUrl string
    Prometheus API Private URL.
    Url string
    Prometheus API URL.
    PrivateUrl string
    Prometheus API Private URL.
    Url string
    Prometheus API URL.
    private_url string
    Prometheus API Private URL.
    url string
    Prometheus API URL.
    privateUrl String
    Prometheus API Private URL.
    url String
    Prometheus API URL.
    privateUrl string
    Prometheus API Private URL.
    url string
    Prometheus API URL.
    private_url str
    Prometheus API Private URL.
    url str
    Prometheus API URL.
    privateUrl String
    Prometheus API Private URL.
    url String
    Prometheus API URL.

    GetServerlessClusterSchemaRegistry

    PrivateUrl string
    Private url for the schema registry
    Url string
    Schema Registry URL
    PrivateUrl string
    Private url for the schema registry
    Url string
    Schema Registry URL
    private_url string
    Private url for the schema registry
    url string
    Schema Registry URL
    privateUrl String
    Private url for the schema registry
    url String
    Schema Registry URL
    privateUrl string
    Private url for the schema registry
    url string
    Schema Registry URL
    private_url str
    Private url for the schema registry
    url str
    Schema Registry URL
    privateUrl String
    Private url for the schema registry
    url String
    Schema Registry URL

    Package Details

    Repository
    redpanda redpanda-data/terraform-provider-redpanda
    License
    Notes
    This Pulumi package is based on the redpanda Terraform Provider.
    Viewing docs for redpanda 2.1.0
    published on Wednesday, Jun 24, 2026 by redpanda-data

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial