1. Packages
  2. Ionoscloud
  3. API Docs
  4. dbaas
  5. getMongoCluster
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

ionoscloud.dbaas.getMongoCluster

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

    The DbaaS Mongo Cluster data source can be used to search for and return an existing DbaaS MongoDB Cluster. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

    Example Usage

    By ID

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.dbaas.getMongoCluster({
        id: "cluster_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.dbaas.get_mongo_cluster(id="cluster_id")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/dbaas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dbaas.LookupMongoCluster(ctx, &dbaas.LookupMongoClusterArgs{
    			Id: pulumi.StringRef("cluster_id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Dbaas.GetMongoCluster.Invoke(new()
        {
            Id = "cluster_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.dbaas.DbaasFunctions;
    import com.pulumi.ionoscloud.dbaas.inputs.GetMongoClusterArgs;
    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 = DbaasFunctions.getMongoCluster(GetMongoClusterArgs.builder()
                .id("cluster_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:dbaas:getMongoCluster
          arguments:
            id: cluster_id
    

    By display_name

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.dbaas.getMongoCluster({
        displayName: "display_name",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.dbaas.get_mongo_cluster(display_name="display_name")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/dbaas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dbaas.LookupMongoCluster(ctx, &dbaas.LookupMongoClusterArgs{
    			DisplayName: pulumi.StringRef("display_name"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Dbaas.GetMongoCluster.Invoke(new()
        {
            DisplayName = "display_name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.dbaas.DbaasFunctions;
    import com.pulumi.ionoscloud.dbaas.inputs.GetMongoClusterArgs;
    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 = DbaasFunctions.getMongoCluster(GetMongoClusterArgs.builder()
                .displayName("display_name")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:dbaas:getMongoCluster
          arguments:
            displayName: display_name
    
    • display_name - (Optional) Display Name of an existing cluster that you want to search for.
    • id - (Optional) ID of the cluster you want to search for.

    Either display_name or id must be provided. If none, or both are provided, the datasource will return an error.

    Using getMongoCluster

    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 getMongoCluster(args: GetMongoClusterArgs, opts?: InvokeOptions): Promise<GetMongoClusterResult>
    function getMongoClusterOutput(args: GetMongoClusterOutputArgs, opts?: InvokeOptions): Output<GetMongoClusterResult>
    def get_mongo_cluster(display_name: Optional[str] = None,
                          id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetMongoClusterResult
    def get_mongo_cluster_output(display_name: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetMongoClusterResult]
    func LookupMongoCluster(ctx *Context, args *LookupMongoClusterArgs, opts ...InvokeOption) (*LookupMongoClusterResult, error)
    func LookupMongoClusterOutput(ctx *Context, args *LookupMongoClusterOutputArgs, opts ...InvokeOption) LookupMongoClusterResultOutput

    > Note: This function is named LookupMongoCluster in the Go SDK.

    public static class GetMongoCluster 
    {
        public static Task<GetMongoClusterResult> InvokeAsync(GetMongoClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetMongoClusterResult> Invoke(GetMongoClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMongoClusterResult> getMongoCluster(GetMongoClusterArgs args, InvokeOptions options)
    public static Output<GetMongoClusterResult> getMongoCluster(GetMongoClusterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:dbaas/getMongoCluster:getMongoCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DisplayName string
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    Id string
    DisplayName string
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    Id string
    displayName String
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    id String
    displayName string
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    id string
    display_name str
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    id str
    displayName String
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    id String

    getMongoCluster Result

    The following output properties are available:

    Backups List<Ionoscloud.GetMongoClusterBackup>
    BiConnectors List<Ionoscloud.GetMongoClusterBiConnector>
    ConnectionString string
    The physical location where the cluster will be created. This will be where all of your instances live. Updates to the value of the field force the cluster to be re-created. Available locations: de/txl, gb/lhr, es/vit"
    Connections List<Ionoscloud.GetMongoClusterConnection>
    Details about the network connection for your cluster. Updates to the value of the field force the cluster to be re-created.
    Cores int
    The number of CPU cores per replica. Required for enterprise edition.
    DisplayName string
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    Edition string
    Cluster edition. Playground, business or enterprise.
    Id string
    Instances int
    The total number of instances in the cluster (one master and n-1 standbys). Example: 3, 5, 7. Updates to the value of the field force the cluster to be re-created.
    Location string
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    MaintenanceWindows List<Ionoscloud.GetMongoClusterMaintenanceWindow>
    A weekly 4 hour-long window, during which maintenance might occur. Updates to the value of the field force the cluster to be re-created.
    MongodbVersion string
    The MongoDB version of your cluster. Updates to the value of the field force the cluster to be re-created.
    Ram int
    The amount of memory per instance in megabytes. Required for enterprise edition.
    Shards int
    StorageSize int
    The amount of storage per instance in MB. Required for enterprise edition.
    StorageType string
    The storage type used in your cluster. Required for enterprise edition.
    TemplateId string
    The unique ID of the template, which specifies the number of cores, storage size, and memory. Updates to the value of the field force the cluster to be re-created.
    Type string
    Backups []GetMongoClusterBackup
    BiConnectors []GetMongoClusterBiConnector
    ConnectionString string
    The physical location where the cluster will be created. This will be where all of your instances live. Updates to the value of the field force the cluster to be re-created. Available locations: de/txl, gb/lhr, es/vit"
    Connections []GetMongoClusterConnection
    Details about the network connection for your cluster. Updates to the value of the field force the cluster to be re-created.
    Cores int
    The number of CPU cores per replica. Required for enterprise edition.
    DisplayName string
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    Edition string
    Cluster edition. Playground, business or enterprise.
    Id string
    Instances int
    The total number of instances in the cluster (one master and n-1 standbys). Example: 3, 5, 7. Updates to the value of the field force the cluster to be re-created.
    Location string
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    MaintenanceWindows []GetMongoClusterMaintenanceWindow
    A weekly 4 hour-long window, during which maintenance might occur. Updates to the value of the field force the cluster to be re-created.
    MongodbVersion string
    The MongoDB version of your cluster. Updates to the value of the field force the cluster to be re-created.
    Ram int
    The amount of memory per instance in megabytes. Required for enterprise edition.
    Shards int
    StorageSize int
    The amount of storage per instance in MB. Required for enterprise edition.
    StorageType string
    The storage type used in your cluster. Required for enterprise edition.
    TemplateId string
    The unique ID of the template, which specifies the number of cores, storage size, and memory. Updates to the value of the field force the cluster to be re-created.
    Type string
    backups List<GetMongoClusterBackup>
    biConnectors List<GetMongoClusterBiConnector>
    connectionString String
    The physical location where the cluster will be created. This will be where all of your instances live. Updates to the value of the field force the cluster to be re-created. Available locations: de/txl, gb/lhr, es/vit"
    connections List<GetMongoClusterConnection>
    Details about the network connection for your cluster. Updates to the value of the field force the cluster to be re-created.
    cores Integer
    The number of CPU cores per replica. Required for enterprise edition.
    displayName String
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    edition String
    Cluster edition. Playground, business or enterprise.
    id String
    instances Integer
    The total number of instances in the cluster (one master and n-1 standbys). Example: 3, 5, 7. Updates to the value of the field force the cluster to be re-created.
    location String
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    maintenanceWindows List<GetMongoClusterMaintenanceWindow>
    A weekly 4 hour-long window, during which maintenance might occur. Updates to the value of the field force the cluster to be re-created.
    mongodbVersion String
    The MongoDB version of your cluster. Updates to the value of the field force the cluster to be re-created.
    ram Integer
    The amount of memory per instance in megabytes. Required for enterprise edition.
    shards Integer
    storageSize Integer
    The amount of storage per instance in MB. Required for enterprise edition.
    storageType String
    The storage type used in your cluster. Required for enterprise edition.
    templateId String
    The unique ID of the template, which specifies the number of cores, storage size, and memory. Updates to the value of the field force the cluster to be re-created.
    type String
    backups GetMongoClusterBackup[]
    biConnectors GetMongoClusterBiConnector[]
    connectionString string
    The physical location where the cluster will be created. This will be where all of your instances live. Updates to the value of the field force the cluster to be re-created. Available locations: de/txl, gb/lhr, es/vit"
    connections GetMongoClusterConnection[]
    Details about the network connection for your cluster. Updates to the value of the field force the cluster to be re-created.
    cores number
    The number of CPU cores per replica. Required for enterprise edition.
    displayName string
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    edition string
    Cluster edition. Playground, business or enterprise.
    id string
    instances number
    The total number of instances in the cluster (one master and n-1 standbys). Example: 3, 5, 7. Updates to the value of the field force the cluster to be re-created.
    location string
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    maintenanceWindows GetMongoClusterMaintenanceWindow[]
    A weekly 4 hour-long window, during which maintenance might occur. Updates to the value of the field force the cluster to be re-created.
    mongodbVersion string
    The MongoDB version of your cluster. Updates to the value of the field force the cluster to be re-created.
    ram number
    The amount of memory per instance in megabytes. Required for enterprise edition.
    shards number
    storageSize number
    The amount of storage per instance in MB. Required for enterprise edition.
    storageType string
    The storage type used in your cluster. Required for enterprise edition.
    templateId string
    The unique ID of the template, which specifies the number of cores, storage size, and memory. Updates to the value of the field force the cluster to be re-created.
    type string
    backups Sequence[GetMongoClusterBackup]
    bi_connectors Sequence[GetMongoClusterBiConnector]
    connection_string str
    The physical location where the cluster will be created. This will be where all of your instances live. Updates to the value of the field force the cluster to be re-created. Available locations: de/txl, gb/lhr, es/vit"
    connections Sequence[GetMongoClusterConnection]
    Details about the network connection for your cluster. Updates to the value of the field force the cluster to be re-created.
    cores int
    The number of CPU cores per replica. Required for enterprise edition.
    display_name str
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    edition str
    Cluster edition. Playground, business or enterprise.
    id str
    instances int
    The total number of instances in the cluster (one master and n-1 standbys). Example: 3, 5, 7. Updates to the value of the field force the cluster to be re-created.
    location str
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    maintenance_windows Sequence[GetMongoClusterMaintenanceWindow]
    A weekly 4 hour-long window, during which maintenance might occur. Updates to the value of the field force the cluster to be re-created.
    mongodb_version str
    The MongoDB version of your cluster. Updates to the value of the field force the cluster to be re-created.
    ram int
    The amount of memory per instance in megabytes. Required for enterprise edition.
    shards int
    storage_size int
    The amount of storage per instance in MB. Required for enterprise edition.
    storage_type str
    The storage type used in your cluster. Required for enterprise edition.
    template_id str
    The unique ID of the template, which specifies the number of cores, storage size, and memory. Updates to the value of the field force the cluster to be re-created.
    type str
    backups List<Property Map>
    biConnectors List<Property Map>
    connectionString String
    The physical location where the cluster will be created. This will be where all of your instances live. Updates to the value of the field force the cluster to be re-created. Available locations: de/txl, gb/lhr, es/vit"
    connections List<Property Map>
    Details about the network connection for your cluster. Updates to the value of the field force the cluster to be re-created.
    cores Number
    The number of CPU cores per replica. Required for enterprise edition.
    displayName String
    The name of your cluster. Updates to the value of the field force the cluster to be re-created.
    edition String
    Cluster edition. Playground, business or enterprise.
    id String
    instances Number
    The total number of instances in the cluster (one master and n-1 standbys). Example: 3, 5, 7. Updates to the value of the field force the cluster to be re-created.
    location String
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    maintenanceWindows List<Property Map>
    A weekly 4 hour-long window, during which maintenance might occur. Updates to the value of the field force the cluster to be re-created.
    mongodbVersion String
    The MongoDB version of your cluster. Updates to the value of the field force the cluster to be re-created.
    ram Number
    The amount of memory per instance in megabytes. Required for enterprise edition.
    shards Number
    storageSize Number
    The amount of storage per instance in MB. Required for enterprise edition.
    storageType String
    The storage type used in your cluster. Required for enterprise edition.
    templateId String
    The unique ID of the template, which specifies the number of cores, storage size, and memory. Updates to the value of the field force the cluster to be re-created.
    type String

    Supporting Types

    GetMongoClusterBackup

    Location string
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    Location string
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    location String
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    location string
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    location str
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.
    location String
    The location where the cluster backups will be stored. If not set, the backup is stored in the nearest location of the cluster. Possible values are de, eu-south-2, or eu-central-2.

    GetMongoClusterBiConnector

    Enabled bool
    Enable or disable the BiConnector
    Host string
    The host where this new BI Connector is installed
    Port string
    Port number used when connecting to this new BI Connector
    Enabled bool
    Enable or disable the BiConnector
    Host string
    The host where this new BI Connector is installed
    Port string
    Port number used when connecting to this new BI Connector
    enabled Boolean
    Enable or disable the BiConnector
    host String
    The host where this new BI Connector is installed
    port String
    Port number used when connecting to this new BI Connector
    enabled boolean
    Enable or disable the BiConnector
    host string
    The host where this new BI Connector is installed
    port string
    Port number used when connecting to this new BI Connector
    enabled bool
    Enable or disable the BiConnector
    host str
    The host where this new BI Connector is installed
    port str
    Port number used when connecting to this new BI Connector
    enabled Boolean
    Enable or disable the BiConnector
    host String
    The host where this new BI Connector is installed
    port String
    Port number used when connecting to this new BI Connector

    GetMongoClusterConnection

    CidrLists List<string>
    The list of IPs and subnet for your cluster. Note the following unavailable IP ranges: 10.233.64.0/18 10.233.0.0/18 10.233.114.0/24 example: [192.168.1.100/24, 192.168.1.101/24]
    DatacenterId string
    The datacenter to connect your cluster to.
    LanId string
    The LAN to connect your cluster to.
    CidrLists []string
    The list of IPs and subnet for your cluster. Note the following unavailable IP ranges: 10.233.64.0/18 10.233.0.0/18 10.233.114.0/24 example: [192.168.1.100/24, 192.168.1.101/24]
    DatacenterId string
    The datacenter to connect your cluster to.
    LanId string
    The LAN to connect your cluster to.
    cidrLists List<String>
    The list of IPs and subnet for your cluster. Note the following unavailable IP ranges: 10.233.64.0/18 10.233.0.0/18 10.233.114.0/24 example: [192.168.1.100/24, 192.168.1.101/24]
    datacenterId String
    The datacenter to connect your cluster to.
    lanId String
    The LAN to connect your cluster to.
    cidrLists string[]
    The list of IPs and subnet for your cluster. Note the following unavailable IP ranges: 10.233.64.0/18 10.233.0.0/18 10.233.114.0/24 example: [192.168.1.100/24, 192.168.1.101/24]
    datacenterId string
    The datacenter to connect your cluster to.
    lanId string
    The LAN to connect your cluster to.
    cidr_lists Sequence[str]
    The list of IPs and subnet for your cluster. Note the following unavailable IP ranges: 10.233.64.0/18 10.233.0.0/18 10.233.114.0/24 example: [192.168.1.100/24, 192.168.1.101/24]
    datacenter_id str
    The datacenter to connect your cluster to.
    lan_id str
    The LAN to connect your cluster to.
    cidrLists List<String>
    The list of IPs and subnet for your cluster. Note the following unavailable IP ranges: 10.233.64.0/18 10.233.0.0/18 10.233.114.0/24 example: [192.168.1.100/24, 192.168.1.101/24]
    datacenterId String
    The datacenter to connect your cluster to.
    lanId String
    The LAN to connect your cluster to.

    GetMongoClusterMaintenanceWindow

    DayOfTheWeek string
    Time string
    DayOfTheWeek string
    Time string
    dayOfTheWeek String
    time String
    dayOfTheWeek string
    time string
    dayOfTheWeek String
    time String

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud