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

mongodbatlas.GlobalClusterConfig

Explore with Pulumi AI

# Resource: mongodbatlas.GlobalClusterConfig

mongodbatlas.GlobalClusterConfig provides a Global Cluster Configuration resource.

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

NOTE: This resource can only be used with Atlas-managed clusters. See doc for global_cluster_self_managed_sharding attribute in mongodbatlas.AdvancedCluster resource for more information.

IMPORTANT: You can update a Global Cluster Configuration to add new custom zone mappings and managed namespaces. However, once configured, you can’t modify or partially delete custom zone mappings (you must remove them all at once). You can add or remove, but can’t modify, managed namespaces. Any update that changes an existing managed namespace results in an error. Read more about Global Cluster Configuration. For more details, see Global Clusters API

Examples Usage

Example Global cluster

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

const test = new mongodbatlas.AdvancedCluster("test", {
    projectId: "<YOUR-PROJECT-ID>",
    name: "<CLUSTER-NAME>",
    clusterType: "GEOSHARDED",
    backupEnabled: true,
    replicationSpecs: [
        {
            zoneName: "Zone 1",
            regionConfigs: [{
                electableSpecs: {
                    instanceSize: "M30",
                    nodeCount: 3,
                },
                providerName: "AWS",
                priority: 7,
                regionName: "EU_CENTRAL_1",
            }],
        },
        {
            zoneName: "Zone 2",
            regionConfigs: [{
                electableSpecs: {
                    instanceSize: "M30",
                    nodeCount: 3,
                },
                providerName: "AWS",
                priority: 7,
                regionName: "US_EAST_2",
            }],
        },
    ],
});
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",
    }],
});
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

test = mongodbatlas.AdvancedCluster("test",
    project_id="<YOUR-PROJECT-ID>",
    name="<CLUSTER-NAME>",
    cluster_type="GEOSHARDED",
    backup_enabled=True,
    replication_specs=[
        {
            "zone_name": "Zone 1",
            "region_configs": [{
                "electable_specs": {
                    "instance_size": "M30",
                    "node_count": 3,
                },
                "provider_name": "AWS",
                "priority": 7,
                "region_name": "EU_CENTRAL_1",
            }],
        },
        {
            "zone_name": "Zone 2",
            "region_configs": [{
                "electable_specs": {
                    "instance_size": "M30",
                    "node_count": 3,
                },
                "provider_name": "AWS",
                "priority": 7,
                "region_name": "US_EAST_2",
            }],
        },
    ])
config = mongodbatlas.GlobalClusterConfig("config",
    project_id=test.project_id,
    cluster_name=test.name,
    managed_namespaces=[{
        "db": "mydata",
        "collection": "publishers",
        "custom_shard_key": "city",
        "is_custom_shard_key_hashed": False,
        "is_shard_key_unique": False,
    }],
    custom_zone_mappings=[{
        "location": "CA",
        "zone": "Zone 1",
    }])
