mongodbatlas logo
MongoDB Atlas v3.7.2, Mar 31 23

mongodbatlas.GlobalClusterConfig

Explore with Pulumi AI

mongodbatlas.GlobalClusterConfig provides a Global Cluster Configuration resource.

NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.

Examples Usage

Example Global cluster

import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.Cluster("test", {
    projectId: "<YOUR-PROJECT-ID>",
    diskSizeGb: 80,
    cloudBackup: true,
    clusterType: "GEOSHARDED",
    providerName: "AWS",
    providerInstanceSizeName: "M30",
    replicationSpecs: [
        {
            zoneName: "Zone 1",
            numShards: 1,
            regionsConfigs: [{
                regionName: "EU_CENTRAL_1",
                electableNodes: 3,
                priority: 7,
                readOnlyNodes: 0,
            }],
        },
        {
            zoneName: "Zone 2",
            numShards: 1,
            regionsConfigs: [{
                regionName: "US_EAST_2",
                electableNodes: 3,
                priority: 7,
                readOnlyNodes: 0,
            }],
        },
    ],
});
const config = new mongodbatlas.GlobalClusterConfig("config", {
    projectId: test.projectId,
    clusterName: test.name,
    managedNamespaces: [{
        db: "mydata",
        collection: "publishers",
        customShardKey: "city",
        isCustomShardKeyHashed: false,
        isShardKeyUnique: false,
    }],
    customZoneMappings: [{
        location: "CA",
        zone: "Zone 1",
    }],
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas

test = mongodbatlas.Cluster("test",
    project_id="<YOUR-PROJECT-ID>",
    disk_size_gb=80,
    cloud_backup=True,
    cluster_type="GEOSHARDED",
    provider_name="AWS",
    provider_instance_size_name="M30",
    replication_specs=[
        mongodbatlas.ClusterReplicationSpecArgs(
            zone_name="Zone 1",
            num_shards=1,
            regions_configs=[mongodbatlas.ClusterReplicationSpecRegionsConfigArgs(
                region_name="EU_CENTRAL_1",
                electable_nodes=3,
                priority=7,
                read_only_nodes=0,
            )],
        ),
        mongodbatlas.ClusterReplicationSpecArgs(
            zone_name="Zone 2",
            num_shards=1,
            regions_configs=[mongodbatlas.ClusterReplicationSpecRegionsConfigArgs(
                region_name="US_EAST_2",
                electable_nodes=3,
                priority=7,
                read_only_nodes=0,
            )],
        ),
    ])
config = mongodbatlas.GlobalClusterConfig("config",
    project_id=test.project_id,
    cluster_name=test.name,
    managed_namespaces=[mongodbatlas.GlobalClusterConfigManagedNamespaceArgs(
        db="mydata",
        collection="publishers",
        custom_shard_key="city",
        is_custom_shard_key_hashed=False,
        is_shard_key_unique=False,
    )],
    custom_zone_mappings=[mongodbatlas.GlobalClusterConfigCustomZoneMappingArgs(
        location="CA",
        zone="Zone 1",
    )])
using System.Collections.Generic;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var test = new Mongodbatlas.Cluster("test", new()
    {
        ProjectId = "<YOUR-PROJECT-ID>",
        DiskSizeGb = 80,
        CloudBackup = true,
        ClusterType = "GEOSHARDED",
        ProviderName = "AWS",
        ProviderInstanceSizeName = "M30",
        ReplicationSpecs = new[]
        {
            new Mongodbatlas.Inputs.ClusterReplicationSpecArgs
            {
                ZoneName = "Zone 1",
                NumShards = 1,
                RegionsConfigs = new[]
                {
                    new Mongodbatlas.Inputs.ClusterReplicationSpecRegionsConfigArgs
                    {
                        RegionName = "EU_CENTRAL_1",
                        ElectableNodes = 3,
                        Priority = 7,
                        ReadOnlyNodes = 0,
                    },
                },
            },
            new Mongodbatlas.Inputs.ClusterReplicationSpecArgs
            {
                ZoneName = "Zone 2",
                NumShards = 1,
                RegionsConfigs = new[]
                {
                    new Mongodbatlas.Inputs.ClusterReplicationSpecRegionsConfigArgs
                    {
                        RegionName = "US_EAST_2",
                        ElectableNodes = 3,
                        Priority = 7,
                        ReadOnlyNodes = 0,
                    },
                },
            },
        },
    });

    var config = new Mongodbatlas.GlobalClusterConfig("config", new()
    {
        ProjectId = test.ProjectId,
        ClusterName = test.Name,
        ManagedNamespaces = new[]
        {
            new Mongodbatlas.Inputs.GlobalClusterConfigManagedNamespaceArgs
            {
                Db = "mydata",
                Collection = "publishers",
                CustomShardKey = "city",
                IsCustomShardKeyHashed = false,
                IsShardKeyUnique = false,
            },
        },
        CustomZoneMappings = new[]
        {
            new Mongodbatlas.Inputs.GlobalClusterConfigCustomZoneMappingArgs
            {
                Location = "CA",
                Zone = "Zone 1",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test, err := mongodbatlas.NewCluster(ctx, "test", &mongodbatlas.ClusterArgs{
			ProjectId:                pulumi.String("<YOUR-PROJECT-ID>"),
			DiskSizeGb:               pulumi.Float64(80),
			CloudBackup:              pulumi.Bool(true),
			ClusterType:              pulumi.String("GEOSHARDED"),
			ProviderName:             pulumi.String("AWS"),
			ProviderInstanceSizeName: pulumi.String("M30"),
			ReplicationSpecs: mongodbatlas.ClusterReplicationSpecArray{
				&mongodbatlas.ClusterReplicationSpecArgs{
					ZoneName:  pulumi.String("Zone 1"),
					NumShards: pulumi.Int(1),
					RegionsConfigs: mongodbatlas.ClusterReplicationSpecRegionsConfigArray{
						&mongodbatlas.ClusterReplicationSpecRegionsConfigArgs{
							RegionName:     pulumi.String("EU_CENTRAL_1"),
							ElectableNodes: pulumi.Int(3),
							Priority:       pulumi.Int(7),
							ReadOnlyNodes:  pulumi.Int(0),
						},
					},
				},
				&mongodbatlas.ClusterReplicationSpecArgs{
					ZoneName:  pulumi.String("Zone 2"),
					NumShards: pulumi.Int(1),
					RegionsConfigs: mongodbatlas.ClusterReplicationSpecRegionsConfigArray{
						&mongodbatlas.ClusterReplicationSpecRegionsConfigArgs{
							RegionName:     pulumi.String("US_EAST_2"),
							ElectableNodes: pulumi.Int(3),
							Priority:       pulumi.Int(7),
							ReadOnlyNodes:  pulumi.Int(0),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = mongodbatlas.NewGlobalClusterConfig(ctx, "config", &mongodbatlas.GlobalClusterConfigArgs{
			ProjectId:   test.ProjectId,
			ClusterName: test.Name,
			ManagedNamespaces: mongodbatlas.GlobalClusterConfigManagedNamespaceArray{
				&mongodbatlas.GlobalClusterConfigManagedNamespaceArgs{
					Db:                     pulumi.String("mydata"),
					Collection:             pulumi.String("publishers"),
					CustomShardKey:         pulumi.String("city"),
					IsCustomShardKeyHashed: pulumi.Bool(false),
					IsShardKeyUnique:       pulumi.Bool(false),
				},
			},
			CustomZoneMappings: mongodbatlas.GlobalClusterConfigCustomZoneMappingArray{
				&mongodbatlas.GlobalClusterConfigCustomZoneMappingArgs{
					Location: pulumi.String("CA"),
					Zone:     pulumi.String("Zone 1"),
				},
			},
		})
		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.mongodbatlas.Cluster;
import com.pulumi.mongodbatlas.ClusterArgs;
import com.pulumi.mongodbatlas.inputs.ClusterReplicationSpecArgs;
import com.pulumi.mongodbatlas.GlobalClusterConfig;
import com.pulumi.mongodbatlas.GlobalClusterConfigArgs;
import com.pulumi.mongodbatlas.inputs.GlobalClusterConfigManagedNamespaceArgs;
import com.pulumi.mongodbatlas.inputs.GlobalClusterConfigCustomZoneMappingArgs;
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 test = new Cluster("test", ClusterArgs.builder()        
            .projectId("<YOUR-PROJECT-ID>")
            .diskSizeGb(80)
            .cloudBackup(true)
            .clusterType("GEOSHARDED")
            .providerName("AWS")
            .providerInstanceSizeName("M30")
            .replicationSpecs(            
                ClusterReplicationSpecArgs.builder()
                    .zoneName("Zone 1")
                    .numShards(1)
                    .regionsConfigs(ClusterReplicationSpecRegionsConfigArgs.builder()
                        .regionName("EU_CENTRAL_1")
                        .electableNodes(3)
                        .priority(7)
                        .readOnlyNodes(0)
                        .build())
                    .build(),
                ClusterReplicationSpecArgs.builder()
                    .zoneName("Zone 2")
                    .numShards(1)
                    .regionsConfigs(ClusterReplicationSpecRegionsConfigArgs.builder()
                        .regionName("US_EAST_2")
                        .electableNodes(3)
                        .priority(7)
                        .readOnlyNodes(0)
                        .build())
                    .build())
            .build());

        var config = new GlobalClusterConfig("config", GlobalClusterConfigArgs.builder()        
            .projectId(test.projectId())
            .clusterName(test.name())
            .managedNamespaces(GlobalClusterConfigManagedNamespaceArgs.builder()
                .db("mydata")
                .collection("publishers")
                .customShardKey("city")
                .isCustomShardKeyHashed(false)
                .isShardKeyUnique(false)
                .build())
            .customZoneMappings(GlobalClusterConfigCustomZoneMappingArgs.builder()
                .location("CA")
                .zone("Zone 1")
                .build())
            .build());

    }
}
resources:
  test:
    type: mongodbatlas:Cluster
    properties:
      projectId: <YOUR-PROJECT-ID>
      diskSizeGb: 80
      cloudBackup: true
      clusterType: GEOSHARDED
      # Provider Settings "block"
      providerName: AWS
      providerInstanceSizeName: M30
      replicationSpecs:
        - zoneName: Zone 1
          numShards: 1
          regionsConfigs:
            - regionName: EU_CENTRAL_1
              electableNodes: 3
              priority: 7
              readOnlyNodes: 0
        - zoneName: Zone 2
          numShards: 1
          regionsConfigs:
            - regionName: US_EAST_2
              electableNodes: 3
              priority: 7
              readOnlyNodes: 0
  config:
    type: mongodbatlas:GlobalClusterConfig
    properties:
      projectId: ${test.projectId}
      clusterName: ${test.name}
      managedNamespaces:
        - db: mydata
          collection: publishers
          customShardKey: city
          isCustomShardKeyHashed: false
          isShardKeyUnique: false
      customZoneMappings:
        - location: CA
          zone: Zone 1

Example Global cluster config

import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const cluster_test = new mongodbatlas.Cluster("cluster-test", {
    projectId: "<YOUR-PROJECT-ID>",
    clusterType: "REPLICASET",
    replicationSpecs: [{
        numShards: 1,
        regionsConfigs: [{
            regionName: "US_EAST_1",
            electableNodes: 3,
            priority: 7,
            readOnlyNodes: 0,
        }],
    }],
    backupEnabled: true,
    autoScalingDiskGbEnabled: true,
    mongoDbMajorVersion: "4.0",
    providerName: "AWS",
    diskSizeGb: 100,
    providerInstanceSizeName: "M40",
});
const config = new mongodbatlas.GlobalClusterConfig("config", {
    projectId: mongodbatlas_cluster.test.project_id,
    clusterName: mongodbatlas_cluster.test.name,
    managedNamespaces: [{
        db: "mydata",
        collection: "publishers",
        customShardKey: "city",
    }],
    customZoneMappings: [{
        location: "CA",
        zone: "Zone 1",
    }],
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas

cluster_test = mongodbatlas.Cluster("cluster-test",
    project_id="<YOUR-PROJECT-ID>",
    cluster_type="REPLICASET",
    replication_specs=[mongodbatlas.ClusterReplicationSpecArgs(
        num_shards=1,
        regions_configs=[mongodbatlas.ClusterReplicationSpecRegionsConfigArgs(
            region_name="US_EAST_1",
            electable_nodes=3,
            priority=7,
            read_only_nodes=0,
        )],
    )],
    backup_enabled=True,
    auto_scaling_disk_gb_enabled=True,
    mongo_db_major_version="4.0",
    provider_name="AWS",
    disk_size_gb=100,
    provider_instance_size_name="M40")
config = mongodbatlas.GlobalClusterConfig("config",
    project_id=mongodbatlas_cluster["test"]["project_id"],
    cluster_name=mongodbatlas_cluster["test"]["name"],
    managed_namespaces=[mongodbatlas.GlobalClusterConfigManagedNamespaceArgs(
        db="mydata",
        collection="publishers",
        custom_shard_key="city",
    )],
    custom_zone_mappings=[mongodbatlas.GlobalClusterConfigCustomZoneMappingArgs(
        location="CA",
        zone="Zone 1",
    )])
using System.Collections.Generic;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var cluster_test = new Mongodbatlas.Cluster("cluster-test", new()
    {
        ProjectId = "<YOUR-PROJECT-ID>",
        ClusterType = "REPLICASET",
        ReplicationSpecs = new[]
        {
            new Mongodbatlas.Inputs.ClusterReplicationSpecArgs
            {
                NumShards = 1,
                RegionsConfigs = new[]
                {
                    new Mongodbatlas.Inputs.ClusterReplicationSpecRegionsConfigArgs
                    {
                        RegionName = "US_EAST_1",
                        ElectableNodes = 3,
                        Priority = 7,
                        ReadOnlyNodes = 0,
                    },
                },
            },
        },
        BackupEnabled = true,
        AutoScalingDiskGbEnabled = true,
        MongoDbMajorVersion = "4.0",
        ProviderName = "AWS",
        DiskSizeGb = 100,
        ProviderInstanceSizeName = "M40",
    });

    var config = new Mongodbatlas.GlobalClusterConfig("config", new()
    {
        ProjectId = mongodbatlas_cluster.Test.Project_id,
        ClusterName = mongodbatlas_cluster.Test.Name,
        ManagedNamespaces = new[]
        {
            new Mongodbatlas.Inputs.GlobalClusterConfigManagedNamespaceArgs
            {
                Db = "mydata",
                Collection = "publishers",
                CustomShardKey = "city",
            },
        },
        CustomZoneMappings = new[]
        {
            new Mongodbatlas.Inputs.GlobalClusterConfigCustomZoneMappingArgs
            {
                Location = "CA",
                Zone = "Zone 1",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := mongodbatlas.NewCluster(ctx, "cluster-test", &mongodbatlas.ClusterArgs{
			ProjectId:   pulumi.String("<YOUR-PROJECT-ID>"),
			ClusterType: pulumi.String("REPLICASET"),
			ReplicationSpecs: mongodbatlas.ClusterReplicationSpecArray{
				&mongodbatlas.ClusterReplicationSpecArgs{
					NumShards: pulumi.Int(1),
					RegionsConfigs: mongodbatlas.ClusterReplicationSpecRegionsConfigArray{
						&mongodbatlas.ClusterReplicationSpecRegionsConfigArgs{
							RegionName:     pulumi.String("US_EAST_1"),
							ElectableNodes: pulumi.Int(3),
							Priority:       pulumi.Int(7),
							ReadOnlyNodes:  pulumi.Int(0),
						},
					},
				},
			},
			BackupEnabled:            pulumi.Bool(true),
			AutoScalingDiskGbEnabled: pulumi.Bool(true),
			MongoDbMajorVersion:      pulumi.String("4.0"),
			ProviderName:             pulumi.String("AWS"),
			DiskSizeGb:               pulumi.Float64(100),
			ProviderInstanceSizeName: pulumi.String("M40"),
		})
		if err != nil {
			return err
		}
		_, err = mongodbatlas.NewGlobalClusterConfig(ctx, "config", &mongodbatlas.GlobalClusterConfigArgs{
			ProjectId:   pulumi.Any(mongodbatlas_cluster.Test.Project_id),
			ClusterName: pulumi.Any(mongodbatlas_cluster.Test.Name),
			ManagedNamespaces: mongodbatlas.GlobalClusterConfigManagedNamespaceArray{
				&mongodbatlas.GlobalClusterConfigManagedNamespaceArgs{
					Db:             pulumi.String("mydata"),
					Collection:     pulumi.String("publishers"),
					CustomShardKey: pulumi.String("city"),
				},
			},
			CustomZoneMappings: mongodbatlas.GlobalClusterConfigCustomZoneMappingArray{
				&mongodbatlas.GlobalClusterConfigCustomZoneMappingArgs{
					Location: pulumi.String("CA"),
					Zone:     pulumi.String("Zone 1"),
				},
			},
		})
		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.mongodbatlas.Cluster;
import com.pulumi.mongodbatlas.ClusterArgs;
import com.pulumi.mongodbatlas.inputs.ClusterReplicationSpecArgs;
import com.pulumi.mongodbatlas.GlobalClusterConfig;
import com.pulumi.mongodbatlas.GlobalClusterConfigArgs;
import com.pulumi.mongodbatlas.inputs.GlobalClusterConfigManagedNamespaceArgs;
import com.pulumi.mongodbatlas.inputs.GlobalClusterConfigCustomZoneMappingArgs;
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 cluster_test = new Cluster("cluster-test", ClusterArgs.builder()        
            .projectId("<YOUR-PROJECT-ID>")
            .clusterType("REPLICASET")
            .replicationSpecs(ClusterReplicationSpecArgs.builder()
                .numShards(1)
                .regionsConfigs(ClusterReplicationSpecRegionsConfigArgs.builder()
                    .regionName("US_EAST_1")
                    .electableNodes(3)
                    .priority(7)
                    .readOnlyNodes(0)
                    .build())
                .build())
            .backupEnabled(true)
            .autoScalingDiskGbEnabled(true)
            .mongoDbMajorVersion("4.0")
            .providerName("AWS")
            .diskSizeGb(100)
            .providerInstanceSizeName("M40")
            .build());

        var config = new GlobalClusterConfig("config", GlobalClusterConfigArgs.builder()        
            .projectId(mongodbatlas_cluster.test().project_id())
            .clusterName(mongodbatlas_cluster.test().name())
            .managedNamespaces(GlobalClusterConfigManagedNamespaceArgs.builder()
                .db("mydata")
                .collection("publishers")
                .customShardKey("city")
                .build())
            .customZoneMappings(GlobalClusterConfigCustomZoneMappingArgs.builder()
                .location("CA")
                .zone("Zone 1")
                .build())
            .build());

    }
}
resources:
  cluster-test:
    type: mongodbatlas:Cluster
    properties:
      projectId: <YOUR-PROJECT-ID>
      clusterType: REPLICASET
      replicationSpecs:
        - numShards: 1
          regionsConfigs:
            - regionName: US_EAST_1
              electableNodes: 3
              priority: 7
              readOnlyNodes: 0
      backupEnabled: true
      autoScalingDiskGbEnabled: true
      mongoDbMajorVersion: '4.0'
      # Provider Settings "block"
      providerName: AWS
      diskSizeGb: 100
      providerInstanceSizeName: M40
  config:
    type: mongodbatlas:GlobalClusterConfig
    properties:
      projectId: ${mongodbatlas_cluster.test.project_id}
      clusterName: ${mongodbatlas_cluster.test.name}
      managedNamespaces:
        - db: mydata
          collection: publishers
          customShardKey: city
      customZoneMappings:
        - location: CA
          zone: Zone 1

Create GlobalClusterConfig Resource

new GlobalClusterConfig(name: string, args: GlobalClusterConfigArgs, opts?: CustomResourceOptions);
@overload
def GlobalClusterConfig(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        cluster_name: Optional[str] = None,
                        custom_zone_mappings: Optional[Sequence[GlobalClusterConfigCustomZoneMappingArgs]] = None,
                        managed_namespaces: Optional[Sequence[GlobalClusterConfigManagedNamespaceArgs]] = None,
                        project_id: Optional[str] = None)
@overload
def GlobalClusterConfig(resource_name: str,
                        args: GlobalClusterConfigArgs,
                        opts: Optional[ResourceOptions] = None)
func NewGlobalClusterConfig(ctx *Context, name string, args GlobalClusterConfigArgs, opts ...ResourceOption) (*GlobalClusterConfig, error)
public GlobalClusterConfig(string name, GlobalClusterConfigArgs args, CustomResourceOptions? opts = null)
public GlobalClusterConfig(String name, GlobalClusterConfigArgs args)
public GlobalClusterConfig(String name, GlobalClusterConfigArgs args, CustomResourceOptions options)
type: mongodbatlas:GlobalClusterConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args GlobalClusterConfigArgs
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 GlobalClusterConfigArgs
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 GlobalClusterConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GlobalClusterConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args GlobalClusterConfigArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

GlobalClusterConfig 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 GlobalClusterConfig resource accepts the following input properties:

ClusterName string

The name of the Global Cluster.

ProjectId string

The unique ID for the project to create the database user.

CustomZoneMappings List<GlobalClusterConfigCustomZoneMappingArgs>

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

ManagedNamespaces List<GlobalClusterConfigManagedNamespaceArgs>

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

ClusterName string

The name of the Global Cluster.

ProjectId string

The unique ID for the project to create the database user.

CustomZoneMappings []GlobalClusterConfigCustomZoneMappingArgs

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

ManagedNamespaces []GlobalClusterConfigManagedNamespaceArgs

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

clusterName String

The name of the Global Cluster.

projectId String

The unique ID for the project to create the database user.

customZoneMappings List<GlobalClusterConfigCustomZoneMappingArgs>

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

managedNamespaces List<GlobalClusterConfigManagedNamespaceArgs>

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

clusterName string

The name of the Global Cluster.

projectId string

The unique ID for the project to create the database user.

customZoneMappings GlobalClusterConfigCustomZoneMappingArgs[]

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

managedNamespaces GlobalClusterConfigManagedNamespaceArgs[]

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

cluster_name str

The name of the Global Cluster.

project_id str

The unique ID for the project to create the database user.

custom_zone_mappings Sequence[GlobalClusterConfigCustomZoneMappingArgs]

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

managed_namespaces Sequence[GlobalClusterConfigManagedNamespaceArgs]

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

clusterName String

The name of the Global Cluster.

projectId String

The unique ID for the project to create the database user.

customZoneMappings List<Property Map>

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

managedNamespaces List<Property Map>

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

Outputs

All input properties are implicitly available as output properties. Additionally, the GlobalClusterConfig resource produces the following output properties:

CustomZoneMapping Dictionary<string, object>

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

Id string

The provider-assigned unique ID for this managed resource.

CustomZoneMapping map[string]interface{}

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

Id string

The provider-assigned unique ID for this managed resource.

customZoneMapping Map<String,Object>

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

id String

The provider-assigned unique ID for this managed resource.

customZoneMapping {[key: string]: any}

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

id string

The provider-assigned unique ID for this managed resource.

custom_zone_mapping Mapping[str, Any]

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

id str

The provider-assigned unique ID for this managed resource.

customZoneMapping Map<Any>

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing GlobalClusterConfig Resource

Get an existing GlobalClusterConfig 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?: GlobalClusterConfigState, opts?: CustomResourceOptions): GlobalClusterConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_name: Optional[str] = None,
        custom_zone_mapping: Optional[Mapping[str, Any]] = None,
        custom_zone_mappings: Optional[Sequence[GlobalClusterConfigCustomZoneMappingArgs]] = None,
        managed_namespaces: Optional[Sequence[GlobalClusterConfigManagedNamespaceArgs]] = None,
        project_id: Optional[str] = None) -> GlobalClusterConfig
func GetGlobalClusterConfig(ctx *Context, name string, id IDInput, state *GlobalClusterConfigState, opts ...ResourceOption) (*GlobalClusterConfig, error)
public static GlobalClusterConfig Get(string name, Input<string> id, GlobalClusterConfigState? state, CustomResourceOptions? opts = null)
public static GlobalClusterConfig get(String name, Output<String> id, GlobalClusterConfigState 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.
The following state arguments are supported:
ClusterName string

The name of the Global Cluster.

CustomZoneMapping Dictionary<string, object>

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

CustomZoneMappings List<GlobalClusterConfigCustomZoneMappingArgs>

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

ManagedNamespaces List<GlobalClusterConfigManagedNamespaceArgs>

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

ProjectId string

The unique ID for the project to create the database user.

ClusterName string

The name of the Global Cluster.

CustomZoneMapping map[string]interface{}

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

CustomZoneMappings []GlobalClusterConfigCustomZoneMappingArgs

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

ManagedNamespaces []GlobalClusterConfigManagedNamespaceArgs

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

ProjectId string

The unique ID for the project to create the database user.

clusterName String

The name of the Global Cluster.

customZoneMapping Map<String,Object>

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

customZoneMappings List<GlobalClusterConfigCustomZoneMappingArgs>

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

managedNamespaces List<GlobalClusterConfigManagedNamespaceArgs>

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

projectId String

The unique ID for the project to create the database user.

clusterName string

The name of the Global Cluster.

customZoneMapping {[key: string]: any}

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

customZoneMappings GlobalClusterConfigCustomZoneMappingArgs[]

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

managedNamespaces GlobalClusterConfigManagedNamespaceArgs[]

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

projectId string

The unique ID for the project to create the database user.

cluster_name str

The name of the Global Cluster.

custom_zone_mapping Mapping[str, Any]

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

custom_zone_mappings Sequence[GlobalClusterConfigCustomZoneMappingArgs]

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

managed_namespaces Sequence[GlobalClusterConfigManagedNamespaceArgs]

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

project_id str

The unique ID for the project to create the database user.

clusterName String

The name of the Global Cluster.

customZoneMapping Map<Any>

A map of all custom zone mappings defined for the Global Cluster. Atlas automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. If your Global Cluster does not have any custom zone mappings, this document is empty.

customZoneMappings List<Property Map>

Each element in the list maps one ISO location code to a zone in your Global Cluster. See Custom Zone Mapping below for more details.

managedNamespaces List<Property Map>

Add a managed namespaces to a Global Cluster. For more information about managed namespaces, see Global Clusters. See Managed Namespace below for more details.

projectId String

The unique ID for the project to create the database user.

Supporting Types

GlobalClusterConfigCustomZoneMapping

Location string

The ISO location code to which you want to map a zone in your Global Cluster. You can find a list of all supported location codes here.

Zone string

The name of the zone in your Global Cluster that you want to map to location.

Location string

The ISO location code to which you want to map a zone in your Global Cluster. You can find a list of all supported location codes here.

Zone string

The name of the zone in your Global Cluster that you want to map to location.

location String

The ISO location code to which you want to map a zone in your Global Cluster. You can find a list of all supported location codes here.

zone String

The name of the zone in your Global Cluster that you want to map to location.

location string

The ISO location code to which you want to map a zone in your Global Cluster. You can find a list of all supported location codes here.

zone string

The name of the zone in your Global Cluster that you want to map to location.

location str

The ISO location code to which you want to map a zone in your Global Cluster. You can find a list of all supported location codes here.

zone str

The name of the zone in your Global Cluster that you want to map to location.

location String

The ISO location code to which you want to map a zone in your Global Cluster. You can find a list of all supported location codes here.

zone String

The name of the zone in your Global Cluster that you want to map to location.

GlobalClusterConfigManagedNamespace

Collection string

The name of the collection associated with the managed namespace.

CustomShardKey string

The custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.

Db string

The name of the database containing the collection.

IsCustomShardKeyHashed bool

Specifies whether the custom shard key for the collection is hashed. If omitted, defaults to false. If false, Atlas uses ranged sharding. This is only available for Atlas clusters with MongoDB v4.4 and later.

IsShardKeyUnique bool

Specifies whether the underlying index enforces a unique constraint. If omitted, defaults to false. You cannot specify true when using hashed shard keys.

Collection string

The name of the collection associated with the managed namespace.

CustomShardKey string

The custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.

Db string

The name of the database containing the collection.

IsCustomShardKeyHashed bool

Specifies whether the custom shard key for the collection is hashed. If omitted, defaults to false. If false, Atlas uses ranged sharding. This is only available for Atlas clusters with MongoDB v4.4 and later.

IsShardKeyUnique bool

Specifies whether the underlying index enforces a unique constraint. If omitted, defaults to false. You cannot specify true when using hashed shard keys.

collection String

The name of the collection associated with the managed namespace.

customShardKey String

The custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.

db String

The name of the database containing the collection.

isCustomShardKeyHashed Boolean

Specifies whether the custom shard key for the collection is hashed. If omitted, defaults to false. If false, Atlas uses ranged sharding. This is only available for Atlas clusters with MongoDB v4.4 and later.

isShardKeyUnique Boolean

Specifies whether the underlying index enforces a unique constraint. If omitted, defaults to false. You cannot specify true when using hashed shard keys.

collection string

The name of the collection associated with the managed namespace.

customShardKey string

The custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.

db string

The name of the database containing the collection.

isCustomShardKeyHashed boolean

Specifies whether the custom shard key for the collection is hashed. If omitted, defaults to false. If false, Atlas uses ranged sharding. This is only available for Atlas clusters with MongoDB v4.4 and later.

isShardKeyUnique boolean

Specifies whether the underlying index enforces a unique constraint. If omitted, defaults to false. You cannot specify true when using hashed shard keys.

collection str

The name of the collection associated with the managed namespace.

custom_shard_key str

The custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.

db str

The name of the database containing the collection.

is_custom_shard_key_hashed bool

Specifies whether the custom shard key for the collection is hashed. If omitted, defaults to false. If false, Atlas uses ranged sharding. This is only available for Atlas clusters with MongoDB v4.4 and later.

is_shard_key_unique bool

Specifies whether the underlying index enforces a unique constraint. If omitted, defaults to false. You cannot specify true when using hashed shard keys.

collection String

The name of the collection associated with the managed namespace.

customShardKey String

The custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.

db String

The name of the database containing the collection.

isCustomShardKeyHashed Boolean

Specifies whether the custom shard key for the collection is hashed. If omitted, defaults to false. If false, Atlas uses ranged sharding. This is only available for Atlas clusters with MongoDB v4.4 and later.

isShardKeyUnique Boolean

Specifies whether the underlying index enforces a unique constraint. If omitted, defaults to false. You cannot specify true when using hashed shard keys.

Import

Global Clusters can be imported using project ID and cluster name, in the format PROJECTID-CLUSTER_NAME, e.g.

 $ pulumi import mongodbatlas:index/globalClusterConfig:GlobalClusterConfig config 1112222b3bf99403840e8934-Cluster0

See detailed information for arguments and attributesMongoDB API Global Clusters

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes

This Pulumi package is based on the mongodbatlas Terraform Provider.