astra.Database
Explore with Pulumi AI
Import
$ pulumi import astra:index/database:Database example 48bfc13b-c1a5-48db-b70f-b6ef9709872b
Example Usage
using System.Collections.Generic;
using Pulumi;
using Astra = Pulumiverse.Astra;
return await Deployment.RunAsync(() =>
{
var example = new Astra.Database("example", new()
{
CloudProvider = "gcp",
Keyspace = "keyspace",
Regions = new[]
{
"us-east1",
},
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-astra/sdk/go/astra"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := astra.NewDatabase(ctx, "example", &astra.DatabaseArgs{
CloudProvider: pulumi.String("gcp"),
Keyspace: pulumi.String("keyspace"),
Regions: pulumi.StringArray{
pulumi.String("us-east1"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.astra.Database;
import com.pulumi.astra.DatabaseArgs;
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 example = new Database("example", DatabaseArgs.builder()
.cloudProvider("gcp")
.keyspace("keyspace")
.regions("us-east1")
.build());
}
}
import pulumi
import pulumiverse_astra as astra
example = astra.Database("example",
cloud_provider="gcp",
keyspace="keyspace",
regions=["us-east1"])
import * as pulumi from "@pulumi/pulumi";
import * as astra from "@pulumi/astra";
const example = new astra.Database("example", {
cloudProvider: "gcp",
keyspace: "keyspace",
regions: ["us-east1"],
});
resources:
example:
type: astra:Database
properties:
cloudProvider: gcp
keyspace: keyspace
regions:
- us-east1
Create Database Resource
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
opts: Optional[ResourceOptions] = None,
cloud_provider: Optional[str] = None,
deletion_protection: Optional[bool] = None,
keyspace: Optional[str] = None,
name: Optional[str] = None,
regions: Optional[Sequence[str]] = None)
@overload
def Database(resource_name: str,
args: DatabaseArgs,
opts: Optional[ResourceOptions] = None)
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: astra:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseArgs
- 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 DatabaseArgs
- 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 DatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Database 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 Database resource accepts the following input properties:
- Cloud
Provider string The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- Keyspace string
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- Regions List<string>
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- Deletion
Protection bool Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- Name string
Astra database name.
- Cloud
Provider string The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- Keyspace string
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- Regions []string
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- Deletion
Protection bool Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- Name string
Astra database name.
- cloud
Provider String The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- keyspace String
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- regions List<String>
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- deletion
Protection Boolean Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- name String
Astra database name.
- cloud
Provider string The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- keyspace string
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- regions string[]
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- deletion
Protection boolean Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- name string
Astra database name.
- cloud_
provider str The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- keyspace str
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- regions Sequence[str]
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- deletion_
protection bool Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- name str
Astra database name.
- cloud
Provider String The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- keyspace String
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- regions List<String>
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- deletion
Protection Boolean Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- name String
Astra database name.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
- Additional
Keyspaces List<string> Additional keyspaces
- Cqlsh
Url string The cqlsh_url
- Data
Endpoint stringUrl The dataendpointurl
- Datacenters Dictionary<string, string>
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- Grafana
Url string The grafana_url
- Graphql
Url string The graphql_url
- Id string
The provider-assigned unique ID for this managed resource.
- Node
Count int The node_count
- Organization
Id string The org id.
- Owner
Id string The owner id.
- Replication
Factor int The replication_factor
- Status string
The status
- Total
Storage int The total_storage
- Additional
Keyspaces []string Additional keyspaces
- Cqlsh
Url string The cqlsh_url
- Data
Endpoint stringUrl The dataendpointurl
- Datacenters map[string]string
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- Grafana
Url string The grafana_url
- Graphql
Url string The graphql_url
- Id string
The provider-assigned unique ID for this managed resource.
- Node
Count int The node_count
- Organization
Id string The org id.
- Owner
Id string The owner id.
- Replication
Factor int The replication_factor
- Status string
The status
- Total
Storage int The total_storage
- additional
Keyspaces List<String> Additional keyspaces
- cqlsh
Url String The cqlsh_url
- data
Endpoint StringUrl The dataendpointurl
- datacenters Map<String,String>
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- grafana
Url String The grafana_url
- graphql
Url String The graphql_url
- id String
The provider-assigned unique ID for this managed resource.
- node
Count Integer The node_count
- organization
Id String The org id.
- owner
Id String The owner id.
- replication
Factor Integer The replication_factor
- status String
The status
- total
Storage Integer The total_storage
- additional
Keyspaces string[] Additional keyspaces
- cqlsh
Url string The cqlsh_url
- data
Endpoint stringUrl The dataendpointurl
- datacenters {[key: string]: string}
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- grafana
Url string The grafana_url
- graphql
Url string The graphql_url
- id string
The provider-assigned unique ID for this managed resource.
- node
Count number The node_count
- organization
Id string The org id.
- owner
Id string The owner id.
- replication
Factor number The replication_factor
- status string
The status
- total
Storage number The total_storage
- additional_
keyspaces Sequence[str] Additional keyspaces
- cqlsh_
url str The cqlsh_url
- data_
endpoint_ strurl The dataendpointurl
- datacenters Mapping[str, str]
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- grafana_
url str The grafana_url
- graphql_
url str The graphql_url
- id str
The provider-assigned unique ID for this managed resource.
- node_
count int The node_count
- organization_
id str The org id.
- owner_
id str The owner id.
- replication_
factor int The replication_factor
- status str
The status
- total_
storage int The total_storage
- additional
Keyspaces List<String> Additional keyspaces
- cqlsh
Url String The cqlsh_url
- data
Endpoint StringUrl The dataendpointurl
- datacenters Map<String>
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- grafana
Url String The grafana_url
- graphql
Url String The graphql_url
- id String
The provider-assigned unique ID for this managed resource.
- node
Count Number The node_count
- organization
Id String The org id.
- owner
Id String The owner id.
- replication
Factor Number The replication_factor
- status String
The status
- total
Storage Number The total_storage
Look up Existing Database Resource
Get an existing Database 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?: DatabaseState, opts?: CustomResourceOptions): Database
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
additional_keyspaces: Optional[Sequence[str]] = None,
cloud_provider: Optional[str] = None,
cqlsh_url: Optional[str] = None,
data_endpoint_url: Optional[str] = None,
datacenters: Optional[Mapping[str, str]] = None,
deletion_protection: Optional[bool] = None,
grafana_url: Optional[str] = None,
graphql_url: Optional[str] = None,
keyspace: Optional[str] = None,
name: Optional[str] = None,
node_count: Optional[int] = None,
organization_id: Optional[str] = None,
owner_id: Optional[str] = None,
regions: Optional[Sequence[str]] = None,
replication_factor: Optional[int] = None,
status: Optional[str] = None,
total_storage: Optional[int] = None) -> Database
func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
public static Database get(String name, Output<String> id, DatabaseState 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.
- Additional
Keyspaces List<string> Additional keyspaces
- Cloud
Provider string The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- Cqlsh
Url string The cqlsh_url
- Data
Endpoint stringUrl The dataendpointurl
- Datacenters Dictionary<string, string>
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- Deletion
Protection bool Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- Grafana
Url string The grafana_url
- Graphql
Url string The graphql_url
- Keyspace string
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- Name string
Astra database name.
- Node
Count int The node_count
- Organization
Id string The org id.
- Owner
Id string The owner id.
- Regions List<string>
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- Replication
Factor int The replication_factor
- Status string
The status
- Total
Storage int The total_storage
- Additional
Keyspaces []string Additional keyspaces
- Cloud
Provider string The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- Cqlsh
Url string The cqlsh_url
- Data
Endpoint stringUrl The dataendpointurl
- Datacenters map[string]string
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- Deletion
Protection bool Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- Grafana
Url string The grafana_url
- Graphql
Url string The graphql_url
- Keyspace string
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- Name string
Astra database name.
- Node
Count int The node_count
- Organization
Id string The org id.
- Owner
Id string The owner id.
- Regions []string
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- Replication
Factor int The replication_factor
- Status string
The status
- Total
Storage int The total_storage
- additional
Keyspaces List<String> Additional keyspaces
- cloud
Provider String The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- cqlsh
Url String The cqlsh_url
- data
Endpoint StringUrl The dataendpointurl
- datacenters Map<String,String>
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- deletion
Protection Boolean Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- grafana
Url String The grafana_url
- graphql
Url String The graphql_url
- keyspace String
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- name String
Astra database name.
- node
Count Integer The node_count
- organization
Id String The org id.
- owner
Id String The owner id.
- regions List<String>
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- replication
Factor Integer The replication_factor
- status String
The status
- total
Storage Integer The total_storage
- additional
Keyspaces string[] Additional keyspaces
- cloud
Provider string The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- cqlsh
Url string The cqlsh_url
- data
Endpoint stringUrl The dataendpointurl
- datacenters {[key: string]: string}
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- deletion
Protection boolean Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- grafana
Url string The grafana_url
- graphql
Url string The graphql_url
- keyspace string
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- name string
Astra database name.
- node
Count number The node_count
- organization
Id string The org id.
- owner
Id string The owner id.
- regions string[]
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- replication
Factor number The replication_factor
- status string
The status
- total
Storage number The total_storage
- additional_
keyspaces Sequence[str] Additional keyspaces
- cloud_
provider str The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- cqlsh_
url str The cqlsh_url
- data_
endpoint_ strurl The dataendpointurl
- datacenters Mapping[str, str]
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- deletion_
protection bool Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- grafana_
url str The grafana_url
- graphql_
url str The graphql_url
- keyspace str
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- name str
Astra database name.
- node_
count int The node_count
- organization_
id str The org id.
- owner_
id str The owner id.
- regions Sequence[str]
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- replication_
factor int The replication_factor
- status str
The status
- total_
storage int The total_storage
- additional
Keyspaces List<String> Additional keyspaces
- cloud
Provider String The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
- cqlsh
Url String The cqlsh_url
- data
Endpoint StringUrl The dataendpointurl
- datacenters Map<String>
Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
- deletion
Protection Boolean Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a
terraform destroy
orterraform apply
command that deletes the instance will fail. Defaults totrue
.- grafana
Url String The grafana_url
- graphql
Url String The graphql_url
- keyspace String
Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
- name String
Astra database name.
- node
Count Number The node_count
- organization
Id String The org id.
- owner
Id String The owner id.
- regions List<String>
Cloud regions to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
- replication
Factor Number The replication_factor
- status String
The status
- total
Storage Number The total_storage
Package Details
- Repository
- astra pulumiverse/pulumi-astra
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
astra
Terraform Provider.