Copy
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.NewAdvancedCluster(ctx, "test", &mongodbatlas.AdvancedClusterArgs{
			ProjectId:     pulumi.String("<YOUR-PROJECT-ID>"),
			Name:          pulumi.String("<CLUSTER-NAME>"),
			ClusterType:   pulumi.String("GEOSHARDED"),
			BackupEnabled: pulumi.Bool(true),
			ReplicationSpecs: mongodbatlas.AdvancedClusterReplicationSpecArray{
				&mongodbatlas.AdvancedClusterReplicationSpecArgs{
					ZoneName: pulumi.String("Zone 1"),
					RegionConfigs: mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArray{
						&mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArgs{
							ElectableSpecs: &mongodbatlas.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs{
								InstanceSize: pulumi.String("M30"),
								NodeCount:    pulumi.Int(3),
							},
							ProviderName: pulumi.String("AWS"),
							Priority:     pulumi.Int(7),
							RegionName:   pulumi.String("EU_CENTRAL_1"),
						},
					},
				},
				&mongodbatlas.AdvancedClusterReplicationSpecArgs{
					ZoneName: pulumi.String("Zone 2"),
					RegionConfigs: mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArray{
						&mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArgs{
							ElectableSpecs: &mongodbatlas.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs{
								InstanceSize: pulumi.String("M30"),
								NodeCount:    pulumi.Int(3),
							},
							ProviderName: pulumi.String("AWS"),
							Priority:     pulumi.Int(7),
							RegionName:   pulumi.String("US_EAST_2"),
						},
					},
				},
			},
		})
		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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var test = new Mongodbatlas.AdvancedCluster("test", new()
    {
        ProjectId = "<YOUR-PROJECT-ID>",
        Name = "<CLUSTER-NAME>",
        ClusterType = "GEOSHARDED",
        BackupEnabled = true,
        ReplicationSpecs = new[]
        {
            new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecArgs
            {
                ZoneName = "Zone 1",
                RegionConfigs = new[]
                {
                    new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigArgs
                    {
                        ElectableSpecs = new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs
                        {
                            InstanceSize = "M30",
                            NodeCount = 3,
                        },
                        ProviderName = "AWS",
                        Priority = 7,
                        RegionName = "EU_CENTRAL_1",
                    },
                },
            },
            new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecArgs
            {
                ZoneName = "Zone 2",
                RegionConfigs = new[]
                {
                    new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigArgs
                    {
                        ElectableSpecs = new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs
                        {
                            InstanceSize = "M30",
                            NodeCount = 3,
                        },
                        ProviderName = "AWS",
                        Priority = 7,
                        RegionName = "US_EAST_2",
                    },
                },
            },
        },
    });

    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",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.AdvancedCluster;
import com.pulumi.mongodbatlas.AdvancedClusterArgs;
import com.pulumi.mongodbatlas.inputs.AdvancedClusterReplicationSpecArgs;
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 AdvancedCluster("test", AdvancedClusterArgs.builder()
            .projectId("<YOUR-PROJECT-ID>")
            .name("<CLUSTER-NAME>")
            .clusterType("GEOSHARDED")
            .backupEnabled(true)
            .replicationSpecs(            
                AdvancedClusterReplicationSpecArgs.builder()
                    .zoneName("Zone 1")
                    .regionConfigs(AdvancedClusterReplicationSpecRegionConfigArgs.builder()
                        .electableSpecs(AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs.builder()
                            .instanceSize("M30")
                            .nodeCount(3)
                            .build())
                        .providerName("AWS")
                        .priority(7)
                        .regionName("EU_CENTRAL_1")
                        .build())
                    .build(),
                AdvancedClusterReplicationSpecArgs.builder()
                    .zoneName("Zone 2")
                    .regionConfigs(AdvancedClusterReplicationSpecRegionConfigArgs.builder()
                        .electableSpecs(AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs.builder()
                            .instanceSize("M30")
                            .nodeCount(3)
                            .build())
                        .providerName("AWS")
                        .priority(7)
                        .regionName("US_EAST_2")
                        .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());

    }
}
Copy
resources:
  test:
    type: mongodbatlas:AdvancedCluster
    properties:
      projectId: <YOUR-PROJECT-ID>
      name: <CLUSTER-NAME>
      clusterType: GEOSHARDED
      backupEnabled: true
      replicationSpecs:
        - zoneName: Zone 1
          regionConfigs:
            - electableSpecs:
                instanceSize: M30
                nodeCount: 3
              providerName: AWS
              priority: 7
              regionName: EU_CENTRAL_1
        - zoneName: Zone 2
          regionConfigs:
            - electableSpecs:
                instanceSize: M30
                nodeCount: 3
              providerName: AWS
              priority: 7
              regionName: US_EAST_2
  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
Copy

