redpanda.ServerlessCluster
Explore with Pulumi AI
Enables the provisioning and management of Redpanda serverless clusters on AWS. A serverless cluster must always have a resource group.
Usage
On AWS
import * as pulumi from "@pulumi/pulumi";
import * as redpanda from "@pulumi/redpanda";
const testResourceGroup = new redpanda.ResourceGroup("testResourceGroup", {});
const config = new pulumi.Config();
const region = config.get("region") || "pro-us-east-1";
const testServerlessCluster = new redpanda.ServerlessCluster("testServerlessCluster", {
resourceGroupId: testResourceGroup.id,
serverlessRegion: region,
});
const resourceGroupName = config.get("resourceGroupName") || "testgroup";
const clusterName = config.get("clusterName") || "testname";
import pulumi
import pulumi_redpanda as redpanda
test_resource_group = redpanda.ResourceGroup("testResourceGroup")
config = pulumi.Config()
region = config.get("region")
if region is None:
region = "pro-us-east-1"
test_serverless_cluster = redpanda.ServerlessCluster("testServerlessCluster",
resource_group_id=test_resource_group.id,
serverless_region=region)
resource_group_name = config.get("resourceGroupName")
if resource_group_name is None:
resource_group_name = "testgroup"
cluster_name = config.get("clusterName")
if cluster_name is None:
cluster_name = "testname"
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/redpanda/redpanda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testResourceGroup, err := redpanda.NewResourceGroup(ctx, "testResourceGroup", nil)
if err != nil {
return err
}
cfg := config.New(ctx, "")
region := "pro-us-east-1"
if param := cfg.Get("region"); param != "" {
region = param
}
_, err = redpanda.NewServerlessCluster(ctx, "testServerlessCluster", &redpanda.ServerlessClusterArgs{
ResourceGroupId: testResourceGroup.ID(),
ServerlessRegion: pulumi.String(region),
})
if err != nil {
return err
}
resourceGroupName := "testgroup"
if param := cfg.Get("resourceGroupName"); param != "" {
resourceGroupName = param
}
clusterName := "testname"
if param := cfg.Get("clusterName"); param != "" {
clusterName = param
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Redpanda = Pulumi.Redpanda;
return await Deployment.RunAsync(() =>
{
var testResourceGroup = new Redpanda.ResourceGroup("testResourceGroup");
var config = new Config();
var region = config.Get("region") ?? "pro-us-east-1";
var testServerlessCluster = new Redpanda.ServerlessCluster("testServerlessCluster", new()
{
ResourceGroupId = testResourceGroup.Id,
ServerlessRegion = region,
});
var resourceGroupName = config.Get("resourceGroupName") ?? "testgroup";
var clusterName = config.Get("clusterName") ?? "testname";
});
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.ServerlessCluster;
import com.pulumi.redpanda.ServerlessClusterArgs;
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 config = ctx.config();
var testResourceGroup = new ResourceGroup("testResourceGroup");
final var region = config.get("region").orElse("pro-us-east-1");
var testServerlessCluster = new ServerlessCluster("testServerlessCluster", ServerlessClusterArgs.builder()
.resourceGroupId(testResourceGroup.id())
.serverlessRegion(region)
.build());
final var resourceGroupName = config.get("resourceGroupName").orElse("testgroup");
final var clusterName = config.get("clusterName").orElse("testname");
}
}
configuration:
resourceGroupName:
type: string
default: testgroup
clusterName:
type: string
default: testname
region:
type: string
default: pro-us-east-1
resources:
testResourceGroup:
type: redpanda:ResourceGroup
testServerlessCluster:
type: redpanda:ServerlessCluster
properties:
resourceGroupId: ${testResourceGroup.id}
serverlessRegion: ${region}
Limitations
We are not currently able to support the provisioning of serverless clusters on GCP.
Example Usage to create a serverless cluster
import * as pulumi from "@pulumi/pulumi";
import * as redpanda from "@pulumi/redpanda";
const testResourceGroup = new redpanda.ResourceGroup("testResourceGroup", {});
const config = new pulumi.Config();
const region = config.get("region") || "pro-us-east-1";
const testServerlessCluster = new redpanda.ServerlessCluster("testServerlessCluster", {
resourceGroupId: testResourceGroup.id,
serverlessRegion: region,
});
const resourceGroupName = config.get("resourceGroupName") || "testgroup";
const clusterName = config.get("clusterName") || "testname";
import pulumi
import pulumi_redpanda as redpanda
test_resource_group = redpanda.ResourceGroup("testResourceGroup")
config = pulumi.Config()
region = config.get("region")
if region is None:
region = "pro-us-east-1"
test_serverless_cluster = redpanda.ServerlessCluster("testServerlessCluster",
resource_group_id=test_resource_group.id,
serverless_region=region)
resource_group_name = config.get("resourceGroupName")
if resource_group_name is None:
resource_group_name = "testgroup"
cluster_name = config.get("clusterName")
if cluster_name is None:
cluster_name = "testname"
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/redpanda/redpanda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testResourceGroup, err := redpanda.NewResourceGroup(ctx, "testResourceGroup", nil)
if err != nil {
return err
}
cfg := config.New(ctx, "")
region := "pro-us-east-1"
if param := cfg.Get("region"); param != "" {
region = param
}
_, err = redpanda.NewServerlessCluster(ctx, "testServerlessCluster", &redpanda.ServerlessClusterArgs{
ResourceGroupId: testResourceGroup.ID(),
ServerlessRegion: pulumi.String(region),
})
if err != nil {
return err
}
resourceGroupName := "testgroup"
if param := cfg.Get("resourceGroupName"); param != "" {
resourceGroupName = param
}
clusterName := "testname"
if param := cfg.Get("clusterName"); param != "" {
clusterName = param
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Redpanda = Pulumi.Redpanda;
return await Deployment.RunAsync(() =>
{
var testResourceGroup = new Redpanda.ResourceGroup("testResourceGroup");
var config = new Config();
var region = config.Get("region") ?? "pro-us-east-1";
var testServerlessCluster = new Redpanda.ServerlessCluster("testServerlessCluster", new()
{
ResourceGroupId = testResourceGroup.Id,
ServerlessRegion = region,
});
var resourceGroupName = config.Get("resourceGroupName") ?? "testgroup";
var clusterName = config.Get("clusterName") ?? "testname";
});
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.ServerlessCluster;
import com.pulumi.redpanda.ServerlessClusterArgs;
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 config = ctx.config();
var testResourceGroup = new ResourceGroup("testResourceGroup");
final var region = config.get("region").orElse("pro-us-east-1");
var testServerlessCluster = new ServerlessCluster("testServerlessCluster", ServerlessClusterArgs.builder()
.resourceGroupId(testResourceGroup.id())
.serverlessRegion(region)
.build());
final var resourceGroupName = config.get("resourceGroupName").orElse("testgroup");
final var clusterName = config.get("clusterName").orElse("testname");
}
}
configuration:
resourceGroupName:
type: string
default: testgroup
clusterName:
type: string
default: testname
region:
type: string
default: pro-us-east-1
resources:
testResourceGroup:
type: redpanda:ResourceGroup
testServerlessCluster:
type: redpanda:ServerlessCluster
properties:
resourceGroupId: ${testResourceGroup.id}
serverlessRegion: ${region}
Create ServerlessCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerlessCluster(name: string, args: ServerlessClusterArgs, opts?: CustomResourceOptions);
@overload
def ServerlessCluster(resource_name: str,
args: ServerlessClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerlessCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_id: Optional[str] = None,
serverless_region: Optional[str] = None,
name: Optional[str] = None)
func NewServerlessCluster(ctx *Context, name string, args ServerlessClusterArgs, opts ...ResourceOption) (*ServerlessCluster, error)
public ServerlessCluster(string name, ServerlessClusterArgs args, CustomResourceOptions? opts = null)
public ServerlessCluster(String name, ServerlessClusterArgs args)
public ServerlessCluster(String name, ServerlessClusterArgs args, CustomResourceOptions options)
type: redpanda:ServerlessCluster
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 ServerlessClusterArgs
- 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 ServerlessClusterArgs
- 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 ServerlessClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerlessClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerlessClusterArgs
- 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 serverlessClusterResource = new Redpanda.ServerlessCluster("serverlessClusterResource", new()
{
ResourceGroupId = "string",
ServerlessRegion = "string",
Name = "string",
});
example, err := redpanda.NewServerlessCluster(ctx, "serverlessClusterResource", &redpanda.ServerlessClusterArgs{
ResourceGroupId: pulumi.String("string"),
ServerlessRegion: pulumi.String("string"),
Name: pulumi.String("string"),
})
var serverlessClusterResource = new ServerlessCluster("serverlessClusterResource", ServerlessClusterArgs.builder()
.resourceGroupId("string")
.serverlessRegion("string")
.name("string")
.build());
serverless_cluster_resource = redpanda.ServerlessCluster("serverlessClusterResource",
resource_group_id="string",
serverless_region="string",
name="string")
const serverlessClusterResource = new redpanda.ServerlessCluster("serverlessClusterResource", {
resourceGroupId: "string",
serverlessRegion: "string",
name: "string",
});
type: redpanda:ServerlessCluster
properties:
name: string
resourceGroupId: string
serverlessRegion: string
ServerlessCluster 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 ServerlessCluster resource accepts the following input properties:
- Resource
Group stringId - The ID of the Resource Group in which to create the serverless cluster
- Serverless
Region string - Redpanda specific region of the serverless cluster
- Name string
- Name of the serverless cluster
- Resource
Group stringId - The ID of the Resource Group in which to create the serverless cluster
- Serverless
Region string - Redpanda specific region of the serverless cluster
- Name string
- Name of the serverless cluster
- resource
Group StringId - The ID of the Resource Group in which to create the serverless cluster
- serverless
Region String - Redpanda specific region of the serverless cluster
- name String
- Name of the serverless cluster
- resource
Group stringId - The ID of the Resource Group in which to create the serverless cluster
- serverless
Region string - Redpanda specific region of the serverless cluster
- name string
- Name of the serverless cluster
- resource_
group_ strid - The ID of the Resource Group in which to create the serverless cluster
- serverless_
region str - Redpanda specific region of the serverless cluster
- name str
- Name of the serverless cluster
- resource
Group StringId - The ID of the Resource Group in which to create the serverless cluster
- serverless
Region String - Redpanda specific region of the serverless cluster
- name String
- Name of the serverless cluster
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerlessCluster resource produces the following output properties:
- Cluster
Api stringUrl - The URL of the dataplane API for the serverless cluster
- Id string
- The provider-assigned unique ID for this managed resource.
- Cluster
Api stringUrl - The URL of the dataplane API for the serverless cluster
- Id string
- The provider-assigned unique ID for this managed resource.
- cluster
Api StringUrl - The URL of the dataplane API for the serverless cluster
- id String
- The provider-assigned unique ID for this managed resource.
- cluster
Api stringUrl - The URL of the dataplane API for the serverless cluster
- id string
- The provider-assigned unique ID for this managed resource.
- cluster_
api_ strurl - The URL of the dataplane API for the serverless cluster
- id str
- The provider-assigned unique ID for this managed resource.
- cluster
Api StringUrl - The URL of the dataplane API for the serverless cluster
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ServerlessCluster Resource
Get an existing ServerlessCluster 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?: ServerlessClusterState, opts?: CustomResourceOptions): ServerlessCluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_api_url: Optional[str] = None,
name: Optional[str] = None,
resource_group_id: Optional[str] = None,
serverless_region: Optional[str] = None) -> ServerlessCluster
func GetServerlessCluster(ctx *Context, name string, id IDInput, state *ServerlessClusterState, opts ...ResourceOption) (*ServerlessCluster, error)
public static ServerlessCluster Get(string name, Input<string> id, ServerlessClusterState? state, CustomResourceOptions? opts = null)
public static ServerlessCluster get(String name, Output<String> id, ServerlessClusterState state, CustomResourceOptions options)
resources: _: type: redpanda:ServerlessCluster 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.
- Cluster
Api stringUrl - The URL of the dataplane API for the serverless cluster
- Name string
- Name of the serverless cluster
- Resource
Group stringId - The ID of the Resource Group in which to create the serverless cluster
- Serverless
Region string - Redpanda specific region of the serverless cluster
- Cluster
Api stringUrl - The URL of the dataplane API for the serverless cluster
- Name string
- Name of the serverless cluster
- Resource
Group stringId - The ID of the Resource Group in which to create the serverless cluster
- Serverless
Region string - Redpanda specific region of the serverless cluster
- cluster
Api StringUrl - The URL of the dataplane API for the serverless cluster
- name String
- Name of the serverless cluster
- resource
Group StringId - The ID of the Resource Group in which to create the serverless cluster
- serverless
Region String - Redpanda specific region of the serverless cluster
- cluster
Api stringUrl - The URL of the dataplane API for the serverless cluster
- name string
- Name of the serverless cluster
- resource
Group stringId - The ID of the Resource Group in which to create the serverless cluster
- serverless
Region string - Redpanda specific region of the serverless cluster
- cluster_
api_ strurl - The URL of the dataplane API for the serverless cluster
- name str
- Name of the serverless cluster
- resource_
group_ strid - The ID of the Resource Group in which to create the serverless cluster
- serverless_
region str - Redpanda specific region of the serverless cluster
- cluster
Api StringUrl - The URL of the dataplane API for the serverless cluster
- name String
- Name of the serverless cluster
- resource
Group StringId - The ID of the Resource Group in which to create the serverless cluster
- serverless
Region String - Redpanda specific region of the serverless cluster
Import
$ pulumi import redpanda:index/serverlessCluster:ServerlessCluster example serverlessClusterId
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- redpanda redpanda-data/terraform-provider-redpanda
- License
- Notes
- This Pulumi package is based on the
redpanda
Terraform Provider.