1. Packages
  2. Astra DB
Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse

Astra DB

astra logo
Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse

    The Astra DB provider for Pulumi can be used to provision any of the cloud resources available in Astra DB. The Astra DB provider must be configured with credentials to deploy and update resources in Astra DB.

    Example

    import * as astra from "@pulumiverse/astra";
    const db = new astra.Database("example", {
        cloudProvider: "azure",
        keyspace: "default",
        regions: ["westus2"],
        name: "example-db"
    });
    
    import pulumiverse_astra as astra
    
    db = astra.Database("example",
        cloud_provider="azure",
        keyspace="default",
        regions=["westus2"],
        name="example-db"
    )
    
    import (
    	"fmt"
    	astra "github.com/pulumiverse/pulumi-astra/sdk/go/astra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    
    		db, err := astra.NewDatabase(ctx, "example", &astra.DatabaseArgs{
                CloudProvider: pulumi.String("azure"),
                Keyspace: pulumi.String("default"),
                Regions: pulumi.StringArray{
                    pulumi.String("westus2")
                },
                Name: pulumi.String("example-db"),
    		})
    		if err != nil {
    			return fmt.Errorf("error creating instance server: %v", err)
    		}
    
    		ctx.Export("dbId", db.Id)
    
    		return nil
    	})
    }
    
    using Pulumi;
    using Pulumiverse.Astra;
    
    class AstraDb : Stack
    {
        public AstraDb()
        {
            var db = new Database("example", new DatabaseArgs{
                CloudProvider: "azure",
                Keyspace: "default",
                Regions: new[] {"westus2"},
                Name: "example-db"
            });
        }
    }
    
    astra logo
    Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse