OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud
ovh.CloudProjectDatabase.getDatabase
Explore with Pulumi AI
Use this data source to get the managed database of a public cloud project.
Example Usage
To get information of a database cluster service:
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const db = ovh.CloudProjectDatabase.getDatabase({
serviceName: "XXXXXX",
engine: "YYYY",
id: "ZZZZ",
});
export const clusterId = db.then(db => db.id);
import pulumi
import pulumi_ovh as ovh
db = ovh.CloudProjectDatabase.get_database(service_name="XXXXXX",
engine="YYYY",
id="ZZZZ")
pulumi.export("clusterId", db.id)
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudprojectdatabase"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
db, err := cloudprojectdatabase.GetDatabase(ctx, &cloudprojectdatabase.GetDatabaseArgs{
ServiceName: "XXXXXX",
Engine: "YYYY",
Id: "ZZZZ",
}, nil)
if err != nil {
return err
}
ctx.Export("clusterId", db.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var db = Ovh.CloudProjectDatabase.GetDatabase.Invoke(new()
{
ServiceName = "XXXXXX",
Engine = "YYYY",
Id = "ZZZZ",
});
return new Dictionary<string, object?>
{
["clusterId"] = db.Apply(getDatabaseResult => getDatabaseResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProjectDatabase.CloudProjectDatabaseFunctions;
import com.pulumi.ovh.CloudProjectDatabase.inputs.GetDatabaseArgs;
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 db = CloudProjectDatabaseFunctions.getDatabase(GetDatabaseArgs.builder()
.serviceName("XXXXXX")
.engine("YYYY")
.id("ZZZZ")
.build());
ctx.export("clusterId", db.id());
}
}
variables:
db:
fn::invoke:
function: ovh:CloudProjectDatabase:getDatabase
arguments:
serviceName: XXXXXX
engine: YYYY
id: ZZZZ
outputs:
clusterId: ${db.id}
Using getDatabase
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 getDatabase(args: GetDatabaseArgs, opts?: InvokeOptions): Promise<GetDatabaseResult>
function getDatabaseOutput(args: GetDatabaseOutputArgs, opts?: InvokeOptions): Output<GetDatabaseResult>
def get_database(engine: Optional[str] = None,
id: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabaseResult
def get_database_output(engine: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseResult]
func GetDatabase(ctx *Context, args *GetDatabaseArgs, opts ...InvokeOption) (*GetDatabaseResult, error)
func GetDatabaseOutput(ctx *Context, args *GetDatabaseOutputArgs, opts ...InvokeOption) GetDatabaseResultOutput
> Note: This function is named GetDatabase
in the Go SDK.
public static class GetDatabase
{
public static Task<GetDatabaseResult> InvokeAsync(GetDatabaseArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseResult> Invoke(GetDatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabaseResult> getDatabase(GetDatabaseArgs args, InvokeOptions options)
public static Output<GetDatabaseResult> getDatabase(GetDatabaseArgs args, InvokeOptions options)
fn::invoke:
function: ovh:CloudProjectDatabase/getDatabase:getDatabase
arguments:
# arguments dictionary
The following arguments are supported:
- Engine
This property is required. string - The database engine you want to get information. To get a full list of available engine visit: public documentation.
- Id
This property is required. string - Cluster ID
- Service
Name This property is required. string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- Engine
This property is required. string - The database engine you want to get information. To get a full list of available engine visit: public documentation.
- Id
This property is required. string - Cluster ID
- Service
Name This property is required. string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- engine
This property is required. String - The database engine you want to get information. To get a full list of available engine visit: public documentation.
- id
This property is required. String - Cluster ID
- service
Name This property is required. String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- engine
This property is required. string - The database engine you want to get information. To get a full list of available engine visit: public documentation.
- id
This property is required. string - Cluster ID
- service
Name This property is required. string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- engine
This property is required. str - The database engine you want to get information. To get a full list of available engine visit: public documentation.
- id
This property is required. str - Cluster ID
- service_
name This property is required. str - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
- engine
This property is required. String - The database engine you want to get information. To get a full list of available engine visit: public documentation.
- id
This property is required. String - Cluster ID
- service
Name This property is required. String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
getDatabase Result
The following output properties are available:
- Advanced
Configuration Dictionary<string, string> - Advanced configuration key / value.
- Backup
Regions List<string> - List of region where backups are pushed.
- Backup
Time string - Time on which backups start every day.
- Created
At string - Date of the creation of the cluster.
- Description string
- Description of the IP restriction
- Disk
Size int - The disk size (in GB) of the database service.
- Disk
Type string - The disk type of the database service.
- Endpoints
List<Get
Database Endpoint> - List of all endpoints objects of the service.
- Engine string
- See Argument Reference above.
- Flavor string
- A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- Id string
- See Argument Reference above.
- Ip
Restrictions List<GetDatabase Ip Restriction> - IP Blocks authorized to access to the cluster.
- Kafka
Rest boolApi - Defines whether the REST API is enabled on a kafka cluster.
- Kafka
Schema boolRegistry - Defines whether the schema registry is enabled on a Kafka cluster
- Maintenance
Time string - Time on which maintenances can start every day.
- Network
Type string - Type of network of the cluster.
- Nodes
List<Get
Database Node> - List of nodes object.
- Opensearch
Acls boolEnabled - Plan string
- Plan of the cluster.
- Service
Name string - See Argument Reference above.
- Status string
- Current status of the cluster.
- Version string
- The version of the engine in which the service should be deployed
- Advanced
Configuration map[string]string - Advanced configuration key / value.
- Backup
Regions []string - List of region where backups are pushed.
- Backup
Time string - Time on which backups start every day.
- Created
At string - Date of the creation of the cluster.
- Description string
- Description of the IP restriction
- Disk
Size int - The disk size (in GB) of the database service.
- Disk
Type string - The disk type of the database service.
- Endpoints
[]Get
Database Endpoint - List of all endpoints objects of the service.
- Engine string
- See Argument Reference above.
- Flavor string
- A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- Id string
- See Argument Reference above.
- Ip
Restrictions []GetDatabase Ip Restriction - IP Blocks authorized to access to the cluster.
- Kafka
Rest boolApi - Defines whether the REST API is enabled on a kafka cluster.
- Kafka
Schema boolRegistry - Defines whether the schema registry is enabled on a Kafka cluster
- Maintenance
Time string - Time on which maintenances can start every day.
- Network
Type string - Type of network of the cluster.
- Nodes
[]Get
Database Node - List of nodes object.
- Opensearch
Acls boolEnabled - Plan string
- Plan of the cluster.
- Service
Name string - See Argument Reference above.
- Status string
- Current status of the cluster.
- Version string
- The version of the engine in which the service should be deployed
- advanced
Configuration Map<String,String> - Advanced configuration key / value.
- backup
Regions List<String> - List of region where backups are pushed.
- backup
Time String - Time on which backups start every day.
- created
At String - Date of the creation of the cluster.
- description String
- Description of the IP restriction
- disk
Size Integer - The disk size (in GB) of the database service.
- disk
Type String - The disk type of the database service.
- endpoints
List<Get
Database Endpoint> - List of all endpoints objects of the service.
- engine String
- See Argument Reference above.
- flavor String
- A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- id String
- See Argument Reference above.
- ip
Restrictions List<GetDatabase Ip Restriction> - IP Blocks authorized to access to the cluster.
- kafka
Rest BooleanApi - Defines whether the REST API is enabled on a kafka cluster.
- kafka
Schema BooleanRegistry - Defines whether the schema registry is enabled on a Kafka cluster
- maintenance
Time String - Time on which maintenances can start every day.
- network
Type String - Type of network of the cluster.
- nodes
List<Get
Database Node> - List of nodes object.
- opensearch
Acls BooleanEnabled - plan String
- Plan of the cluster.
- service
Name String - See Argument Reference above.
- status String
- Current status of the cluster.
- version String
- The version of the engine in which the service should be deployed
- advanced
Configuration {[key: string]: string} - Advanced configuration key / value.
- backup
Regions string[] - List of region where backups are pushed.
- backup
Time string - Time on which backups start every day.
- created
At string - Date of the creation of the cluster.
- description string
- Description of the IP restriction
- disk
Size number - The disk size (in GB) of the database service.
- disk
Type string - The disk type of the database service.
- endpoints
Get
Database Endpoint[] - List of all endpoints objects of the service.
- engine string
- See Argument Reference above.
- flavor string
- A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- id string
- See Argument Reference above.
- ip
Restrictions GetDatabase Ip Restriction[] - IP Blocks authorized to access to the cluster.
- kafka
Rest booleanApi - Defines whether the REST API is enabled on a kafka cluster.
- kafka
Schema booleanRegistry - Defines whether the schema registry is enabled on a Kafka cluster
- maintenance
Time string - Time on which maintenances can start every day.
- network
Type string - Type of network of the cluster.
- nodes
Get
Database Node[] - List of nodes object.
- opensearch
Acls booleanEnabled - plan string
- Plan of the cluster.
- service
Name string - See Argument Reference above.
- status string
- Current status of the cluster.
- version string
- The version of the engine in which the service should be deployed
- advanced_
configuration Mapping[str, str] - Advanced configuration key / value.
- backup_
regions Sequence[str] - List of region where backups are pushed.
- backup_
time str - Time on which backups start every day.
- created_
at str - Date of the creation of the cluster.
- description str
- Description of the IP restriction
- disk_
size int - The disk size (in GB) of the database service.
- disk_
type str - The disk type of the database service.
- endpoints
Sequence[cloudprojectdatabase.
Get Database Endpoint] - List of all endpoints objects of the service.
- engine str
- See Argument Reference above.
- flavor str
- A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- id str
- See Argument Reference above.
- ip_
restrictions Sequence[cloudprojectdatabase.Get Database Ip Restriction] - IP Blocks authorized to access to the cluster.
- kafka_
rest_ boolapi - Defines whether the REST API is enabled on a kafka cluster.
- kafka_
schema_ boolregistry - Defines whether the schema registry is enabled on a Kafka cluster
- maintenance_
time str - Time on which maintenances can start every day.
- network_
type str - Type of network of the cluster.
- nodes
Sequence[cloudprojectdatabase.
Get Database Node] - List of nodes object.
- opensearch_
acls_ boolenabled - plan str
- Plan of the cluster.
- service_
name str - See Argument Reference above.
- status str
- Current status of the cluster.
- version str
- The version of the engine in which the service should be deployed
- advanced
Configuration Map<String> - Advanced configuration key / value.
- backup
Regions List<String> - List of region where backups are pushed.
- backup
Time String - Time on which backups start every day.
- created
At String - Date of the creation of the cluster.
- description String
- Description of the IP restriction
- disk
Size Number - The disk size (in GB) of the database service.
- disk
Type String - The disk type of the database service.
- endpoints List<Property Map>
- List of all endpoints objects of the service.
- engine String
- See Argument Reference above.
- flavor String
- A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- id String
- See Argument Reference above.
- ip
Restrictions List<Property Map> - IP Blocks authorized to access to the cluster.
- kafka
Rest BooleanApi - Defines whether the REST API is enabled on a kafka cluster.
- kafka
Schema BooleanRegistry - Defines whether the schema registry is enabled on a Kafka cluster
- maintenance
Time String - Time on which maintenances can start every day.
- network
Type String - Type of network of the cluster.
- nodes List<Property Map>
- List of nodes object.
- opensearch
Acls BooleanEnabled - plan String
- Plan of the cluster.
- service
Name String - See Argument Reference above.
- status String
- Current status of the cluster.
- version String
- The version of the engine in which the service should be deployed
Supporting Types
GetDatabaseEndpoint
- Component
This property is required. string - Type of component the URI relates to.
- Domain
This property is required. string - Domain of the cluster.
- Path
This property is required. string - Path of the endpoint.
- Port
This property is required. int - Connection port for the endpoint.
- Scheme
This property is required. string - Scheme used to generate the URI.
- Ssl
This property is required. bool - Defines whether the endpoint uses SSL.
- Ssl
Mode This property is required. string - SSL mode used to connect to the service if the SSL is enabled.
- Uri
This property is required. string - URI of the endpoint.
- Component
This property is required. string - Type of component the URI relates to.
- Domain
This property is required. string - Domain of the cluster.
- Path
This property is required. string - Path of the endpoint.
- Port
This property is required. int - Connection port for the endpoint.
- Scheme
This property is required. string - Scheme used to generate the URI.
- Ssl
This property is required. bool - Defines whether the endpoint uses SSL.
- Ssl
Mode This property is required. string - SSL mode used to connect to the service if the SSL is enabled.
- Uri
This property is required. string - URI of the endpoint.
- component
This property is required. String - Type of component the URI relates to.
- domain
This property is required. String - Domain of the cluster.
- path
This property is required. String - Path of the endpoint.
- port
This property is required. Integer - Connection port for the endpoint.
- scheme
This property is required. String - Scheme used to generate the URI.
- ssl
This property is required. Boolean - Defines whether the endpoint uses SSL.
- ssl
Mode This property is required. String - SSL mode used to connect to the service if the SSL is enabled.
- uri
This property is required. String - URI of the endpoint.
- component
This property is required. string - Type of component the URI relates to.
- domain
This property is required. string - Domain of the cluster.
- path
This property is required. string - Path of the endpoint.
- port
This property is required. number - Connection port for the endpoint.
- scheme
This property is required. string - Scheme used to generate the URI.
- ssl
This property is required. boolean - Defines whether the endpoint uses SSL.
- ssl
Mode This property is required. string - SSL mode used to connect to the service if the SSL is enabled.
- uri
This property is required. string - URI of the endpoint.
- component
This property is required. str - Type of component the URI relates to.
- domain
This property is required. str - Domain of the cluster.
- path
This property is required. str - Path of the endpoint.
- port
This property is required. int - Connection port for the endpoint.
- scheme
This property is required. str - Scheme used to generate the URI.
- ssl
This property is required. bool - Defines whether the endpoint uses SSL.
- ssl_
mode This property is required. str - SSL mode used to connect to the service if the SSL is enabled.
- uri
This property is required. str - URI of the endpoint.
- component
This property is required. String - Type of component the URI relates to.
- domain
This property is required. String - Domain of the cluster.
- path
This property is required. String - Path of the endpoint.
- port
This property is required. Number - Connection port for the endpoint.
- scheme
This property is required. String - Scheme used to generate the URI.
- ssl
This property is required. Boolean - Defines whether the endpoint uses SSL.
- ssl
Mode This property is required. String - SSL mode used to connect to the service if the SSL is enabled.
- uri
This property is required. String - URI of the endpoint.
GetDatabaseIpRestriction
- Description
This property is required. string - Description of the IP restriction
- Ip
This property is required. string - Authorized IP
- Status
This property is required. string - Current status of the cluster.
- Description
This property is required. string - Description of the IP restriction
- Ip
This property is required. string - Authorized IP
- Status
This property is required. string - Current status of the cluster.
- description
This property is required. String - Description of the IP restriction
- ip
This property is required. String - Authorized IP
- status
This property is required. String - Current status of the cluster.
- description
This property is required. string - Description of the IP restriction
- ip
This property is required. string - Authorized IP
- status
This property is required. string - Current status of the cluster.
- description
This property is required. str - Description of the IP restriction
- ip
This property is required. str - Authorized IP
- status
This property is required. str - Current status of the cluster.
- description
This property is required. String - Description of the IP restriction
- ip
This property is required. String - Authorized IP
- status
This property is required. String - Current status of the cluster.
GetDatabaseNode
- Network
Id This property is required. string - Private network id in which the node should be deployed. It's the regional openstackId of the private network
- Region
This property is required. string - Public cloud region in which the node should be deployed.
- Subnet
Id This property is required. string - Private subnet ID in which the node is.
- Network
Id This property is required. string - Private network id in which the node should be deployed. It's the regional openstackId of the private network
- Region
This property is required. string - Public cloud region in which the node should be deployed.
- Subnet
Id This property is required. string - Private subnet ID in which the node is.
- network
Id This property is required. String - Private network id in which the node should be deployed. It's the regional openstackId of the private network
- region
This property is required. String - Public cloud region in which the node should be deployed.
- subnet
Id This property is required. String - Private subnet ID in which the node is.
- network
Id This property is required. string - Private network id in which the node should be deployed. It's the regional openstackId of the private network
- region
This property is required. string - Public cloud region in which the node should be deployed.
- subnet
Id This property is required. string - Private subnet ID in which the node is.
- network_
id This property is required. str - Private network id in which the node should be deployed. It's the regional openstackId of the private network
- region
This property is required. str - Public cloud region in which the node should be deployed.
- subnet_
id This property is required. str - Private subnet ID in which the node is.
- network
Id This property is required. String - Private network id in which the node should be deployed. It's the regional openstackId of the private network
- region
This property is required. String - Public cloud region in which the node should be deployed.
- subnet
Id This property is required. String - Private subnet ID in which the node is.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.