Create GlobalClusterConfig Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new GlobalClusterConfig(name: string, args: GlobalClusterConfigArgs, opts?: CustomResourceOptions);
@overload
def GlobalClusterConfig(resource_name: str,
                        args: GlobalClusterConfigArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def GlobalClusterConfig(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        cluster_name: Optional[str] = None,
                        project_id: Optional[str] = None,
                        custom_zone_mappings: Optional[Sequence[GlobalClusterConfigCustomZoneMappingArgs]] = None,
                        managed_namespaces: Optional[Sequence[GlobalClusterConfigManagedNamespaceArgs]] = 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.

Parameters

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

Constructor example

The following reference example uses placeholder values for all input properties.

var globalClusterConfigResource = new Mongodbatlas.GlobalClusterConfig("globalClusterConfigResource", new()
{
    ClusterName = "string",
    ProjectId = "string",
    CustomZoneMappings = new[]
    {
        new Mongodbatlas.Inputs.GlobalClusterConfigCustomZoneMappingArgs
        {
            Location = "string",
            Zone = "string",
        },
    },
    ManagedNamespaces = new[]
    {
        new Mongodbatlas.Inputs.GlobalClusterConfigManagedNamespaceArgs
        {
            Collection = "string",
            CustomShardKey = "string",
            Db = "string",
            IsCustomShardKeyHashed = false,
            IsShardKeyUnique = false,
        },
    },
});
Copy
example, err := mongodbatlas.NewGlobalClusterConfig(ctx, "globalClusterConfigResource", &mongodbatlas.GlobalClusterConfigArgs{
	ClusterName: pulumi.String("string"),
	ProjectId:   pulumi.String("string"),
	CustomZoneMappings: mongodbatlas.GlobalClusterConfigCustomZoneMappingArray{
		&mongodbatlas.GlobalClusterConfigCustomZoneMappingArgs{
			Location: pulumi.String("string"),
			Zone:     pulumi.String("string"),
		},
	},
	ManagedNamespaces: mongodbatlas.GlobalClusterConfigManagedNamespaceArray{
		&mongodbatlas.GlobalClusterConfigManagedNamespaceArgs{
			Collection:             pulumi.String("string"),
			CustomShardKey:         pulumi.String("string"),
			Db:                     pulumi.String("string"),
			IsCustomShardKeyHashed: pulumi.Bool(false),
			IsShardKeyUnique:       pulumi.Bool(false),
		},
	},
})
Copy
var globalClusterConfigResource = new GlobalClusterConfig("globalClusterConfigResource", GlobalClusterConfigArgs.builder()
    .clusterName("string")
    .projectId("string")
    .customZoneMappings(GlobalClusterConfigCustomZoneMappingArgs.builder()
        .location("string")
        .zone("string")
        .build())
    .managedNamespaces(GlobalClusterConfigManagedNamespaceArgs.builder()
        .collection("string")
        .customShardKey("string")
        .db("string")
        .isCustomShardKeyHashed(false)
        .isShardKeyUnique(false)
        .build())
    .build());
Copy
global_cluster_config_resource = mongodbatlas.GlobalClusterConfig("globalClusterConfigResource",
    cluster_name="string",
    project_id="string",
    custom_zone_mappings=[{
        "location": "string",
        "zone": "string",
    }],
    managed_namespaces=[{
        "collection": "string",
        "custom_shard_key": "string",
        "db": "string",
        "is_custom_shard_key_hashed": False,
        "is_shard_key_unique": False,
    }])
Copy
const globalClusterConfigResource = new mongodbatlas.GlobalClusterConfig("globalClusterConfigResource", {
    clusterName: "string",
    projectId: "string",
    customZoneMappings: [{
        location: "string",
        zone: "string",
    }],
    managedNamespaces: [{
        collection: "string",
        customShardKey: "string",
        db: "string",
        isCustomShardKeyHashed: false,
        isShardKeyUnique: false,
    }],
});
Copy
type: mongodbatlas:GlobalClusterConfig
properties:
    clusterName: string
    customZoneMappings:
        - location: string
          zone: string
    managedNamespaces:
        - collection: string
          customShardKey: string
          db: string
          isCustomShardKeyHashed: false
          isShardKeyUnique: false
    projectId: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The GlobalClusterConfig resource accepts the following input properties:

ClusterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Global Cluster.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The unique ID for the project.
CustomZoneMappings List<GlobalClusterConfigCustomZoneMapping>
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<GlobalClusterConfigManagedNamespace>
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
This property is required.
Changes to this property will trigger replacement.
string
The name of the Global Cluster.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The unique ID for the project.
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
This property is required.
Changes to this property will trigger replacement.
String
The name of the Global Cluster.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The unique ID for the project.
customZoneMappings List<GlobalClusterConfigCustomZoneMapping>
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<GlobalClusterConfigManagedNamespace>
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
This property is required.
Changes to this property will trigger replacement.
string
The name of the Global Cluster.
projectId
This property is required.
Changes to this property will trigger replacement.
string
The unique ID for the project.
customZoneMappings GlobalClusterConfigCustomZoneMapping[]
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 GlobalClusterConfigManagedNamespace[]
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
This property is required.
Changes to this property will trigger replacement.
str
The name of the Global Cluster.
project_id
This property is required.
Changes to this property will trigger replacement.
str
The unique ID for the project.
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
This property is required.
Changes to this property will trigger replacement.
String
The name of the Global Cluster.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The unique ID for the project.
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, string>
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

CustomZoneMappingZoneId Dictionary<string, string>
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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]string
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

CustomZoneMappingZoneId map[string]string
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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,String>
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

customZoneMappingZoneId Map<String,String>
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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]: string}
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

customZoneMappingZoneId {[key: string]: string}
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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, str]
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

custom_zone_mapping_zone_id Mapping[str, str]
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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<String>
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

customZoneMappingZoneId Map<String>
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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, str]] = None,
        custom_zone_mapping_zone_id: Optional[Mapping[str, str]] = 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)
resources:  _:    type: mongodbatlas:GlobalClusterConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
The name of the Global Cluster.
CustomZoneMapping Dictionary<string, string>
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

CustomZoneMappingZoneId Dictionary<string, string>
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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<GlobalClusterConfigCustomZoneMapping>
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<GlobalClusterConfigManagedNamespace>
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 Changes to this property will trigger replacement. string
The unique ID for the project.
ClusterName Changes to this property will trigger replacement. string
The name of the Global Cluster.
CustomZoneMapping map[string]string
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

CustomZoneMappingZoneId map[string]string
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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 Changes to this property will trigger replacement. string
The unique ID for the project.
clusterName Changes to this property will trigger replacement. String
The name of the Global Cluster.
customZoneMapping Map<String,String>
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

customZoneMappingZoneId Map<String,String>
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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<GlobalClusterConfigCustomZoneMapping>
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<GlobalClusterConfigManagedNamespace>
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 Changes to this property will trigger replacement. String
The unique ID for the project.
clusterName Changes to this property will trigger replacement. string
The name of the Global Cluster.
customZoneMapping {[key: string]: string}
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

customZoneMappingZoneId {[key: string]: string}
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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 GlobalClusterConfigCustomZoneMapping[]
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 GlobalClusterConfigManagedNamespace[]
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 Changes to this property will trigger replacement. string
The unique ID for the project.
cluster_name Changes to this property will trigger replacement. str
The name of the Global Cluster.
custom_zone_mapping Mapping[str, str]
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

custom_zone_mapping_zone_id Mapping[str, str]
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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 Changes to this property will trigger replacement. str
The unique ID for the project.
clusterName Changes to this property will trigger replacement. String
The name of the Global Cluster.
customZoneMapping Map<String>
(Deprecated) A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.id. This attribute is deprecated, use custom_zone_mapping_zone_id instead. This attribute is not set when a cluster uses independent shard scaling. To learn more, see the Sharding Configuration guide.

Deprecated: This parameter is deprecated and will be removed in version 1.23.0. Please transition to custom_zone_mapping_zone_id.

customZoneMappingZoneId Map<String>
A map of all custom zone mappings defined for the Global Cluster to replication_specs.*.zone_id. 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 Changes to this property will trigger replacement. String
The unique ID for the project.

Supporting Types

GlobalClusterConfigCustomZoneMapping
, GlobalClusterConfigCustomZoneMappingArgs

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
, GlobalClusterConfigManagedNamespaceArgs

Collection This property is required. string
The name of the collection associated with the managed namespace.
CustomShardKey This property is required. 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 This property is required. 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 This property is required. string
The name of the collection associated with the managed namespace.
CustomShardKey This property is required. 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 This property is required. 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 This property is required. String
The name of the collection associated with the managed namespace.
customShardKey This property is required. 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 This property is required. 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 This property is required. string
The name of the collection associated with the managed namespace.
customShardKey This property is required. 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 This property is required. 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 This property is required. str
The name of the collection associated with the managed namespace.
custom_shard_key This property is required. 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 This property is required. 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 This property is required. String
The name of the collection associated with the managed namespace.
customShardKey This property is required. 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 This property is required. 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
Copy

See detailed information for arguments and attributes: MongoDB API Global Clusters

To learn more about importing existing cloud resources, see Importing resources.

Package Details

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