1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getFlexClusters
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

mongodbatlas.getFlexClusters

Explore with Pulumi AI

# Data Source: mongodbatlas.getFlexClusters

mongodbatlas.getFlexClusters returns all flex clusters in a project.

RECOMMENDATION: We recommend using the mongodbatlas.getAdvancedClusters data source instead of the mongodbatlas.getFlexClusters data source to retrieve Flex clusters. The mongodbatlas.getAdvancedClusters data source not only supports Flex clusters, but also supports free and dedicated clusters, providing easier migration between different cluster types. For more information, see the Advanced Clusters data source.

Example Usage

Using getFlexClusters

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 getFlexClusters(args: GetFlexClustersArgs, opts?: InvokeOptions): Promise<GetFlexClustersResult>
function getFlexClustersOutput(args: GetFlexClustersOutputArgs, opts?: InvokeOptions): Output<GetFlexClustersResult>
Copy
def get_flex_clusters(project_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetFlexClustersResult
def get_flex_clusters_output(project_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetFlexClustersResult]
Copy
func LookupFlexClusters(ctx *Context, args *LookupFlexClustersArgs, opts ...InvokeOption) (*LookupFlexClustersResult, error)
func LookupFlexClustersOutput(ctx *Context, args *LookupFlexClustersOutputArgs, opts ...InvokeOption) LookupFlexClustersResultOutput
Copy

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

public static class GetFlexClusters 
{
    public static Task<GetFlexClustersResult> InvokeAsync(GetFlexClustersArgs args, InvokeOptions? opts = null)
    public static Output<GetFlexClustersResult> Invoke(GetFlexClustersInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetFlexClustersResult> getFlexClusters(GetFlexClustersArgs args, InvokeOptions options)
public static Output<GetFlexClustersResult> getFlexClusters(GetFlexClustersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getFlexClusters:getFlexClusters
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ProjectId This property is required. string
Unique 24-hexadecimal character string that identifies the project.
ProjectId This property is required. string
Unique 24-hexadecimal character string that identifies the project.
projectId This property is required. String
Unique 24-hexadecimal character string that identifies the project.
projectId This property is required. string
Unique 24-hexadecimal character string that identifies the project.
project_id This property is required. str
Unique 24-hexadecimal character string that identifies the project.
projectId This property is required. String
Unique 24-hexadecimal character string that identifies the project.

getFlexClusters Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Unique 24-hexadecimal character string that identifies the project.
Results List<GetFlexClustersResult>
List of documents that MongoDB Cloud returns for this request.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Unique 24-hexadecimal character string that identifies the project.
Results []GetFlexClustersResult
List of documents that MongoDB Cloud returns for this request.
id String
The provider-assigned unique ID for this managed resource.
projectId String
Unique 24-hexadecimal character string that identifies the project.
results List<GetFlexClustersResult>
List of documents that MongoDB Cloud returns for this request.
id string
The provider-assigned unique ID for this managed resource.
projectId string
Unique 24-hexadecimal character string that identifies the project.
results GetFlexClustersResult[]
List of documents that MongoDB Cloud returns for this request.
id str
The provider-assigned unique ID for this managed resource.
project_id str
Unique 24-hexadecimal character string that identifies the project.
results Sequence[GetFlexClustersResult]
List of documents that MongoDB Cloud returns for this request.
id String
The provider-assigned unique ID for this managed resource.
projectId String
Unique 24-hexadecimal character string that identifies the project.
results List<Property Map>
List of documents that MongoDB Cloud returns for this request.

Supporting Types

GetFlexClustersResult

BackupSettings This property is required. GetFlexClustersResultBackupSettings
Flex backup configuration
ClusterType This property is required. string
Flex cluster topology.
ConnectionStrings This property is required. GetFlexClustersResultConnectionStrings
Collection of Uniform Resource Locators that point to the MongoDB database.
CreateDate This property is required. string
Date and time when MongoDB Cloud created this instance. This parameter expresses its value in ISO 8601 format in UTC.
Id This property is required. string
Unique 24-hexadecimal digit string that identifies the instance.
MongoDbVersion This property is required. string
Version of MongoDB that the instance runs.
Name This property is required. string
Human-readable label that identifies the instance.
ProjectId This property is required. string
Unique 24-hexadecimal character string that identifies the project.
ProviderSettings This property is required. GetFlexClustersResultProviderSettings
Group of cloud provider settings that configure the provisioned MongoDB flex cluster.
StateName This property is required. string
Human-readable label that indicates the current operating condition of this instance.
Tags This property is required. Dictionary<string, string>
Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.
TerminationProtectionEnabled This property is required. bool
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
VersionReleaseSystem This property is required. string
Method by which the cluster maintains the MongoDB versions.
BackupSettings This property is required. GetFlexClustersResultBackupSettings
Flex backup configuration
ClusterType This property is required. string
Flex cluster topology.
ConnectionStrings This property is required. GetFlexClustersResultConnectionStrings
Collection of Uniform Resource Locators that point to the MongoDB database.
CreateDate This property is required. string
Date and time when MongoDB Cloud created this instance. This parameter expresses its value in ISO 8601 format in UTC.
Id This property is required. string
Unique 24-hexadecimal digit string that identifies the instance.
MongoDbVersion This property is required. string
Version of MongoDB that the instance runs.
Name This property is required. string
Human-readable label that identifies the instance.
ProjectId This property is required. string
Unique 24-hexadecimal character string that identifies the project.
ProviderSettings This property is required. GetFlexClustersResultProviderSettings
Group of cloud provider settings that configure the provisioned MongoDB flex cluster.
StateName This property is required. string
Human-readable label that indicates the current operating condition of this instance.
Tags This property is required. map[string]string
Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.
TerminationProtectionEnabled This property is required. bool
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
VersionReleaseSystem This property is required. string
Method by which the cluster maintains the MongoDB versions.
backupSettings This property is required. GetFlexClustersResultBackupSettings
Flex backup configuration
clusterType This property is required. String
Flex cluster topology.
connectionStrings This property is required. GetFlexClustersResultConnectionStrings
Collection of Uniform Resource Locators that point to the MongoDB database.
createDate This property is required. String
Date and time when MongoDB Cloud created this instance. This parameter expresses its value in ISO 8601 format in UTC.
id This property is required. String
Unique 24-hexadecimal digit string that identifies the instance.
mongoDbVersion This property is required. String
Version of MongoDB that the instance runs.
name This property is required. String
Human-readable label that identifies the instance.
projectId This property is required. String
Unique 24-hexadecimal character string that identifies the project.
providerSettings This property is required. GetFlexClustersResultProviderSettings
Group of cloud provider settings that configure the provisioned MongoDB flex cluster.
stateName This property is required. String
Human-readable label that indicates the current operating condition of this instance.
tags This property is required. Map<String,String>
Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.
terminationProtectionEnabled This property is required. Boolean
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
versionReleaseSystem This property is required. String
Method by which the cluster maintains the MongoDB versions.
backupSettings This property is required. GetFlexClustersResultBackupSettings
Flex backup configuration
clusterType This property is required. string
Flex cluster topology.
connectionStrings This property is required. GetFlexClustersResultConnectionStrings
Collection of Uniform Resource Locators that point to the MongoDB database.
createDate This property is required. string
Date and time when MongoDB Cloud created this instance. This parameter expresses its value in ISO 8601 format in UTC.
id This property is required. string
Unique 24-hexadecimal digit string that identifies the instance.
mongoDbVersion This property is required. string
Version of MongoDB that the instance runs.
name This property is required. string
Human-readable label that identifies the instance.
projectId This property is required. string
Unique 24-hexadecimal character string that identifies the project.
providerSettings This property is required. GetFlexClustersResultProviderSettings
Group of cloud provider settings that configure the provisioned MongoDB flex cluster.
stateName This property is required. string
Human-readable label that indicates the current operating condition of this instance.
tags This property is required. {[key: string]: string}
Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.
terminationProtectionEnabled This property is required. boolean
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
versionReleaseSystem This property is required. string
Method by which the cluster maintains the MongoDB versions.
backup_settings This property is required. GetFlexClustersResultBackupSettings
Flex backup configuration
cluster_type This property is required. str
Flex cluster topology.
connection_strings This property is required. GetFlexClustersResultConnectionStrings
Collection of Uniform Resource Locators that point to the MongoDB database.
create_date This property is required. str
Date and time when MongoDB Cloud created this instance. This parameter expresses its value in ISO 8601 format in UTC.
id This property is required. str
Unique 24-hexadecimal digit string that identifies the instance.
mongo_db_version This property is required. str
Version of MongoDB that the instance runs.
name This property is required. str
Human-readable label that identifies the instance.
project_id This property is required. str
Unique 24-hexadecimal character string that identifies the project.
provider_settings This property is required. GetFlexClustersResultProviderSettings
Group of cloud provider settings that configure the provisioned MongoDB flex cluster.
state_name This property is required. str
Human-readable label that indicates the current operating condition of this instance.
tags This property is required. Mapping[str, str]
Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.
termination_protection_enabled This property is required. bool
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
version_release_system This property is required. str
Method by which the cluster maintains the MongoDB versions.
backupSettings This property is required. Property Map
Flex backup configuration
clusterType This property is required. String
Flex cluster topology.
connectionStrings This property is required. Property Map
Collection of Uniform Resource Locators that point to the MongoDB database.
createDate This property is required. String
Date and time when MongoDB Cloud created this instance. This parameter expresses its value in ISO 8601 format in UTC.
id This property is required. String
Unique 24-hexadecimal digit string that identifies the instance.
mongoDbVersion This property is required. String
Version of MongoDB that the instance runs.
name This property is required. String
Human-readable label that identifies the instance.
projectId This property is required. String
Unique 24-hexadecimal character string that identifies the project.
providerSettings This property is required. Property Map
Group of cloud provider settings that configure the provisioned MongoDB flex cluster.
stateName This property is required. String
Human-readable label that indicates the current operating condition of this instance.
tags This property is required. Map<String>
Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.
terminationProtectionEnabled This property is required. Boolean
Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
versionReleaseSystem This property is required. String
Method by which the cluster maintains the MongoDB versions.

GetFlexClustersResultBackupSettings

Enabled This property is required. bool
Flag that indicates whether backups are performed for this flex cluster. Backup uses flex cluster backups.
Enabled This property is required. bool
Flag that indicates whether backups are performed for this flex cluster. Backup uses flex cluster backups.
enabled This property is required. Boolean
Flag that indicates whether backups are performed for this flex cluster. Backup uses flex cluster backups.
enabled This property is required. boolean
Flag that indicates whether backups are performed for this flex cluster. Backup uses flex cluster backups.
enabled This property is required. bool
Flag that indicates whether backups are performed for this flex cluster. Backup uses flex cluster backups.
enabled This property is required. Boolean
Flag that indicates whether backups are performed for this flex cluster. Backup uses flex cluster backups.

GetFlexClustersResultConnectionStrings

Standard This property is required. string
Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.
StandardSrv This property is required. string
Public connection string that you can use to connect to this flex cluster. This connection string uses the mongodb+srv:// protocol.
Standard This property is required. string
Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.
StandardSrv This property is required. string
Public connection string that you can use to connect to this flex cluster. This connection string uses the mongodb+srv:// protocol.
standard This property is required. String
Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.
standardSrv This property is required. String
Public connection string that you can use to connect to this flex cluster. This connection string uses the mongodb+srv:// protocol.
standard This property is required. string
Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.
standardSrv This property is required. string
Public connection string that you can use to connect to this flex cluster. This connection string uses the mongodb+srv:// protocol.
standard This property is required. str
Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.
standard_srv This property is required. str
Public connection string that you can use to connect to this flex cluster. This connection string uses the mongodb+srv:// protocol.
standard This property is required. String
Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.
standardSrv This property is required. String
Public connection string that you can use to connect to this flex cluster. This connection string uses the mongodb+srv:// protocol.

GetFlexClustersResultProviderSettings

BackingProviderName This property is required. string
Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
DiskSizeGb This property is required. double
Storage capacity available to the flex cluster expressed in gigabytes.
ProviderName This property is required. string
Human-readable label that identifies the cloud service provider.
RegionName This property is required. string
Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see AWS, GCP, and Azure.
BackingProviderName This property is required. string
Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
DiskSizeGb This property is required. float64
Storage capacity available to the flex cluster expressed in gigabytes.
ProviderName This property is required. string
Human-readable label that identifies the cloud service provider.
RegionName This property is required. string
Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see AWS, GCP, and Azure.
backingProviderName This property is required. String
Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
diskSizeGb This property is required. Double
Storage capacity available to the flex cluster expressed in gigabytes.
providerName This property is required. String
Human-readable label that identifies the cloud service provider.
regionName This property is required. String
Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see AWS, GCP, and Azure.
backingProviderName This property is required. string
Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
diskSizeGb This property is required. number
Storage capacity available to the flex cluster expressed in gigabytes.
providerName This property is required. string
Human-readable label that identifies the cloud service provider.
regionName This property is required. string
Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see AWS, GCP, and Azure.
backing_provider_name This property is required. str
Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
disk_size_gb This property is required. float
Storage capacity available to the flex cluster expressed in gigabytes.
provider_name This property is required. str
Human-readable label that identifies the cloud service provider.
region_name This property is required. str
Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see AWS, GCP, and Azure.
backingProviderName This property is required. String
Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
diskSizeGb This property is required. Number
Storage capacity available to the flex cluster expressed in gigabytes.
providerName This property is required. String
Human-readable label that identifies the cloud service provider.
regionName This property is required. String
Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see AWS, GCP, and Azure.

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.