1. Packages
  2. Packages
  3. Redpanda Provider
  4. API Docs
  5. getServerlessCluster
Viewing docs for redpanda 2.0.0
published on Wednesday, Jun 3, 2026 by redpanda-data
Viewing docs for redpanda 2.0.0
published on Wednesday, Jun 3, 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
    The ID of the serverless cluster
    Id string
    The ID of the serverless cluster
    id string
    The ID of the serverless cluster
    id String
    The ID of the serverless cluster
    id string
    The ID of the serverless cluster
    id str
    The ID of the serverless cluster
    id String
    The ID of the serverless cluster

    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
    ConsoleUrl string
    Public Console URL
    DataplaneApi GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    Id string
    The ID of the serverless cluster
    KafkaApi GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    Name string
    Name of the serverless cluster
    NetworkingConfig GetServerlessClusterNetworkingConfig
    Networking Config configuration
    PlannedDeletion GetServerlessClusterPlannedDeletion
    Planned deletion information
    PrivateLinkId string
    Private link ID for the serverless cluster, if any
    Prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    ResourceGroupId string
    The ID of the resource group in which to create the serverless cluster
    SchemaRegistry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    ServerlessRegion string
    Redpanda specific region for the serverless cluster
    State string
    Current state of the serverless cluster.
    Tags Dictionary<string, string>
    User-defined tags on the cluster
    ClusterApiUrl string
    The URL of the dataplane API for the serverless cluster
    ConsolePrivateUrl string
    Private Console URL
    ConsoleUrl string
    Public Console URL
    DataplaneApi GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    Id string
    The ID of the serverless cluster
    KafkaApi GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    Name string
    Name of the serverless cluster
    NetworkingConfig GetServerlessClusterNetworkingConfig
    Networking Config configuration
    PlannedDeletion GetServerlessClusterPlannedDeletion
    Planned deletion information
    PrivateLinkId string
    Private link ID for the serverless cluster, if any
    Prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    ResourceGroupId string
    The ID of the resource group in which to create the serverless cluster
    SchemaRegistry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    ServerlessRegion string
    Redpanda specific region for the serverless cluster
    State string
    Current state of the serverless cluster.
    Tags map[string]string
    User-defined tags on the cluster
    cluster_api_url string
    The URL of the dataplane API for the serverless cluster
    console_private_url string
    Private Console URL
    console_url string
    Public Console URL
    dataplane_api object
    Cluster's Data Plane API properties.
    id string
    The ID of the serverless cluster
    kafka_api object
    Cluster's Kafka API properties.
    name string
    Name of the serverless cluster
    networking_config object
    Networking Config configuration
    planned_deletion object
    Planned deletion information
    private_link_id string
    Private link ID for the serverless cluster, if any
    prometheus object
    Prometheus metrics endpoint properties.
    resource_group_id string
    The ID of the resource group in which to create the serverless cluster
    schema_registry object
    Cluster's Schema Registry properties.
    serverless_region string
    Redpanda specific region for the serverless cluster
    state string
    Current state of the serverless cluster.
    tags map(string)
    User-defined tags on the cluster
    clusterApiUrl String
    The URL of the dataplane API for the serverless cluster
    consolePrivateUrl String
    Private Console URL
    consoleUrl String
    Public Console URL
    dataplaneApi GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    id String
    The ID of the serverless cluster
    kafkaApi GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    name String
    Name of the serverless cluster
    networkingConfig GetServerlessClusterNetworkingConfig
    Networking Config configuration
    plannedDeletion GetServerlessClusterPlannedDeletion
    Planned deletion information
    privateLinkId String
    Private link ID for the serverless cluster, if any
    prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    resourceGroupId String
    The ID of the resource group in which to create the serverless cluster
    schemaRegistry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    serverlessRegion String
    Redpanda specific region for the serverless cluster
    state String
    Current state of the serverless cluster.
    tags Map<String,String>
    User-defined tags on the cluster
    clusterApiUrl string
    The URL of the dataplane API for the serverless cluster
    consolePrivateUrl string
    Private Console URL
    consoleUrl string
    Public Console URL
    dataplaneApi GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    id string
    The ID of the serverless cluster
    kafkaApi GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    name string
    Name of the serverless cluster
    networkingConfig GetServerlessClusterNetworkingConfig
    Networking Config configuration
    plannedDeletion GetServerlessClusterPlannedDeletion
    Planned deletion information
    privateLinkId string
    Private link ID for the serverless cluster, if any
    prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    resourceGroupId string
    The ID of the resource group in which to create the serverless cluster
    schemaRegistry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    serverlessRegion string
    Redpanda specific region for the serverless cluster
    state string
    Current state of the serverless cluster.
    tags {[key: string]: string}
    User-defined tags on the cluster
    cluster_api_url str
    The URL of the dataplane API for the serverless cluster
    console_private_url str
    Private Console URL
    console_url str
    Public Console URL
    dataplane_api GetServerlessClusterDataplaneApi
    Cluster's Data Plane API properties.
    id str
    The ID of the serverless cluster
    kafka_api GetServerlessClusterKafkaApi
    Cluster's Kafka API properties.
    name str
    Name of the serverless cluster
    networking_config GetServerlessClusterNetworkingConfig
    Networking Config configuration
    planned_deletion GetServerlessClusterPlannedDeletion
    Planned deletion information
    private_link_id str
    Private link ID for the serverless cluster, if any
    prometheus GetServerlessClusterPrometheus
    Prometheus metrics endpoint properties.
    resource_group_id str
    The ID of the resource group in which to create the serverless cluster
    schema_registry GetServerlessClusterSchemaRegistry
    Cluster's Schema Registry properties.
    serverless_region str
    Redpanda specific region for the serverless cluster
    state str
    Current state of the serverless cluster.
    tags Mapping[str, str]
    User-defined tags on the cluster
    clusterApiUrl String
    The URL of the dataplane API for the serverless cluster
    consolePrivateUrl String
    Private Console URL
    consoleUrl String
    Public Console URL
    dataplaneApi Property Map
    Cluster's Data Plane API properties.
    id String
    The ID of the serverless cluster
    kafkaApi Property Map
    Cluster's Kafka API properties.
    name String
    Name of the serverless cluster
    networkingConfig Property Map
    Networking Config configuration
    plannedDeletion Property Map
    Planned deletion information
    privateLinkId String
    Private link ID for the serverless cluster, if any
    prometheus Property Map
    Prometheus metrics endpoint properties.
    resourceGroupId String
    The ID of the resource group in which to create the serverless cluster
    schemaRegistry Property Map
    Cluster's Schema Registry properties.
    serverlessRegion String
    Redpanda specific region for the serverless cluster
    state String
    Current state of the serverless cluster.
    tags Map<String>
    User-defined tags on the cluster

    Supporting Types

    GetServerlessClusterDataplaneApi

    PrivateUrl string
    Private Dataplane API URL
    Url string
    Public Dataplane API URL
    PrivateUrl string
    Private Dataplane API URL
    Url string
    Public Dataplane API URL
    private_url string
    Private Dataplane API URL
    url string
    Public Dataplane API URL
    privateUrl String
    Private Dataplane API URL
    url String
    Public Dataplane API URL
    privateUrl string
    Private Dataplane API URL
    url string
    Public Dataplane API URL
    private_url str
    Private Dataplane API URL
    url str
    Public Dataplane API URL
    privateUrl String
    Private Dataplane API URL
    url String
    Public Dataplane API URL

    GetServerlessClusterKafkaApi

    PrivateSeedBrokers List<string>
    Private Kafka API seed brokers
    SeedBrokers List<string>
    Public Kafka API seed brokers
    PrivateSeedBrokers []string
    Private Kafka API seed brokers
    SeedBrokers []string
    Public Kafka API seed brokers
    private_seed_brokers list(string)
    Private Kafka API seed brokers
    seed_brokers list(string)
    Public Kafka API seed brokers
    privateSeedBrokers List<String>
    Private Kafka API seed brokers
    seedBrokers List<String>
    Public Kafka API seed brokers
    privateSeedBrokers string[]
    Private Kafka API seed brokers
    seedBrokers string[]
    Public Kafka API seed brokers
    private_seed_brokers Sequence[str]
    Private Kafka API seed brokers
    seed_brokers Sequence[str]
    Public Kafka API seed brokers
    privateSeedBrokers List<String>
    Private Kafka API seed brokers
    seedBrokers List<String>
    Public Kafka API seed brokers

    GetServerlessClusterNetworkingConfig

    Private string
    Private network state
    Public string
    Public network state
    Private string
    Private network state
    Public string
    Public network state
    private string
    Private network state
    public string
    Public network state
    private_ String
    Private network state
    public_ String
    Public network state
    private string
    Private network state
    public string
    Public network state
    private str
    Private network state
    public str
    Public network state
    private String
    Private network state
    public String
    Public network state

    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
    Private Prometheus metrics URL
    Url string
    Public Prometheus metrics URL
    PrivateUrl string
    Private Prometheus metrics URL
    Url string
    Public Prometheus metrics URL
    private_url string
    Private Prometheus metrics URL
    url string
    Public Prometheus metrics URL
    privateUrl String
    Private Prometheus metrics URL
    url String
    Public Prometheus metrics URL
    privateUrl string
    Private Prometheus metrics URL
    url string
    Public Prometheus metrics URL
    private_url str
    Private Prometheus metrics URL
    url str
    Public Prometheus metrics URL
    privateUrl String
    Private Prometheus metrics URL
    url String
    Public Prometheus metrics URL

    GetServerlessClusterSchemaRegistry

    PrivateUrl string
    Private Schema Registry URL
    Url string
    Public Schema Registry URL
    PrivateUrl string
    Private Schema Registry URL
    Url string
    Public Schema Registry URL
    private_url string
    Private Schema Registry URL
    url string
    Public Schema Registry URL
    privateUrl String
    Private Schema Registry URL
    url String
    Public Schema Registry URL
    privateUrl string
    Private Schema Registry URL
    url string
    Public Schema Registry URL
    private_url str
    Private Schema Registry URL
    url str
    Public Schema Registry URL
    privateUrl String
    Private Schema Registry URL
    url String
    Public 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.0.0
    published on Wednesday, Jun 3, 2026 by redpanda-data

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial