Astra

Community
Package contributed by a community member
v1.0.25 published on Tuesday, Jun 21, 2022 by pulumiverse

Cdc

astra.Cdc enables cdc for an Astra Serverless table.

Example Usage

using Pulumi;
using Astra = Pulumiverse.Astra;

class MyStack : Stack
{
    public MyStack()
    {
        var streamingTenant_1 = new Astra.StreamingTenant("streamingTenant-1", new Astra.StreamingTenantArgs
        {
            TenantName = "terraformtest",
            Topic = "terraformtest",
            Region = "useast-4",
            CloudProvider = "gcp",
            UserEmail = "seb@datastax.com",
        });
        var cdc_1 = new Astra.Cdc("cdc-1", new Astra.CdcArgs
        {
            DatabaseId = "5b70892f-e01a-4595-98e6-19ecc9985d50",
            DatabaseName = "sai_test",
            Table = "test",
            Keyspace = "sai_test",
            TopicPartitions = 3,
            TenantName = streamingTenant_1.TenantName,
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                streamingTenant_1,
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-index/sdk/go/index"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := astra.NewStreamingTenant(ctx, "streamingTenant-1", &astra.StreamingTenantArgs{
			TenantName:    pulumi.String("terraformtest"),
			Topic:         pulumi.String("terraformtest"),
			Region:        pulumi.String("useast-4"),
			CloudProvider: pulumi.String("gcp"),
			UserEmail:     pulumi.String("seb@datastax.com"),
		})
		if err != nil {
			return err
		}
		_, err = astra.NewCdc(ctx, "cdc-1", &astra.CdcArgs{
			DatabaseId:      pulumi.String("5b70892f-e01a-4595-98e6-19ecc9985d50"),
			DatabaseName:    pulumi.String("sai_test"),
			Table:           pulumi.String("test"),
			Keyspace:        pulumi.String("sai_test"),
			TopicPartitions: pulumi.Int(3),
			TenantName:      streamingTenant_1.TenantName,
		}, pulumi.DependsOn([]pulumi.Resource{
			streamingTenant_1,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
import com.pulumi.resources.CustomResourceOptions;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var streamingTenant_1 = new StreamingTenant("streamingTenant-1", StreamingTenantArgs.builder()        
            .tenantName("terraformtest")
            .topic("terraformtest")
            .region("useast-4")
            .cloudProvider("gcp")
            .userEmail("seb@datastax.com")
            .build());

        var cdc_1 = new Cdc("cdc-1", CdcArgs.builder()        
            .databaseId("5b70892f-e01a-4595-98e6-19ecc9985d50")
            .databaseName("sai_test")
            .table("test")
            .keyspace("sai_test")
            .topicPartitions(3)
            .tenantName(streamingTenant_1.tenantName())
            .build(), CustomResourceOptions.builder()
                .dependsOn(streamingTenant_1)
                .build());

    }
}
import pulumi
import pulumiverse_astra as astra

streaming_tenant_1 = astra.StreamingTenant("streamingTenant-1",
    tenant_name="terraformtest",
    topic="terraformtest",
    region="useast-4",
    cloud_provider="gcp",
    user_email="seb@datastax.com")
cdc_1 = astra.Cdc("cdc-1",
    database_id="5b70892f-e01a-4595-98e6-19ecc9985d50",
    database_name="sai_test",
    table="test",
    keyspace="sai_test",
    topic_partitions=3,
    tenant_name=streaming_tenant_1.tenant_name,
    opts=pulumi.ResourceOptions(depends_on=[streaming_tenant_1]))
import * as pulumi from "@pulumi/pulumi";
import * as astra from "@pulumiverse/astra";

const streamingTenant_1 = new astra.StreamingTenant("streamingTenant-1", {
    tenantName: "terraformtest",
    topic: "terraformtest",
    region: "useast-4",
    cloudProvider: "gcp",
    userEmail: "seb@datastax.com",
});
const cdc_1 = new astra.Cdc("cdc-1", {
    databaseId: "5b70892f-e01a-4595-98e6-19ecc9985d50",
    databaseName: "sai_test",
    table: "test",
    keyspace: "sai_test",
    topicPartitions: 3,
    tenantName: streamingTenant_1.tenantName,
}, {
    dependsOn: [streamingTenant_1],
});
resources:
  streamingTenant-1:
    type: astra:StreamingTenant
    properties:
      tenantName: terraformtest
      topic: terraformtest
      region: useast-4
      cloudProvider: gcp
      userEmail: seb@datastax.com
  cdc-1:
    type: astra:Cdc
    properties:
      databaseId: 5b70892f-e01a-4595-98e6-19ecc9985d50
      databaseName: sai_test
      table: test
      keyspace: sai_test
      topicPartitions: 3
      tenantName: ${["streamingTenant-1"].tenantName}
    options:
      dependson:
        - ${["streamingTenant-1"]}

Create a Cdc Resource

new Cdc(name: string, args: CdcArgs, opts?: CustomResourceOptions);
@overload
def Cdc(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        database_id: Optional[str] = None,
        database_name: Optional[str] = None,
        keyspace: Optional[str] = None,
        table: Optional[str] = None,
        tenant_name: Optional[str] = None,
        topic_partitions: Optional[int] = None)
@overload
def Cdc(resource_name: str,
        args: CdcArgs,
        opts: Optional[ResourceOptions] = None)
func NewCdc(ctx *Context, name string, args CdcArgs, opts ...ResourceOption) (*Cdc, error)
public Cdc(string name, CdcArgs args, CustomResourceOptions? opts = null)
public Cdc(String name, CdcArgs args)
public Cdc(String name, CdcArgs args, CustomResourceOptions options)
type: astra:Cdc
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CdcArgs
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 CdcArgs
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 CdcArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CdcArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CdcArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Cdc Resource Properties

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

Inputs

The Cdc resource accepts the following input properties:

DatabaseId string

Astra database to create the keyspace.

DatabaseName string

Astra database name.

Keyspace string

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

Table string

Astra database table.

TenantName string

Streaming tenant name

TopicPartitions int

Number of partitions in cdc topic.

DatabaseId string

Astra database to create the keyspace.

DatabaseName string

Astra database name.

Keyspace string

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

Table string

Astra database table.

TenantName string

Streaming tenant name

TopicPartitions int

Number of partitions in cdc topic.

databaseId String

Astra database to create the keyspace.

databaseName String

Astra database name.

keyspace String

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

table String

Astra database table.

tenantName String

Streaming tenant name

topicPartitions Integer

Number of partitions in cdc topic.

databaseId string

Astra database to create the keyspace.

databaseName string

Astra database name.

keyspace string

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

table string

Astra database table.

tenantName string

Streaming tenant name

topicPartitions number

Number of partitions in cdc topic.

database_id str

Astra database to create the keyspace.

database_name str

Astra database name.

keyspace str

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

table str

Astra database table.

tenant_name str

Streaming tenant name

topic_partitions int

Number of partitions in cdc topic.

databaseId String

Astra database to create the keyspace.

databaseName String

Astra database name.

keyspace String

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

table String

Astra database table.

tenantName String

Streaming tenant name

topicPartitions Number

Number of partitions in cdc topic.

Outputs

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

ConnectorStatus string

Streaming tenant name

DataTopic string

Streaming tenant name

Id string

The provider-assigned unique ID for this managed resource.

ConnectorStatus string

Streaming tenant name

DataTopic string

Streaming tenant name

Id string

The provider-assigned unique ID for this managed resource.

connectorStatus String

Streaming tenant name

dataTopic String

Streaming tenant name

id String

The provider-assigned unique ID for this managed resource.

connectorStatus string

Streaming tenant name

dataTopic string

Streaming tenant name

id string

The provider-assigned unique ID for this managed resource.

connector_status str

Streaming tenant name

data_topic str

Streaming tenant name

id str

The provider-assigned unique ID for this managed resource.

connectorStatus String

Streaming tenant name

dataTopic String

Streaming tenant name

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing Cdc Resource

Get an existing Cdc 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?: CdcState, opts?: CustomResourceOptions): Cdc
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        connector_status: Optional[str] = None,
        data_topic: Optional[str] = None,
        database_id: Optional[str] = None,
        database_name: Optional[str] = None,
        keyspace: Optional[str] = None,
        table: Optional[str] = None,
        tenant_name: Optional[str] = None,
        topic_partitions: Optional[int] = None) -> Cdc
func GetCdc(ctx *Context, name string, id IDInput, state *CdcState, opts ...ResourceOption) (*Cdc, error)
public static Cdc Get(string name, Input<string> id, CdcState? state, CustomResourceOptions? opts = null)
public static Cdc get(String name, Output<String> id, CdcState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ConnectorStatus string

Streaming tenant name

DataTopic string

Streaming tenant name

DatabaseId string

Astra database to create the keyspace.

DatabaseName string

Astra database name.

Keyspace string

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

Table string

Astra database table.

TenantName string

Streaming tenant name

TopicPartitions int

Number of partitions in cdc topic.

ConnectorStatus string

Streaming tenant name

DataTopic string

Streaming tenant name

DatabaseId string

Astra database to create the keyspace.

DatabaseName string

Astra database name.

Keyspace string

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

Table string

Astra database table.

TenantName string

Streaming tenant name

TopicPartitions int

Number of partitions in cdc topic.

connectorStatus String

Streaming tenant name

dataTopic String

Streaming tenant name

databaseId String

Astra database to create the keyspace.

databaseName String

Astra database name.

keyspace String

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

table String

Astra database table.

tenantName String

Streaming tenant name

topicPartitions Integer

Number of partitions in cdc topic.

connectorStatus string

Streaming tenant name

dataTopic string

Streaming tenant name

databaseId string

Astra database to create the keyspace.

databaseName string

Astra database name.

keyspace string

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

table string

Astra database table.

tenantName string

Streaming tenant name

topicPartitions number

Number of partitions in cdc topic.

connector_status str

Streaming tenant name

data_topic str

Streaming tenant name

database_id str

Astra database to create the keyspace.

database_name str

Astra database name.

keyspace str

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

table str

Astra database table.

tenant_name str

Streaming tenant name

topic_partitions int

Number of partitions in cdc topic.

connectorStatus String

Streaming tenant name

dataTopic String

Streaming tenant name

databaseId String

Astra database to create the keyspace.

databaseName String

Astra database name.

keyspace String

Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.

table String

Astra database table.

tenantName String

Streaming tenant name

topicPartitions Number

Number of partitions in cdc topic.

Import

 $ pulumi import astra:index/cdc:Cdc example databaseId/keyspace/table/tenantName

Package Details

Repository
https://github.com/pulumiverse/pulumi-astra
License
Apache-2.0
Notes

This Pulumi package is based on the astra Terraform Provider.