DigitalOcean v4.35.0 published on Tuesday, Nov 19, 2024 by Pulumi
digitalocean.getDatabaseCluster
Explore with Pulumi AI
Provides information on a DigitalOcean database cluster resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const example = digitalocean.getDatabaseCluster({
name: "example-cluster",
});
export const databaseOutput = example.then(example => example.uri);
import pulumi
import pulumi_digitalocean as digitalocean
example = digitalocean.get_database_cluster(name="example-cluster")
pulumi.export("databaseOutput", example.uri)
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := digitalocean.LookupDatabaseCluster(ctx, &digitalocean.LookupDatabaseClusterArgs{
Name: "example-cluster",
}, nil)
if err != nil {
return err
}
ctx.Export("databaseOutput", example.Uri)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var example = DigitalOcean.GetDatabaseCluster.Invoke(new()
{
Name = "example-cluster",
});
return new Dictionary<string, object?>
{
["databaseOutput"] = example.Apply(getDatabaseClusterResult => getDatabaseClusterResult.Uri),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.DigitaloceanFunctions;
import com.pulumi.digitalocean.inputs.GetDatabaseClusterArgs;
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 = DigitaloceanFunctions.getDatabaseCluster(GetDatabaseClusterArgs.builder()
.name("example-cluster")
.build());
ctx.export("databaseOutput", example.applyValue(getDatabaseClusterResult -> getDatabaseClusterResult.uri()));
}
}
variables:
example:
fn::invoke:
Function: digitalocean:getDatabaseCluster
Arguments:
name: example-cluster
outputs:
databaseOutput: ${example.uri}
Using getDatabaseCluster
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 getDatabaseCluster(args: GetDatabaseClusterArgs, opts?: InvokeOptions): Promise<GetDatabaseClusterResult>
function getDatabaseClusterOutput(args: GetDatabaseClusterOutputArgs, opts?: InvokeOptions): Output<GetDatabaseClusterResult>
def get_database_cluster(name: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabaseClusterResult
def get_database_cluster_output(name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseClusterResult]
func LookupDatabaseCluster(ctx *Context, args *LookupDatabaseClusterArgs, opts ...InvokeOption) (*LookupDatabaseClusterResult, error)
func LookupDatabaseClusterOutput(ctx *Context, args *LookupDatabaseClusterOutputArgs, opts ...InvokeOption) LookupDatabaseClusterResultOutput
> Note: This function is named LookupDatabaseCluster
in the Go SDK.
public static class GetDatabaseCluster
{
public static Task<GetDatabaseClusterResult> InvokeAsync(GetDatabaseClusterArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseClusterResult> Invoke(GetDatabaseClusterInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabaseClusterResult> getDatabaseCluster(GetDatabaseClusterArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: digitalocean:index/getDatabaseCluster:getDatabaseCluster
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the database cluster.
- List<string>
- Name string
- The name of the database cluster.
- []string
- name String
- The name of the database cluster.
- List<String>
- name string
- The name of the database cluster.
- string[]
- name str
- The name of the database cluster.
- Sequence[str]
- name String
- The name of the database cluster.
- List<String>
getDatabaseCluster Result
The following output properties are available:
- Database string
- Name of the cluster's default database.
- Engine string
- Database engine used by the cluster (ex.
pg
for PostgreSQL). - Host string
- Database cluster's hostname.
- Id string
- The provider-assigned unique ID for this managed resource.
- Maintenance
Windows List<Pulumi.Digital Ocean. Outputs. Get Database Cluster Maintenance Window> - Defines when the automatic maintenance should be performed for the database cluster.
- Name string
- Node
Count int - Number of nodes that will be included in the cluster.
- Password string
- Password for the cluster's default user.
- Port int
- Network port that the database cluster is listening on.
- Private
Host string - Same as
host
, but only accessible from resources within the account and in the same region. - Private
Network stringUuid - The ID of the VPC where the database cluster is located.
- Private
Uri string - Same as
uri
, but only accessible from resources within the account and in the same region. - Project
Id string - The ID of the project that the database cluster is assigned to.
- Region string
- DigitalOcean region where the cluster will reside.
- Size string
- Database droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). - Storage
Size stringMib - Ui
Database string - Name of the OpenSearch dashboard db.
- Ui
Host string - Hostname for the OpenSearch dashboard.
- Ui
Password string - Password for the OpenSearch dashboard's default user.
- Ui
Port int - Network port that the OpenSearch dashboard is listening on.
- Ui
Uri string - The full URI for connecting to the OpenSearch dashboard.
- Ui
User string - Username for OpenSearch dashboard's default user.
- Uri string
- The full URI for connecting to the database cluster.
- Urn string
- The uniform resource name of the database cluster.
- User string
- Username for the cluster's default user.
- Version string
- Engine version used by the cluster (ex.
11
for PostgreSQL 11). - List<string>
- Database string
- Name of the cluster's default database.
- Engine string
- Database engine used by the cluster (ex.
pg
for PostgreSQL). - Host string
- Database cluster's hostname.
- Id string
- The provider-assigned unique ID for this managed resource.
- Maintenance
Windows []GetDatabase Cluster Maintenance Window - Defines when the automatic maintenance should be performed for the database cluster.
- Name string
- Node
Count int - Number of nodes that will be included in the cluster.
- Password string
- Password for the cluster's default user.
- Port int
- Network port that the database cluster is listening on.
- Private
Host string - Same as
host
, but only accessible from resources within the account and in the same region. - Private
Network stringUuid - The ID of the VPC where the database cluster is located.
- Private
Uri string - Same as
uri
, but only accessible from resources within the account and in the same region. - Project
Id string - The ID of the project that the database cluster is assigned to.
- Region string
- DigitalOcean region where the cluster will reside.
- Size string
- Database droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). - Storage
Size stringMib - Ui
Database string - Name of the OpenSearch dashboard db.
- Ui
Host string - Hostname for the OpenSearch dashboard.
- Ui
Password string - Password for the OpenSearch dashboard's default user.
- Ui
Port int - Network port that the OpenSearch dashboard is listening on.
- Ui
Uri string - The full URI for connecting to the OpenSearch dashboard.
- Ui
User string - Username for OpenSearch dashboard's default user.
- Uri string
- The full URI for connecting to the database cluster.
- Urn string
- The uniform resource name of the database cluster.
- User string
- Username for the cluster's default user.
- Version string
- Engine version used by the cluster (ex.
11
for PostgreSQL 11). - []string
- database String
- Name of the cluster's default database.
- engine String
- Database engine used by the cluster (ex.
pg
for PostgreSQL). - host String
- Database cluster's hostname.
- id String
- The provider-assigned unique ID for this managed resource.
- maintenance
Windows List<GetDatabase Cluster Maintenance Window> - Defines when the automatic maintenance should be performed for the database cluster.
- name String
- node
Count Integer - Number of nodes that will be included in the cluster.
- password String
- Password for the cluster's default user.
- port Integer
- Network port that the database cluster is listening on.
- private
Host String - Same as
host
, but only accessible from resources within the account and in the same region. - private
Network StringUuid - The ID of the VPC where the database cluster is located.
- private
Uri String - Same as
uri
, but only accessible from resources within the account and in the same region. - project
Id String - The ID of the project that the database cluster is assigned to.
- region String
- DigitalOcean region where the cluster will reside.
- size String
- Database droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). - storage
Size StringMib - ui
Database String - Name of the OpenSearch dashboard db.
- ui
Host String - Hostname for the OpenSearch dashboard.
- ui
Password String - Password for the OpenSearch dashboard's default user.
- ui
Port Integer - Network port that the OpenSearch dashboard is listening on.
- ui
Uri String - The full URI for connecting to the OpenSearch dashboard.
- ui
User String - Username for OpenSearch dashboard's default user.
- uri String
- The full URI for connecting to the database cluster.
- urn String
- The uniform resource name of the database cluster.
- user String
- Username for the cluster's default user.
- version String
- Engine version used by the cluster (ex.
11
for PostgreSQL 11). - List<String>
- database string
- Name of the cluster's default database.
- engine string
- Database engine used by the cluster (ex.
pg
for PostgreSQL). - host string
- Database cluster's hostname.
- id string
- The provider-assigned unique ID for this managed resource.
- maintenance
Windows GetDatabase Cluster Maintenance Window[] - Defines when the automatic maintenance should be performed for the database cluster.
- name string
- node
Count number - Number of nodes that will be included in the cluster.
- password string
- Password for the cluster's default user.
- port number
- Network port that the database cluster is listening on.
- private
Host string - Same as
host
, but only accessible from resources within the account and in the same region. - private
Network stringUuid - The ID of the VPC where the database cluster is located.
- private
Uri string - Same as
uri
, but only accessible from resources within the account and in the same region. - project
Id string - The ID of the project that the database cluster is assigned to.
- region string
- DigitalOcean region where the cluster will reside.
- size string
- Database droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). - storage
Size stringMib - ui
Database string - Name of the OpenSearch dashboard db.
- ui
Host string - Hostname for the OpenSearch dashboard.
- ui
Password string - Password for the OpenSearch dashboard's default user.
- ui
Port number - Network port that the OpenSearch dashboard is listening on.
- ui
Uri string - The full URI for connecting to the OpenSearch dashboard.
- ui
User string - Username for OpenSearch dashboard's default user.
- uri string
- The full URI for connecting to the database cluster.
- urn string
- The uniform resource name of the database cluster.
- user string
- Username for the cluster's default user.
- version string
- Engine version used by the cluster (ex.
11
for PostgreSQL 11). - string[]
- database str
- Name of the cluster's default database.
- engine str
- Database engine used by the cluster (ex.
pg
for PostgreSQL). - host str
- Database cluster's hostname.
- id str
- The provider-assigned unique ID for this managed resource.
- maintenance_
windows Sequence[GetDatabase Cluster Maintenance Window] - Defines when the automatic maintenance should be performed for the database cluster.
- name str
- node_
count int - Number of nodes that will be included in the cluster.
- password str
- Password for the cluster's default user.
- port int
- Network port that the database cluster is listening on.
- private_
host str - Same as
host
, but only accessible from resources within the account and in the same region. - private_
network_ struuid - The ID of the VPC where the database cluster is located.
- private_
uri str - Same as
uri
, but only accessible from resources within the account and in the same region. - project_
id str - The ID of the project that the database cluster is assigned to.
- region str
- DigitalOcean region where the cluster will reside.
- size str
- Database droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). - storage_
size_ strmib - ui_
database str - Name of the OpenSearch dashboard db.
- ui_
host str - Hostname for the OpenSearch dashboard.
- ui_
password str - Password for the OpenSearch dashboard's default user.
- ui_
port int - Network port that the OpenSearch dashboard is listening on.
- ui_
uri str - The full URI for connecting to the OpenSearch dashboard.
- ui_
user str - Username for OpenSearch dashboard's default user.
- uri str
- The full URI for connecting to the database cluster.
- urn str
- The uniform resource name of the database cluster.
- user str
- Username for the cluster's default user.
- version str
- Engine version used by the cluster (ex.
11
for PostgreSQL 11). - Sequence[str]
- database String
- Name of the cluster's default database.
- engine String
- Database engine used by the cluster (ex.
pg
for PostgreSQL). - host String
- Database cluster's hostname.
- id String
- The provider-assigned unique ID for this managed resource.
- maintenance
Windows List<Property Map> - Defines when the automatic maintenance should be performed for the database cluster.
- name String
- node
Count Number - Number of nodes that will be included in the cluster.
- password String
- Password for the cluster's default user.
- port Number
- Network port that the database cluster is listening on.
- private
Host String - Same as
host
, but only accessible from resources within the account and in the same region. - private
Network StringUuid - The ID of the VPC where the database cluster is located.
- private
Uri String - Same as
uri
, but only accessible from resources within the account and in the same region. - project
Id String - The ID of the project that the database cluster is assigned to.
- region String
- DigitalOcean region where the cluster will reside.
- size String
- Database droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). - storage
Size StringMib - ui
Database String - Name of the OpenSearch dashboard db.
- ui
Host String - Hostname for the OpenSearch dashboard.
- ui
Password String - Password for the OpenSearch dashboard's default user.
- ui
Port Number - Network port that the OpenSearch dashboard is listening on.
- ui
Uri String - The full URI for connecting to the OpenSearch dashboard.
- ui
User String - Username for OpenSearch dashboard's default user.
- uri String
- The full URI for connecting to the database cluster.
- urn String
- The uniform resource name of the database cluster.
- user String
- Username for the cluster's default user.
- version String
- Engine version used by the cluster (ex.
11
for PostgreSQL 11). - List<String>
Supporting Types
GetDatabaseClusterMaintenanceWindow
Package Details
- Repository
- DigitalOcean pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitalocean
Terraform Provider.