Want to learn about running containers in Lambda? Join our free hands-on workshop. Register Now

Package @pulumi/mongodbatlas

This page documents the language specification for the mongodbatlas package. If you're looking for help working with the inputs, outputs, or functions of mongodbatlas resources in a Pulumi program, please see the resource documentation for examples and API reference.

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-mongodbatlas repo; however, if that doesn’t turn up anything, please consult the source mongodb/terraform-provider-mongodbatlas repo.

var mongodbatlas = require("@pulumi/mongodbatlas");
import * as mongodbatlas from "@pulumi/mongodbatlas";

Modules

Resources

Functions

Others

Resources

Resource AlertConfiguration

class AlertConfiguration extends CustomResource

mongodbatlas.AlertConfiguration provides an Alert Configuration resource to define the conditions that trigger an alert and the methods of notification within a MongoDB Atlas project.

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

Example Usage

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

const test = new mongodbatlas.AlertConfiguration("test", {
    enabled: true,
    eventType: "OUTSIDE_METRIC_THRESHOLD",
    matchers: [{
        fieldName: "HOSTNAME_AND_PORT",
        operator: "EQUALS",
        value: "SECONDARY",
    }],
    metricThreshold: {
        metric_name: "ASSERT_REGULAR",
        mode: "AVERAGE",
        operator: "LESS_THAN",
        threshold: 99,
        units: "RAW",
    },
    notifications: [{
        delayMin: 0,
        emailEnabled: true,
        intervalMin: 5,
        roles: [
            "GROUP_CHARTS_ADMIN",
            "GROUP_CLUSTER_MANAGER",
        ],
        smsEnabled: false,
        typeName: "GROUP",
    }],
    projectId: "<PROJECT-ID>",
});

NOTE: In order to allow for a fast pace of change to alert variables some validations have been removed from this resource in order to unblock alert creation. Impacted areas have links to the MongoDB Atlas API documentation so always check it for the most current information: https://docs.atlas.mongodb.com/reference/api/alert-configurations-create-config/

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

const test = new mongodbatlas.AlertConfiguration("test", {
    enabled: true,
    eventType: "REPLICATION_OPLOG_WINDOW_RUNNING_OUT",
    matchers: [{
        fieldName: "HOSTNAME_AND_PORT",
        operator: "EQUALS",
        value: "SECONDARY",
    }],
    notifications: [{
        delayMin: 0,
        emailEnabled: true,
        intervalMin: 5,
        roles: [
            "GROUP_CHARTS_ADMIN",
            "GROUP_CLUSTER_MANAGER",
        ],
        smsEnabled: false,
        typeName: "GROUP",
    }],
    projectId: "<PROJECT-ID>",
    threshold: {
        operator: "LESS_THAN",
        threshold: 1,
        units: "HOURS",
    },
});

constructor

new AlertConfiguration(name: string, args: AlertConfigurationArgs, opts?: pulumi.CustomResourceOptions)

Create a AlertConfiguration resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertConfigurationState, opts?: pulumi.CustomResourceOptions): AlertConfiguration

Get an existing AlertConfiguration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is AlertConfiguration

Returns true if the given object is an instance of AlertConfiguration. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property alertConfigurationId

public alertConfigurationId: pulumi.Output<string>;

Unique identifier for the alert configuration.

property created

public created: pulumi.Output<string>;

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.

property enabled

public enabled: pulumi.Output<boolean>;

It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.

property eventType

public eventType: pulumi.Output<string>;

The type of event that will trigger an alert.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property matchers

public matchers: pulumi.Output<AlertConfigurationMatcher[] | undefined>;

property metricThreshold

public metricThreshold: pulumi.Output<AlertConfigurationMetricThreshold | undefined>;

property notifications

public notifications: pulumi.Output<AlertConfigurationNotification[]>;

property projectId

public projectId: pulumi.Output<string>;

The ID of the project where the alert configuration will create.

property threshold

public threshold: pulumi.Output<AlertConfigurationThreshold | undefined>;

Threshold value outside of which an alert will be triggered.

property updated

public updated: pulumi.Output<string>;

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Auditing

class Auditing extends CustomResource

mongodbatlas.Auditing provides an Auditing resource. This allows auditing to be created.

Example Usage

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

const test = new mongodbatlas.Auditing("test", {
    auditAuthorizationSuccess: false,
    auditFilter: "{ 'atype': 'authenticate', 'param': {   'user': 'auditAdmin',   'db': 'admin',   'mechanism': 'SCRAM-SHA-1' }}",
    enabled: true,
    projectId: "<project-id>",
});

constructor

new Auditing(name: string, args: AuditingArgs, opts?: pulumi.CustomResourceOptions)

Create a Auditing resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AuditingState, opts?: pulumi.CustomResourceOptions): Auditing

Get an existing Auditing resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Auditing

Returns true if the given object is an instance of Auditing. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property auditAuthorizationSuccess

public auditAuthorizationSuccess: pulumi.Output<boolean>;

JSON-formatted audit filter used by the project

property auditFilter

public auditFilter: pulumi.Output<string>;

Indicates whether the auditing system captures successful authentication attempts for audit filters using the “atype” : “authCheck” auditing event. For more information, see auditAuthorizationSuccess

property configurationType

public configurationType: pulumi.Output<string>;

Denotes the configuration method for the audit filter. Possible values are: * NONE - auditing not configured for the project. * FILTER_BUILDER - auditing configured via Atlas UI filter builder. * FILTER_JSON - auditing configured via Atlas custom filter or API.

property enabled

public enabled: pulumi.Output<boolean>;

Denotes whether or not the project associated with the {project_id} has database auditing enabled.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property projectId

public projectId: pulumi.Output<string>;

The unique ID for the project to configure auditing.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource CloudProviderSnapshot

class CloudProviderSnapshot extends CustomResource

mongodbatlas.CloudProviderSnapshot provides a resource to take a cloud backup snapshot on demand. On-demand snapshots happen immediately, unlike scheduled snapshots which occur at regular intervals. If there is already an on-demand snapshot with a status of queued or inProgress, you must wait until Atlas has completed the on-demand snapshot before taking another.

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

Example Usage

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

const myCluster = new mongodbatlas.Cluster("myCluster", {
    projectId: "5cf5a45a9ccf6400e60981b6",
    diskSizeGb: 5,
    providerName: "AWS",
    providerRegionName: "EU_WEST_2",
    providerInstanceSizeName: "M10",
    providerBackupEnabled: true,
    providerDiskIops: 100,
    providerEncryptEbsVolume: false,
});
const testCloudProviderSnapshot = new mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot", {
    projectId: myCluster.projectId,
    clusterName: myCluster.name,
    description: "myDescription",
    retentionInDays: 1,
});
const testCloudProviderSnapshotRestoreJob = new mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob", {
    projectId: testCloudProviderSnapshot.projectId,
    clusterName: testCloudProviderSnapshot.clusterName,
    snapshotId: testCloudProviderSnapshot.snapshotId,
    deliveryType: {
        download: true,
    },
});

constructor

new CloudProviderSnapshot(name: string, args: CloudProviderSnapshotArgs, opts?: pulumi.CustomResourceOptions)

Create a CloudProviderSnapshot resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CloudProviderSnapshotState, opts?: pulumi.CustomResourceOptions): CloudProviderSnapshot

Get an existing CloudProviderSnapshot resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is CloudProviderSnapshot

Returns true if the given object is an instance of CloudProviderSnapshot. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property clusterName

public clusterName: pulumi.Output<string>;

The name of the Atlas cluster that contains the snapshots you want to retrieve.

property createdAt

public createdAt: pulumi.Output<string>;

UTC ISO 8601 formatted point in time when Atlas took the snapshot.

property description

public description: pulumi.Output<string>;

Description of the on-demand snapshot.

property expiresAt

public expiresAt: pulumi.Output<string>;

UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property masterKeyUuid

public masterKeyUuid: pulumi.Output<string>;

Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS.

property mongodVersion

public mongodVersion: pulumi.Output<string>;

Version of the MongoDB server.

property projectId

public projectId: pulumi.Output<string>;

The unique identifier of the project for the Atlas cluster.

property retentionInDays

public retentionInDays: pulumi.Output<number>;

The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.

property snapshotId

public snapshotId: pulumi.Output<string>;

Unique identifier of the snapshot.

property snapshotType

public snapshotType: pulumi.Output<string>;

Specified the type of snapshot. Valid values are onDemand and scheduled.

property status

public status: pulumi.Output<string>;

Current status of the snapshot. One of the following values will be returned: queued, inProgress, completed, failed.

property storageSizeBytes

public storageSizeBytes: pulumi.Output<number>;

Specifies the size of the snapshot in bytes.

property type

public type: pulumi.Output<string>;

Specifies the type of cluster: replicaSet or shardedCluster.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource CloudProviderSnapshotBackupPolicy

class CloudProviderSnapshotBackupPolicy extends CustomResource

constructor

new CloudProviderSnapshotBackupPolicy(name: string, args: CloudProviderSnapshotBackupPolicyArgs, opts?: pulumi.CustomResourceOptions)

Create a CloudProviderSnapshotBackupPolicy resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CloudProviderSnapshotBackupPolicyState, opts?: pulumi.CustomResourceOptions): CloudProviderSnapshotBackupPolicy

Get an existing CloudProviderSnapshotBackupPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is CloudProviderSnapshotBackupPolicy

Returns true if the given object is an instance of CloudProviderSnapshotBackupPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property clusterId

public clusterId: pulumi.Output<string>;

Unique identifier of the Atlas cluster.

property clusterName

public clusterName: pulumi.Output<string>;

The name of the Atlas cluster that contains the snapshot backup policy you want to retrieve.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property nextSnapshot

public nextSnapshot: pulumi.Output<string>;

Timestamp in the number of seconds that have elapsed since the UNIX epoch when Atlas takes the next snapshot.

property policies

public policies: pulumi.Output<CloudProviderSnapshotBackupPolicyPolicy[]>;

Contains a document for each backup policy item in the desired updated backup policy. * policies.#.id - (Required) Unique identifier of the backup policy that you want to update. policies.#.id is a value obtained via the mongodbatlas.Cluster resource. providerBackupEnabled of the mongodbatlas.Cluster resource must be set to true. See the example above for how to refer to the mongodbatlas.Cluster resource for policies.#.id

property projectId

public projectId: pulumi.Output<string>;

The unique identifier of the project for the Atlas cluster.

property referenceHourOfDay

public referenceHourOfDay: pulumi.Output<number>;

UTC Hour of day between 0 and 23, inclusive, representing which hour of the day that Atlas takes snapshots for backup policy items.

property referenceMinuteOfHour

public referenceMinuteOfHour: pulumi.Output<number>;

UTC Minutes after referenceHourOfDay that Atlas takes snapshots for backup policy items. Must be between 0 and 59, inclusive.

property restoreWindowDays

public restoreWindowDays: pulumi.Output<number>;

Number of days back in time you can restore to with point-in-time accuracy. Must be a positive, non-zero integer.

property updateSnapshots

public updateSnapshots: pulumi.Output<boolean>;

Specify true to apply the retention changes in the updated backup policy to snapshots that Atlas took previously.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource CloudProviderSnapshotRestoreJob

class CloudProviderSnapshotRestoreJob extends CustomResource

mongodbatlas.CloudProviderSnapshotRestoreJob provides a resource to create a new restore job from a cloud backup snapshot of a specified cluster. The restore job can be one of three types: * automated: Atlas automatically restores the snapshot with snapshotId to the Atlas cluster with name targetClusterName in the Atlas project with targetGroupId.

  • download: Atlas provides a URL to download a .tar.gz of the snapshot with snapshotId. The contents of the archive contain the data files for your Atlas cluster.

  • pointInTime: Atlas performs a Continuous Cloud Backup restore.

Important: If you specify deliveryType : automated or deliveryType : pointInTime in your request body to create an automated restore job, Atlas removes all existing data on the target cluster prior to the restore.

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

Example Usage

Example automated delivery type.
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const myCluster = new mongodbatlas.Cluster("myCluster", {
    projectId: "5cf5a45a9ccf6400e60981b6",
    diskSizeGb: 5,
    providerName: "AWS",
    providerRegionName: "EU_WEST_2",
    providerInstanceSizeName: "M10",
    providerBackupEnabled: true,
    providerDiskIops: 100,
    providerEncryptEbsVolume: false,
});
const testCloudProviderSnapshot = new mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot", {
    projectId: myCluster.projectId,
    clusterName: myCluster.name,
    description: "myDescription",
    retentionInDays: 1,
});
const testCloudProviderSnapshotRestoreJob = new mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob", {
    projectId: testCloudProviderSnapshot.projectId,
    clusterName: testCloudProviderSnapshot.clusterName,
    snapshotId: testCloudProviderSnapshot.snapshotId,
    deliveryType: {
        automated: true,
        target_cluster_name: "MyCluster",
        target_project_id: "5cf5a45a9ccf6400e60981b6",
    },
}, {
    dependsOn: ["mongodbatlas_cloud_provider_snapshot.test"],
});
Example download delivery type.
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const myCluster = new mongodbatlas.Cluster("myCluster", {
    projectId: "5cf5a45a9ccf6400e60981b6",
    diskSizeGb: 5,
    providerName: "AWS",
    providerRegionName: "EU_WEST_2",
    providerInstanceSizeName: "M10",
    providerBackupEnabled: true,
    providerDiskIops: 100,
    providerEncryptEbsVolume: false,
});
const testCloudProviderSnapshot = new mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot", {
    projectId: myCluster.projectId,
    clusterName: myCluster.name,
    description: "myDescription",
    retentionInDays: 1,
});
const testCloudProviderSnapshotRestoreJob = new mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob", {
    projectId: testCloudProviderSnapshot.projectId,
    clusterName: testCloudProviderSnapshot.clusterName,
    snapshotId: testCloudProviderSnapshot.snapshotId,
    deliveryType: {
        download: true,
    },
});

constructor

new CloudProviderSnapshotRestoreJob(name: string, args: CloudProviderSnapshotRestoreJobArgs, opts?: pulumi.CustomResourceOptions)

Create a CloudProviderSnapshotRestoreJob resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CloudProviderSnapshotRestoreJobState, opts?: pulumi.CustomResourceOptions): CloudProviderSnapshotRestoreJob

Get an existing CloudProviderSnapshotRestoreJob resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is CloudProviderSnapshotRestoreJob

Returns true if the given object is an instance of CloudProviderSnapshotRestoreJob. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property cancelled

public cancelled: pulumi.Output<boolean>;

Indicates whether the restore job was canceled.

property clusterName

public clusterName: pulumi.Output<string>;

The name of the Atlas cluster whose snapshot you want to restore.

property createdAt

public createdAt: pulumi.Output<string>;

UTC ISO 8601 formatted point in time when Atlas created the restore job.

property deliveryType

public deliveryType: pulumi.Output<CloudProviderSnapshotRestoreJobDeliveryType>;

Type of restore job to create. Possible values are: download or automated, only one must be set it in true.

property deliveryUrls

public deliveryUrls: pulumi.Output<string[]>;

One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.

property expired

public expired: pulumi.Output<boolean>;

Indicates whether the restore job expired.

property expiresAt

public expiresAt: pulumi.Output<string>;

UTC ISO 8601 formatted point in time when the restore job expires.

property finishedAt

public finishedAt: pulumi.Output<string>;

UTC ISO 8601 formatted point in time when the restore job completed.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property projectId

public projectId: pulumi.Output<string>;

The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.

property snapshotId

public snapshotId: pulumi.Output<string>;

Unique identifier of the snapshot to restore.

property snapshotRestoreJobId

public snapshotRestoreJobId: pulumi.Output<string>;

The unique identifier of the restore job.

property timestamp

public timestamp: pulumi.Output<string>;

Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Cluster

class Cluster extends CustomResource

mongodbatlas.Cluster provides a Cluster resource. The resource lets you create, edit and delete clusters. The resource requires your Project ID.

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

NOTE: A network container is created for a cluster to reside in if one does not yet exist in the project. To use this automatically created container with another resource, such as peering, the containerId is exported after creation.

IMPORTANT:
• Free tier cluster creation (M0) is not supported via API or by this Provider.
• Shared tier clusters (M2, M5) cannot be upgraded to higher tiers via API or by this Provider.
• Changes to cluster configurations can affect costs. Before making changes, please see Billing.

• If your Atlas project contains a custom role that uses actions introduced in a specific MongoDB version, you cannot create a cluster with a MongoDB version less than that version unless you delete the custom role.

Example Usage

Example AWS cluster
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const cluster_test = new mongodbatlas.Cluster("cluster-test", {
    autoScalingDiskGbEnabled: true,
    diskSizeGb: 100,
    mongoDbMajorVersion: "4.2",
    numShards: 1,
    projectId: "<YOUR-PROJECT-ID>",
    providerBackupEnabled: true,
    providerDiskIops: 300,
    providerEncryptEbsVolume: true,
    providerInstanceSizeName: "M40",
    //Provider Settings "block"
    providerName: "AWS",
    providerRegionName: "US_EAST_1",
    providerVolumeType: "STANDARD",
    replicationFactor: 3,
});
Example Azure cluster.
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.Cluster("test", {
    autoScalingDiskGbEnabled: true,
    mongoDbMajorVersion: "4.2",
    numShards: 1,
    projectId: "<YOUR-PROJECT-ID>",
    providerBackupEnabled: true,
    providerDiskTypeName: "P6",
    providerInstanceSizeName: "M30",
    //Provider Settings "block"
    providerName: "AZURE",
    providerRegionName: "US_EAST_2",
    replicationFactor: 3,
});
Example GCP cluster
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.Cluster("test", {
    autoScalingDiskGbEnabled: true,
    diskSizeGb: 40,
    mongoDbMajorVersion: "4.2",
    numShards: 1,
    projectId: "<YOUR-PROJECT-ID>",
    providerBackupEnabled: true,
    providerInstanceSizeName: "M30",
    //Provider Settings "block"
    providerName: "GCP",
    providerRegionName: "US_EAST_4",
    replicationFactor: 3,
});
Example Multi Region cluster
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const cluster_test = new mongodbatlas.Cluster("cluster-test", {
    clusterType: "REPLICASET",
    diskSizeGb: 100,
    numShards: 1,
    projectId: "<YOUR-PROJECT-ID>",
    providerBackupEnabled: true,
    providerDiskIops: 300,
    providerInstanceSizeName: "M10",
    //Provider Settings "block"
    providerName: "AWS",
    providerVolumeType: "STANDARD",
    replicationSpecs: [{
        numShards: 1,
        regionsConfigs: [
            {
                electableNodes: 3,
                priority: 7,
                readOnlyNodes: 0,
                regionName: "US_EAST_1",
            },
            {
                electableNodes: 2,
                priority: 6,
                readOnlyNodes: 0,
                regionName: "US_EAST_2",
            },
            {
                electableNodes: 2,
                priority: 5,
                readOnlyNodes: 2,
                regionName: "US_WEST_1",
            },
        ],
    }],
});
Example Global cluster
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const cluster_test = new mongodbatlas.Cluster("cluster-test", {
    clusterType: "GEOSHARDED",
    diskSizeGb: 80,
    numShards: 1,
    projectId: "<YOUR-PROJECT-ID>",
    providerBackupEnabled: true,
    providerDiskIops: 240,
    providerInstanceSizeName: "M30",
    //Provider Settings "block"
    providerName: "AWS",
    providerVolumeType: "STANDARD",
    replicationSpecs: [
        {
            numShards: 2,
            regionsConfigs: [{
                electableNodes: 3,
                priority: 7,
                readOnlyNodes: 0,
                regionName: "US_EAST_1",
            }],
            zoneName: "Zone 1",
        },
        {
            numShards: 2,
            regionsConfigs: [{
                electableNodes: 3,
                priority: 7,
                readOnlyNodes: 0,
                regionName: "EU_CENTRAL_1",
            }],
            zoneName: "Zone 2",
        },
    ],
});
Example AWS Shared Tier cluster
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const cluster_test = new mongodbatlas.Cluster("cluster-test", {
    autoScalingDiskGbEnabled: false,
    backingProviderName: "AWS",
    diskSizeGb: 2,
    //These must be the following values
    mongoDbMajorVersion: "4.2",
    projectId: "<YOUR-PROJECT-ID>",
    providerInstanceSizeName: "M2",
    //Provider Settings "block"
    providerName: "TENANT",
    providerRegionName: "US_EAST_1",
});

constructor

new Cluster(name: string, args: ClusterArgs, opts?: pulumi.CustomResourceOptions)

Create a Cluster resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster

Get an existing Cluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Cluster

Returns true if the given object is an instance of Cluster. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property advancedConfiguration

public advancedConfiguration: pulumi.Output<ClusterAdvancedConfiguration>;

property autoScalingComputeEnabled

public autoScalingComputeEnabled: pulumi.Output<boolean>;

Specifies whether cluster tier auto-scaling is enabled. The default is false. - Set to true to enable cluster tier auto-scaling. If enabled, you must specify a value for providerSettings.autoScaling.compute.maxInstanceSize. - Set to false to disable cluster tier auto-scaling.

property autoScalingComputeScaleDownEnabled

public autoScalingComputeScaleDownEnabled: pulumi.Output<boolean>;

Set to true to enable the cluster tier to scale down. This option is only available if autoScaling.compute.enabled is true. - If this option is enabled, you must specify a value for providerSettings.autoScaling.compute.minInstanceSize

property autoScalingDiskGbEnabled

public autoScalingDiskGbEnabled: pulumi.Output<boolean | undefined>;

Specifies whether disk auto-scaling is enabled. The default is true. - Set to true to enable disk auto-scaling. - Set to false to disable disk auto-scaling.

property backingProviderName

public backingProviderName: pulumi.Output<string>;

Cloud service provider on which the server for a multi-tenant cluster is provisioned.

property backupEnabled

public backupEnabled: pulumi.Output<boolean | undefined>;

property biConnector

public biConnector: pulumi.Output<ClusterBiConnector>;

Specifies BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See BI Connector below for more details.

property clusterId

public clusterId: pulumi.Output<string>;

The cluster ID.

property clusterType

public clusterType: pulumi.Output<string>;

Specifies the type of the cluster that you want to modify. You cannot convert a sharded cluster deployment to a replica set deployment.

property connectionStrings

public connectionStrings: pulumi.Output<ClusterConnectionStrings>;

Set of connection strings that your applications use to connect to this cluster. More info in Connection-strings. Use the parameters in this object to connect your applications to this cluster. To learn more about the formats of connection strings, see Connection String Options. NOTE: Atlas returns the contents of this object after the cluster is operational, not while it builds the cluster.

property containerId

public containerId: pulumi.Output<string>;

The Network Peering Container ID. The id of the container either created programmatically by the user before any clusters existed in the project or when the first cluster in the region (AWS/Azure) or project (GCP) was created.

property diskSizeGb

public diskSizeGb: pulumi.Output<number>;

Capacity, in gigabytes, of the host’s root volume. Increase this number to add capacity, up to a maximum possible value of 4096 (i.e., 4 TB). This value must be a positive integer. * The minimum disk size for dedicated clusters is 10GB for AWS and GCP. If you specify diskSizeGB with a lower disk size, Atlas defaults to the minimum disk size value. * Note: The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require additional storage space beyond this limitation, consider upgrading your cluster to a higher tier. * Cannot be used with clusters with local NVMe SSDs * Cannot be used with Azure clusters

property encryptionAtRestProvider

public encryptionAtRestProvider: pulumi.Output<string>;

Possible values are AWS, GCP, AZURE or NONE. Only needed if you desire to manage the keys, see Encryption at Rest using Customer Key Management for complete documentation. You must configure encryption at rest for the Atlas project before enabling it on any cluster in the project. For complete documentation on configuring Encryption at Rest, see Encryption at Rest using Customer Key Management. Requires M10 or greater. and for legacy backups, backup_enabled, to be false or omitted. Note: Atlas encrypts all cluster storage and snapshot volumes, securing all cluster data on disk: a concept known as encryption at rest, by default.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labels

public labels: pulumi.Output<ClusterLabel[]>;

property mongoDbMajorVersion

public mongoDbMajorVersion: pulumi.Output<string>;

Version of the cluster to deploy. Atlas supports the following MongoDB versions for M10+ clusters: 3.6, 4.0, or 4.2. You must set this value to 4.2 if providerInstanceSizeName is either M2 or M5.

property mongoDbVersion

public mongoDbVersion: pulumi.Output<string>;

Version of MongoDB the cluster runs, in major-version.minor-version format.

property mongoUri

public mongoUri: pulumi.Output<string>;

Base connection string for the cluster. Atlas only displays this field after the cluster is operational, not while it builds the cluster.

property mongoUriUpdated

public mongoUriUpdated: pulumi.Output<string>;

Lists when the connection string was last updated. The connection string changes, for example, if you change a replica set to a sharded cluster.

property mongoUriWithOptions

public mongoUriWithOptions: pulumi.Output<string>;

connection string for connecting to the Atlas cluster. Includes the replicaSet, ssl, and authSource query parameters in the connection string with values appropriate for the cluster.

property name

public name: pulumi.Output<string>;

Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed.

property numShards

public numShards: pulumi.Output<number | undefined>;

Number of shards to deploy in the specified zone, minimum 1.

property paused

public paused: pulumi.Output<boolean>;

Flag that indicates whether the cluster is paused or not.

property pitEnabled

public pitEnabled: pulumi.Output<boolean>;
  • Flag that indicates if the cluster uses Continuous Cloud Backup. If set to true, providerBackupEnabled must also be set to true.

property projectId

public projectId: pulumi.Output<string>;

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

property providerAutoScalingComputeMaxInstanceSize

public providerAutoScalingComputeMaxInstanceSize: pulumi.Output<string>;

Maximum instance size to which your cluster can automatically scale (e.g., M40). Required if autoScaling.compute.enabled is true.

property providerAutoScalingComputeMinInstanceSize

public providerAutoScalingComputeMinInstanceSize: pulumi.Output<string>;

Minimum instance size to which your cluster can automatically scale (e.g., M10). Required if autoScaling.compute.scaleDownEnabled is true.

property providerBackupEnabled

public providerBackupEnabled: pulumi.Output<boolean | undefined>;

Flag indicating if the cluster uses Cloud Backup for backups.

property providerDiskIops

public providerDiskIops: pulumi.Output<number>;

The maximum input/output operations per second (IOPS) the system can perform. The possible values depend on the selected providerInstanceSizeName and diskSizeGb.

property providerDiskTypeName

public providerDiskTypeName: pulumi.Output<string>;

Azure disk type of the server’s root volume. If omitted, Atlas uses the default disk type for the selected providerSettings.instanceSizeName. Example disk types and associated storage sizes: P4 - 32GB, P6 - 64GB, P10 - 128GB, P15 - 256GB, P20 - 512GB, P30 - 1024GB, P40 - 2048GB, P50 - 4095GB. More information and the most update to date disk types/storage sizes can be located at https://docs.atlas.mongodb.com/reference/api/clusters-create-one/.

property providerEncryptEbsVolume

public providerEncryptEbsVolume: pulumi.Output<boolean>;

If enabled, the Amazon EBS encryption feature encrypts the server’s root volume for both data at rest within the volume and for data moving between the volume and the cluster. Atlas encrypts all cluster storage and snapshot volumes, securing all cluster data on disk: a concept known as encryption at rest, by default.

property providerInstanceSizeName

public providerInstanceSizeName: pulumi.Output<string>;

Atlas provides different instance sizes, each with a default storage capacity and RAM size. The instance size you select is used for all the data-bearing servers in your cluster. See Create a Cluster providerSettings.instanceSizeName for valid values and default resources. Note free tier (M0) creation is not supported by the Atlas API and hence not supported by this provider.)

property providerName

public providerName: pulumi.Output<string>;

Cloud service provider on which the servers are provisioned.

property providerRegionName

public providerRegionName: pulumi.Output<string>;

Physical location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases. Requires the Atlas region name, see the reference list for AWS, GCP, Azure. Do not specify this field when creating a multi-region cluster using the replicationSpec document or a Global Cluster with the replicationSpecs array.

property providerVolumeType

public providerVolumeType: pulumi.Output<string>;

The type of the volume. The possible values are: STANDARD and PROVISIONED. PROVISIONED required if setting IOPS higher than the default instance IOPS.

property replicationFactor

public replicationFactor: pulumi.Output<number>;

Number of replica set members. Each member keeps a copy of your databases, providing high availability and data redundancy. The possible values are 3, 5, or 7. The default value is 3.

property replicationSpecs

public replicationSpecs: pulumi.Output<ClusterReplicationSpec[]>;

Configuration for cluster regions. See Replication Spec below for more details.

property snapshotBackupPolicies

public snapshotBackupPolicies: pulumi.Output<ClusterSnapshotBackupPolicy[]>;

current snapshot schedule and retention settings for the cluster.

property srvAddress

public srvAddress: pulumi.Output<string>;

Connection string for connecting to the Atlas cluster. The +srv modifier forces the connection to use TLS/SSL. See the mongoURI for additional options.

property stateName

public stateName: pulumi.Output<string>;

Current state of the cluster. The possible states are: - IDLE - CREATING - UPDATING - DELETING - DELETED - REPAIRING

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource CustomDbRole

class CustomDbRole extends CustomResource

mongodbatlas.CustomDbRole provides a Custom DB Role resource. The customDBRoles resource lets you retrieve, create and modify the custom MongoDB roles in your cluster. Use custom MongoDB roles to specify custom sets of actions which cannot be described by the built-in Atlas database user privileges.

IMPORTANT Custom roles cannot use actions unavailable to any cluster version in your project. Custom roles are defined at the project level, and must be compatible with each MongoDB version used by your project’s clusters. If you have a cluster in your project with MongoDB 3.4, you cannot create a custom role that uses actions introduced in MongoDB 3.6, such as useUUID.

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

Example Usage

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

const testRole = new mongodbatlas.CustomDbRole("test_role", {
    actions: [
        {
            action: "UPDATE",
            resources: [{
                collectionName: "",
                databaseName: "anyDatabase",
            }],
        },
        {
            action: "INSERT",
            resources: [{
                collectionName: "",
                databaseName: "anyDatabase",
            }],
        },
        {
            action: "REMOVE",
            resources: [{
                collectionName: "",
                databaseName: "anyDatabase",
            }],
        },
    ],
    projectId: "<PROJECT-ID>",
    roleName: "myCustomRole",
});
With Inherited Roles
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const inheritedRoleOne = new mongodbatlas.CustomDbRole("inherited_role_one", {
    actions: [{
        action: "INSERT",
        resources: [{
            collectionName: "",
            databaseName: "anyDatabase",
        }],
    }],
    projectId: "<PROJECT-ID>",
    roleName: "insertRole",
});
const inheritedRoleTwo = new mongodbatlas.CustomDbRole("inherited_role_two", {
    actions: [{
        action: "SERVER_STATUS",
        resources: [{
            cluster: true,
        }],
    }],
    projectId: inheritedRoleOne.projectId,
    roleName: "statusServerRole",
});
const testRole = new mongodbatlas.CustomDbRole("test_role", {
    actions: [
        {
            action: "UPDATE",
            resources: [{
                collectionName: "",
                databaseName: "anyDatabase",
            }],
        },
        {
            action: "REMOVE",
            resources: [{
                collectionName: "",
                databaseName: "anyDatabase",
            }],
        },
    ],
    inheritedRoles: [
        {
            databaseName: "admin",
            roleName: inheritedRoleOne.roleName,
        },
        {
            databaseName: "admin",
            roleName: inheritedRoleTwo.roleName,
        },
    ],
    projectId: inheritedRoleOne.projectId,
    roleName: "myCustomRole",
});

constructor

new CustomDbRole(name: string, args: CustomDbRoleArgs, opts?: pulumi.CustomResourceOptions)

Create a CustomDbRole resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CustomDbRoleState, opts?: pulumi.CustomResourceOptions): CustomDbRole

Get an existing CustomDbRole resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is CustomDbRole

Returns true if the given object is an instance of CustomDbRole. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property actions

public actions: pulumi.Output<CustomDbRoleAction[] | undefined>;

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property inheritedRoles

public inheritedRoles: pulumi.Output<CustomDbRoleInheritedRole[] | undefined>;

property projectId

public projectId: pulumi.Output<string>;

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

property roleName

public roleName: pulumi.Output<string>;

Name of the inherited role. This can either be another custom role or a built-in role.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource DatabaseUser

class DatabaseUser extends CustomResource

constructor

new DatabaseUser(name: string, args: DatabaseUserArgs, opts?: pulumi.CustomResourceOptions)

Create a DatabaseUser resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DatabaseUserState, opts?: pulumi.CustomResourceOptions): DatabaseUser

Get an existing DatabaseUser resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is DatabaseUser

Returns true if the given object is an instance of DatabaseUser. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property authDatabaseName

public authDatabaseName: pulumi.Output<string | undefined>;

Database against which Atlas authenticates the user. A user must provide both a username and authentication database to log into MongoDB. Accepted values include:

property awsIamType

public awsIamType: pulumi.Output<string | undefined>;

If this value is set, the new database user authenticates with AWS IAM credentials. If no value is given, Atlas uses the default value of NONE. The accepted types are:

property databaseName

DEPRECATED use auth_database_name instead
public databaseName: pulumi.Output<string | undefined>;

Database on which the user has the specified role. A role on the admin database can include privileges that apply to the other databases.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property labels

public labels: pulumi.Output<DatabaseUserLabel[]>;

property password

public password: pulumi.Output<string | undefined>;

property projectId

public projectId: pulumi.Output<string>;

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

property roles

public roles: pulumi.Output<DatabaseUserRole[]>;

List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.

property scopes

public scopes: pulumi.Output<DatabaseUserScope[]>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property username

public username: pulumi.Output<string>;

Username for authenticating to MongoDB.

property x509Type

public x509Type: pulumi.Output<string | undefined>;

X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:

Resource EncryptionAtRest

class EncryptionAtRest extends CustomResource

mongodbatlas.EncryptionAtRest Allows management of encryption at rest for an Atlas project with one of the following providers:

Amazon Web Services Key Management Service Azure Key Vault Google Cloud KMS

After configuring at least one Encryption at Rest provider for the Atlas project, Project Owners can enable Encryption at Rest for each Atlas cluster for which they require encryption. The Encryption at Rest provider does not have to match the cluster cloud service provider.

Atlas does not automatically rotate user-managed encryption keys. Defer to your preferred Encryption at Rest provider’s documentation and guidance for best practices on key rotation. Atlas automatically creates a 365-day key rotation alert when you configure Encryption at Rest using your Key Management in an Atlas project.

See Encryption at Rest for more information, including prerequisites and restrictions.

IMPORTANT Atlas encrypts all cluster storage and snapshot volumes, securing all cluster data on disk: a concept known as encryption at rest, by default.

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

Example Usage

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

const test = new mongodbatlas.EncryptionAtRest("test", {
    awsKms: {
        access_key_id: "AKIAIOSFODNN7EXAMPLE",
        customer_master_key_id: "030gce02-586d-48d2-a966-05ea954fde0g",
        enabled: true,
        region: "US_EAST_1",
        secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    },
    azureKeyVault: {
        azure_environment: "AZURE",
        client_id: "g54f9e2-89e3-40fd-8188-EXAMPLEID",
        enabled: true,
        key_identifier: "https://EXAMPLEKeyVault.vault.azure.net/keys/EXAMPLEKey/d891821e3d364e9eb88fbd3d11807b86",
        key_vault_name: "EXAMPLEKeyVault",
        resource_group_name: "ExampleRGName",
        secret: "EXAMPLESECRET",
        subscription_id: "0ec944e3-g725-44f9-a147-EXAMPLEID",
        tenant_id: "e8e4b6ba-ff32-4c88-a9af-EXAMPLEID",
    },
    googleCloudKms: {
        enabled: true,
        key_version_resource_id: "projects/my-project-common-0/locations/us-east4/keyRings/my-key-ring-0/cryptoKeys/my-key-0/cryptoKeyVersions/1",
        service_account_key: "{\"type\": \"service_account\",\"project_id\": \"my-project-common-0\",\"private_key_id\": \"e120598ea4f88249469fcdd75a9a785c1bb3\",\"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEuwIBA(truncated)SfecnS0mT94D9\\n-----END PRIVATE KEY-----\\n\",\"client_email\": \"my-email-kms-0@my-project-common-0.iam.gserviceaccount.com\",\"client_id\": \"10180967717292066\",\"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\"token_uri\": \"https://accounts.google.com/o/oauth2/token\",\"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/my-email-kms-0%40my-project-common-0.iam.gserviceaccount.com\"}",
    },
    projectId: "<PROJECT-ID>",
});

constructor

new EncryptionAtRest(name: string, args: EncryptionAtRestArgs, opts?: pulumi.CustomResourceOptions)

Create a EncryptionAtRest resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: EncryptionAtRestState, opts?: pulumi.CustomResourceOptions): EncryptionAtRest

Get an existing EncryptionAtRest resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is EncryptionAtRest

Returns true if the given object is an instance of EncryptionAtRest. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property awsKms

public awsKms: pulumi.Output<EncryptionAtRestAwsKms | undefined>;

Specifies AWS KMS configuration details and whether Encryption at Rest is enabled for an Atlas project.

property azureKeyVault

public azureKeyVault: pulumi.Output<EncryptionAtRestAzureKeyVault | undefined>;

Specifies Azure Key Vault configuration details and whether Encryption at Rest is enabled for an Atlas project.

property googleCloudKms

public googleCloudKms: pulumi.Output<EncryptionAtRestGoogleCloudKms | undefined>;

Specifies GCP KMS configuration details and whether Encryption at Rest is enabled for an Atlas project.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property projectId

public projectId: pulumi.Output<string>;

The unique identifier for the project.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource GlobalClusterConfig

class GlobalClusterConfig extends CustomResource

mongodbatlas.GlobalClusterConfig provides a Global Cluster Configuration resource.

NOTE: Groups and projects are synonymous terms. You may find groupId 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,
    backupEnabled: false,
    providerBackupEnabled: true,
    clusterType: "GEOSHARDED",
    providerName: "AWS",
    providerDiskIops: 240,
    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",
    }],
    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>",
    numShards: 1,
    replicationFactor: 3,
    backupEnabled: true,
    autoScalingDiskGbEnabled: true,
    mongoDbMajorVersion: "4.0",
    providerName: "AWS",
    diskSizeGb: 100,
    providerDiskIops: 300,
    providerEncryptEbsVolume: false,
    providerInstanceSizeName: "M40",
    providerRegionName: "US_EAST_1",
});
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",
    }],
});

constructor

new GlobalClusterConfig(name: string, args: GlobalClusterConfigArgs, opts?: pulumi.CustomResourceOptions)

Create a GlobalClusterConfig resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GlobalClusterConfigState, opts?: pulumi.CustomResourceOptions): GlobalClusterConfig

Get an existing GlobalClusterConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is GlobalClusterConfig

Returns true if the given object is an instance of GlobalClusterConfig. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property clusterName

public clusterName: pulumi.Output<string>;

property customZoneMapping

public customZoneMapping: pulumi.Output<{[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.

property customZoneMappings

public customZoneMappings: pulumi.Output<GlobalClusterConfigCustomZoneMapping[] | undefined>;

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.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property managedNamespaces

public managedNamespaces: pulumi.Output<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.

property projectId

public projectId: pulumi.Output<string>;

The unique ID for the project to create the database user. * `clusterName - (Required) The name of the Global Cluster.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource MaintenanceWindow

class MaintenanceWindow extends CustomResource

mongodbatlas.MaintenanceWindow provides a resource to schedule a maintenance window for your MongoDB Atlas Project and/or set to defer a scheduled maintenance up to two times.

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

Maintenance Window Considerations:

  • Urgent Maintenance Activities Cannot Wait: Urgent maintenance activities such as security patches cannot wait for your chosen window. Atlas will start those maintenance activities when needed.

Once maintenance is scheduled for your cluster, you cannot change your maintenance window until the current maintenance efforts have completed. - Maintenance Requires Replica Set Elections: Atlas performs maintenance the same way as the manual maintenance procedure. This requires at least one replica set election during the maintenance window per replica set. - Maintenance Starts As Close to the Hour As Possible: Maintenance always begins as close to the scheduled hour as possible, but in-progress cluster updates or expected system issues could delay the start time.

Example Usage

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

const test = new mongodbatlas.MaintenanceWindow("test", {
    dayOfWeek: 3,
    hourOfDay: 4,
    projectId: "<your-project-id>",
});
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.MaintenanceWindow("test", {
    defer: true,
    projectId: "<your-project-id>",
});

constructor

new MaintenanceWindow(name: string, args: MaintenanceWindowArgs, opts?: pulumi.CustomResourceOptions)

Create a MaintenanceWindow resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MaintenanceWindowState, opts?: pulumi.CustomResourceOptions): MaintenanceWindow

Get an existing MaintenanceWindow resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is MaintenanceWindow

Returns true if the given object is an instance of MaintenanceWindow. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property dayOfWeek

public dayOfWeek: pulumi.Output<number>;

Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.

property defer

public defer: pulumi.Output<boolean>;

Defer maintenance for the given project for one week.

property hourOfDay

public hourOfDay: pulumi.Output<number>;

Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property numberOfDeferrals

public numberOfDeferrals: pulumi.Output<number>;

Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.

property projectId

public projectId: pulumi.Output<string>;

The unique identifier of the project for the Maintenance Window.

property startAsap

public startAsap: pulumi.Output<boolean>;

Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource NetworkContainer

class NetworkContainer extends CustomResource

mongodbatlas.NetworkContainer provides a Network Peering Container resource. The resource lets you create, edit and delete network peering containers. The resource requires your Project ID. Each cloud provider requires slightly different attributes so read the argument reference carefully.

Network peering container is a general term used to describe any cloud providers’ VPC/VNet concept. Containers only need to be created if the peering connection to the cloud provider will be created before the first cluster that requires the container. If the cluster has been/will be created first Atlas automatically creates the required container per the “containers per cloud provider” information that follows (in this case you can obtain the container id from the cluster resource attribute containerId).

The following is the maximum number of Network Peering containers per cloud provider:
• GCP - One container per project.
• AWS and Azure - One container per cloud provider region.

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

Example Usage

Example with AWS
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.NetworkContainer("test", {
    atlasCidrBlock: "10.8.0.0/21",
    projectId: "<YOUR-PROJECT-ID>",
    providerName: "AWS",
    regionName: "US_EAST_1",
});
Example with GCP
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.NetworkContainer("test", {
    atlasCidrBlock: "10.8.0.0/21",
    projectId: "<YOUR-PROJECT-ID>",
    providerName: "GCP",
});
Example with Azure
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.NetworkContainer("test", {
    atlasCidrBlock: "10.8.0.0/21",
    projectId: "<YOUR-PROJECT-ID>",
    providerName: "AZURE",
    region: "US_EAST_2",
});

constructor

new NetworkContainer(name: string, args: NetworkContainerArgs, opts?: pulumi.CustomResourceOptions)

Create a NetworkContainer resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NetworkContainerState, opts?: pulumi.CustomResourceOptions): NetworkContainer

Get an existing NetworkContainer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is NetworkContainer

Returns true if the given object is an instance of NetworkContainer. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property atlasCidrBlock

public atlasCidrBlock: pulumi.Output<string>;

CIDR block that Atlas uses for the Network Peering containers in your project. Atlas uses the specified CIDR block for all other Network Peering connections created in the project. The Atlas CIDR block must be at least a /24 and at most a /21 in one of the following private networks: * Lower bound: 10.0.0.0 - Upper bound: 10.255.255.255 - Prefix: 10/8 * Lower bound: 172.16.0.0 - Upper bound:172.31.255.255 - Prefix: 172.16/12 * Lower bound: 192.168.0.0 - Upper bound:192.168.255.255 - Prefix: 192.168/16

property azureSubscriptionId

public azureSubscriptionId: pulumi.Output<string>;

Unique identifier of the Azure subscription in which the VNet resides. * * vnetName - The name of the Azure VNet. Returns null. This value is populated once you create a new network peering connection with the network peering resource.

property containerId

public containerId: pulumi.Output<string>;

The Network Peering Container ID.

property gcpProjectId

public gcpProjectId: pulumi.Output<string>;

Unique identifier of the GCP project in which the network peer resides. Returns null. This value is populated once you create a new network peering connection with the network peering resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property networkName

public networkName: pulumi.Output<string>;

Unique identifier of the Network Peering connection in the Atlas project. Returns null. This value is populated once you create a new network peering connection with the network peering resource. AZURE ONLY:

property projectId

public projectId: pulumi.Output<string>;

Unique identifier for the Atlas project for this Network Peering Container.

property providerName

public providerName: pulumi.Output<string | undefined>;

Cloud provider for this Network Peering connection. Accepted values are GCP, AWS, AZURE. If omitted, Atlas sets this parameter to AWS.

property provisioned

public provisioned: pulumi.Output<boolean>;

Indicates whether the project has Network Peering connections deployed in the container. AWS ONLY:

property region

public region: pulumi.Output<string>;

Atlas region where the container resides, see the reference list for Atlas Azure region names Azure.

property regionName

public regionName: pulumi.Output<string>;

The Atlas AWS region name for where this container will exist, see the reference list for Atlas AWS region names AWS.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property vnetName

public vnetName: pulumi.Output<string>;

property vpcId

public vpcId: pulumi.Output<string>;

Unique identifier of Atlas’ AWS VPC. CGP ONLY:

Resource NetworkPeering

class NetworkPeering extends CustomResource

constructor

new NetworkPeering(name: string, args: NetworkPeeringArgs, opts?: pulumi.CustomResourceOptions)

Create a NetworkPeering resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NetworkPeeringState, opts?: pulumi.CustomResourceOptions): NetworkPeering

Get an existing NetworkPeering resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is NetworkPeering

Returns true if the given object is an instance of NetworkPeering. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accepterRegionName

public accepterRegionName: pulumi.Output<string>;

Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.

property atlasCidrBlock

public atlasCidrBlock: pulumi.Output<string>;

property atlasGcpProjectId

public atlasGcpProjectId: pulumi.Output<string>;

The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that it is need to set up the reciprocal connection.

property atlasId

public atlasId: pulumi.Output<string>;

property atlasVpcName

public atlasVpcName: pulumi.Output<string>;

property awsAccountId

public awsAccountId: pulumi.Output<string>;

AWS Account ID of the owner of the peer VPC.

property azureDirectoryId

public azureDirectoryId: pulumi.Output<string>;

Unique identifier for an Azure AD directory.

property azureSubscriptionId

public azureSubscriptionId: pulumi.Output<string>;

Unique identifier of the Azure subscription in which the VNet resides.

property connectionId

public connectionId: pulumi.Output<string>;

Unique identifier of the Atlas network peering container.

property containerId

public containerId: pulumi.Output<string>;

Unique identifier of the MongoDB Atlas container for the provider (GCP) or provider/region (AWS, AZURE). You can create an MongoDB Atlas container using the networkContainer resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.

property errorMessage

public errorMessage: pulumi.Output<string>;

When "status" : "FAILED", Atlas provides a description of the error.

property errorState

public errorState: pulumi.Output<string>;

Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.

property errorStateName

public errorStateName: pulumi.Output<string>;

Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.

property gcpProjectId

public gcpProjectId: pulumi.Output<string>;

GCP project ID of the owner of the network peer.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property networkName

public networkName: pulumi.Output<string>;

Name of the network peer to which Atlas connects.

property peerId

public peerId: pulumi.Output<string>;

Unique identifier of the Atlas network peer.

property projectId

public projectId: pulumi.Output<string>;

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

property providerName

public providerName: pulumi.Output<string>;

Cloud provider to whom the peering connection is being made. (Possible Values AWS, AZURE, GCP).

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

Name of your Azure resource group.

property routeTableCidrBlock

public routeTableCidrBlock: pulumi.Output<string>;

AWS VPC CIDR block or subnet.

property status

public status: pulumi.Output<string>;

Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.

property statusName

public statusName: pulumi.Output<string>;

(AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property vnetName

public vnetName: pulumi.Output<string>;

Name of your Azure VNet.

property vpcId

public vpcId: pulumi.Output<string>;

Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the networkContainer resource).

Resource PrivateEndpoint

class PrivateEndpoint extends CustomResource

mongodbatlas.PrivateEndpoint provides a Private Endpoint resource. This represents a Private Endpoint Connection that can be created in an Atlas project.

IMPORTANT:You must have one of the following roles to successfully handle the resource: * Organization Owner * Project Owner

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

NOTE: A network container is created for a private endpoint to reside in if one does not yet exist in the project.

Example Usage

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

const test = new mongodbatlas.PrivateEndpoint("test", {
    projectId: "<PROJECT-ID>",
    providerName: "AWS",
    region: "us-east-1",
});

constructor

new PrivateEndpoint(name: string, args: PrivateEndpointArgs, opts?: pulumi.CustomResourceOptions)

Create a PrivateEndpoint resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PrivateEndpointState, opts?: pulumi.CustomResourceOptions): PrivateEndpoint

Get an existing PrivateEndpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is PrivateEndpoint

Returns true if the given object is an instance of PrivateEndpoint. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property endpointServiceName

public endpointServiceName: pulumi.Output<string>;

Name of the PrivateLink endpoint service in AWS. Returns null while the endpoint service is being created.

property errorMessage

public errorMessage: pulumi.Output<string>;

Error message pertaining to the AWS PrivateLink connection. Returns null if there are no errors.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property interfaceEndpoints

public interfaceEndpoints: pulumi.Output<string[]>;

Unique identifiers of the interface endpoints in your VPC that you added to the AWS PrivateLink connection.

property privateLinkId

public privateLinkId: pulumi.Output<string>;

Unique identifier of the AWS PrivateLink connection.

property projectId

public projectId: pulumi.Output<string>;

Required Unique identifier for the project.

property providerName

public providerName: pulumi.Output<string>;

property region

public region: pulumi.Output<string>;

Cloud provider region in which you want to create the private endpoint connection. Accepted values are: * us-east-1 * us-east-2 * us-west-1 * us-west-2 * ca-central-1 * sa-east-1 * eu-north-1 * eu-west-1 * eu-west-2 * eu-west-3 * eu-central-1 * me-south-1 * ap-northeast-1 * ap-northeast-2 * ap-south-1 * ap-southeast-1 * ap-southeast-2 * ap-east-1

property status

public status: pulumi.Output<string>;

Status of the AWS PrivateLink connection. Returns one of the following values:

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class PrivateEndpointInterfaceLink extends CustomResource

mongodbatlas.PrivateEndpointInterfaceLink provides a Private Endpoint Interface Link resource. This represents a Private Endpoint Interface Link, which adds one interface endpoint to a private endpoint connection in an Atlas project.

IMPORTANT:You must have one of the following roles to successfully handle the resource: * Organization Owner * Project Owner

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

Example Usage

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

const testPrivateEndpoint = new mongodbatlas.PrivateEndpoint("test", {
    projectId: "<PROJECT_ID>",
    providerName: "AWS",
    region: "us-east-1",
});
const ptfeService = new aws.ec2.VpcEndpoint("ptfe_service", {
    securityGroupIds: ["sg-3f238186"],
    serviceName: testPrivateEndpoint.endpointServiceName,
    subnetIds: ["subnet-de0406d2"],
    vpcEndpointType: "Interface",
    vpcId: "vpc-7fc0a543",
});
const testPrivateEndpointInterfaceLink = new mongodbatlas.PrivateEndpointInterfaceLink("test", {
    interfaceEndpointId: ptfeService.id,
    privateLinkId: testPrivateEndpoint.privateLinkId,
    projectId: testPrivateEndpoint.projectId,
});
new PrivateEndpointInterfaceLink(name: string, args: PrivateEndpointInterfaceLinkArgs, opts?: pulumi.CustomResourceOptions)

Create a PrivateEndpointInterfaceLink resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PrivateEndpointInterfaceLinkState, opts?: pulumi.CustomResourceOptions): PrivateEndpointInterfaceLink

Get an existing PrivateEndpointInterfaceLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

getProvider(moduleMember: string): ProviderResource | undefined
public static isInstance(obj: any): obj is PrivateEndpointInterfaceLink

Returns true if the given object is an instance of PrivateEndpointInterfaceLink. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

public connectionStatus: pulumi.Output<string>;

Status of the interface endpoint. Returns one of the following values:

public deleteRequested: pulumi.Output<boolean>;

Indicates if Atlas received a request to remove the interface endpoint from the private endpoint connection.

public errorMessage: pulumi.Output<string>;

Error message pertaining to the interface endpoint. Returns null if there are no errors.

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

public interfaceEndpointId: pulumi.Output<string>;

Unique identifier of the interface endpoint you created in your VPC with the AWS resource.

public privateLinkId: pulumi.Output<string>;

Unique identifier of the AWS PrivateLink connection which is created by mongodbatlas.PrivateEndpoint resource.

public projectId: pulumi.Output<string>;

Unique identifier for the project.

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource PrivateIpMode

class PrivateIpMode extends CustomResource

mongodbatlas.PrivateIpMode provides a Private IP Mode resource. This allows one to disable Connect via Peering Only mode for a MongoDB Atlas Project.

Deprecated Feature:
This feature has been deprecated. Use Split Horizon connection strings to connect to your cluster. These connection strings allow you to connect using both VPC/VNet Peering and whitelisted public IP addresses. To learn more about support for Split Horizon, see this FAQ. You need this endpoint to disable Peering Only.

Example Usage

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

const myPrivateIpMode = new mongodbatlas.PrivateIpMode("my_private_ip_mode", {
    enabled: false,
    projectId: "<YOUR PROJECT ID>",
});

constructor

new PrivateIpMode(name: string, args: PrivateIpModeArgs, opts?: pulumi.CustomResourceOptions)

Create a PrivateIpMode resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PrivateIpModeState, opts?: pulumi.CustomResourceOptions): PrivateIpMode

Get an existing PrivateIpMode resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is PrivateIpMode

Returns true if the given object is an instance of PrivateIpMode. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property enabled

public enabled: pulumi.Output<boolean>;

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property projectId

public projectId: pulumi.Output<string>;

The unique ID for the project to enable Only Private IP Mode.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Project

class Project extends CustomResource

constructor

new Project(name: string, args: ProjectArgs, opts?: pulumi.CustomResourceOptions)

Create a Project resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectState, opts?: pulumi.CustomResourceOptions): Project

Get an existing Project resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Project

Returns true if the given object is an instance of Project. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property clusterCount

public clusterCount: pulumi.Output<number>;

The number of Atlas clusters deployed in the project..

property created

public created: pulumi.Output<string>;

The ISO-8601-formatted timestamp of when Atlas created the project..

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

property orgId

public orgId: pulumi.Output<string>;

The ID of the organization you want to create the project within.

property teams

public teams: pulumi.Output<ProjectTeam[] | undefined>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource ProjectIpWhitelist

class ProjectIpWhitelist extends CustomResource

mongodbatlas.ProjectIpWhitelist provides an IP Whitelist entry resource. The whitelist grants access from IPs, CIDRs or AWS Security Groups (if VPC Peering is enabled) to clusters within the Project.

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

IMPORTANT: When you remove an entry from the whitelist, existing connections from the removed address(es) may remain open for a variable amount of time. How much time passes before Atlas closes the connection depends on several factors, including how the connection was established, the particular behavior of the application or driver using the address, and the connection protocol (e.g., TCP or UDP). This is particularly important to consider when changing an existing IP address or CIDR block as they cannot be updated via the Provider (comments can however), hence a change will force the destruction and recreation of entries.

Example Usage

Using CIDR Block
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.ProjectIpWhitelist("test", {
    cidrBlock: "1.2.3.4/32",
    comment: "cidr block for tf acc testing",
    projectId: "<PROJECT-ID>",
});
Using IP Address
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.ProjectIpWhitelist("test", {
    comment: "ip address for tf acc testing",
    ipAddress: "2.3.4.5",
    projectId: "<PROJECT-ID>",
});
Using an AWS Security Group
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testNetworkContainer = new mongodbatlas.NetworkContainer("testNetworkContainer", {
    projectId: "<PROJECT-ID>",
    atlasCidrBlock: "192.168.208.0/21",
    providerName: "AWS",
    regionName: "US_EAST_1",
});
const testNetworkPeering = new mongodbatlas.NetworkPeering("testNetworkPeering", {
    projectId: "<PROJECT-ID>",
    containerId: testNetworkContainer.containerId,
    accepterRegionName: "us-east-1",
    providerName: "AWS",
    routeTableCidrBlock: "172.31.0.0/16",
    vpcId: "vpc-0d93d6f69f1578bd8",
    awsAccountId: "232589400519",
});
const testProjectIpWhitelist = new mongodbatlas.ProjectIpWhitelist("testProjectIpWhitelist", {
    projectId: "<PROJECT-ID>",
    awsSecurityGroup: "sg-0026348ec11780bd1",
    comment: "TestAcc for awsSecurityGroup",
}, {
    dependsOn: ["mongodbatlas_network_peering.test"],
});

IMPORTANT: In order to use AWS Security Group(s) VPC Peering must be enabled like above example.

constructor

new ProjectIpWhitelist(name: string, args: ProjectIpWhitelistArgs, opts?: pulumi.CustomResourceOptions)

Create a ProjectIpWhitelist resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectIpWhitelistState, opts?: pulumi.CustomResourceOptions): ProjectIpWhitelist

Get an existing ProjectIpWhitelist resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ProjectIpWhitelist

Returns true if the given object is an instance of ProjectIpWhitelist. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property awsSecurityGroup

public awsSecurityGroup: pulumi.Output<string>;

ID of the whitelisted AWS security group. Mutually exclusive with cidrBlock and ipAddress.

property cidrBlock

public cidrBlock: pulumi.Output<string>;

Whitelist entry in Classless Inter-Domain Routing (CIDR) notation. Mutually exclusive with awsSecurityGroup and ipAddress.

property comment

public comment: pulumi.Output<string>;

Comment to add to the whitelist entry.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ipAddress

public ipAddress: pulumi.Output<string>;

Whitelisted IP address. Mutually exclusive with awsSecurityGroup and cidrBlock.

property projectId

public projectId: pulumi.Output<string>;

The ID of the project in which to add the whitelist entry.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Provider

class Provider extends ProviderResource

The provider type for the mongodbatlas package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

constructor

new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)

Create a Provider resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Provider

Returns true if the given object is an instance of Provider. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method register

static register(provider: ProviderResource | undefined): Promise<string | undefined>

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Team

class Team extends CustomResource

mongodbatlas.Teams provides a Team resource. The resource lets you create, edit and delete Teams. Also, Teams can be assigned to multiple projects, and team members’ access to the project is determined by the team’s project role.

IMPORTANT: MongoDB Atlas Team limits: max 250 teams in an organization and max 100 teams per project.

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

MongoDB Atlas Team limits: max 250 teams in an organization and max 100 teams per project.

Example Usage

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

const test = new mongodbatlas.Teams("test", {
    orgId: "<ORGANIZATION-ID>",
    usernames: [
        "user1@email.com",
        "user2@email.com",
        "user3@email.com",
    ],
});

constructor

new Team(name: string, args: TeamArgs, opts?: pulumi.CustomResourceOptions)

Create a Team resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TeamState, opts?: pulumi.CustomResourceOptions): Team

Get an existing Team resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Team

Returns true if the given object is an instance of Team. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the team you want to create.

property orgId

public orgId: pulumi.Output<string>;

The unique identifier for the organization you want to associate the team with.

property teamId

public teamId: pulumi.Output<string>;

The unique identifier for the team.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property usernames

public usernames: pulumi.Output<string[]>;

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

Resource Teams

class Teams extends CustomResource

constructor

new Teams(name: string, args: TeamsArgs, opts?: pulumi.CustomResourceOptions)

Create a Teams resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TeamsState, opts?: pulumi.CustomResourceOptions): Teams

Get an existing Teams resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Teams

Returns true if the given object is an instance of Teams. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

property orgId

public orgId: pulumi.Output<string>;

property teamId

public teamId: pulumi.Output<string>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property usernames

public usernames: pulumi.Output<string[]>;

Resource X509AuthenticationDatabaseUser

class X509AuthenticationDatabaseUser extends CustomResource

mongodbatlas.X509AuthenticationDatabaseUser provides a X509 Authentication Database User resource. The mongodbatlas.X509AuthenticationDatabaseUser resource lets you manage MongoDB users who authenticate using X.509 certificates. You can manage these X.509 certificates or let Atlas do it for you.

ManagementDescription
AtlasAtlas manages your Certificate Authority and can generate certificates for your MongoDB users. No additional X.509 configuration is required.
CustomerYou must provide a Certificate Authority and generate certificates for your MongoDB users.

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

Example Usage

S
Example Usage: Generate an Atlas-managed X.509 certificate for a MongoDB user
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const user = new mongodbatlas.DatabaseUser("user", {
    databaseName: "$external",
    labels: [{
        key: "My Key",
        value: "My Value",
    }],
    projectId: "<PROJECT-ID>",
    roles: [{
        databaseName: "admin",
        roleName: "atlasAdmin",
    }],
    username: "myUsername",
    x509Type: "MANAGED",
});
const test = new mongodbatlas.X509AuthenticationDatabaseUser("test", {
    monthsUntilExpiration: 2,
    projectId: user.projectId,
    username: user.username,
});
Example Usage: Save a customer-managed X.509 configuration for an Atlas project
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.X509AuthenticationDatabaseUser("test", {
    customerX509Cas: `  -----BEGIN CERTIFICATE-----
  MIICmTCCAgICCQDZnHzklxsT9TANBgkqhkiG9w0BAQsFADCBkDELMAkGA1UEBhMC
  VVMxDjAMBgNVBAgMBVRleGFzMQ8wDQYDVQQHDAZBdXN0aW4xETAPBgNVBAoMCHRl
  c3QuY29tMQ0wCwYDVQQLDARUZXN0MREwDwYDVQQDDAh0ZXN0LmNvbTErMCkGCSqG
  SIb3DQEJARYcbWVsaXNzYS5wbHVua2V0dEBtb25nb2RiLmNvbTAeFw0yMDAyMDQy
  MDQ2MDFaFw0yMTAyMDMyMDQ2MDFaMIGQMQswCQYDVQQGEwJVUzEOMAwGA1UECAwF
  VGV4YXMxDzANBgNVBAcMBkF1c3RpbjERMA8GA1UECgwIdGVzdC5jb20xDTALBgNV
  BAsMBFRlc3QxETAPBgNVBAMMCHRlc3QuY29tMSswKQYJKoZIhvcNAQkBFhxtZWxp
  c3NhLnBsdW5rZXR0QG1vbmdvZGIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
  iQKBgQCf1LRqr1zftzdYx2Aj9G76tb0noMPtj6faGLlPji1+m6Rn7RWD9L0ntWAr
  cURxvypa9jZ9MXFzDtLevvd3tHEmfrUT3ukNDX6+Jtc4kWm+Dh2A70Pd+deKZ2/O
  Fh8audEKAESGXnTbeJCeQa1XKlIkjqQHBNwES5h1b9vJtFoLJwIDAQABMA0GCSqG
  SIb3DQEBCwUAA4GBADMUncjEPV/MiZUcVNGmktP6BPmEqMXQWUDpdGW2+Tg2JtUA
  7MMILtepBkFzLO+GlpZxeAlXO0wxiNgEmCRONgh4+t2w3e7a8GFijYQ99FHrAC5A
  iul59bdl18gVqXia1Yeq/iK7Ohfy/Jwd7Hsm530elwkM/ZEkYDjBlZSXYdyz
  -----END CERTIFICATE-----"
`,
    projectId: "<PROJECT-ID>",
});

constructor

new X509AuthenticationDatabaseUser(name: string, args: X509AuthenticationDatabaseUserArgs, opts?: pulumi.CustomResourceOptions)

Create a X509AuthenticationDatabaseUser resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: X509AuthenticationDatabaseUserState, opts?: pulumi.CustomResourceOptions): X509AuthenticationDatabaseUser

Get an existing X509AuthenticationDatabaseUser resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is X509AuthenticationDatabaseUser

Returns true if the given object is an instance of X509AuthenticationDatabaseUser. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property certificates

public certificates: pulumi.Output<X509AuthenticationDatabaseUserCertificate[]>;

Array of objects where each details one unexpired database user certificate.

property currentCertificate

public currentCertificate: pulumi.Output<string>;

Contains the last X.509 certificate and private key created for a database user.

property customerX509Cas

public customerX509Cas: pulumi.Output<string | undefined>;

PEM string containing one or more customer CAs for database user authentication.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property monthsUntilExpiration

public monthsUntilExpiration: pulumi.Output<number | undefined>;

A number of months that the created certificate is valid for before expiry, up to 24 months. By default is 3.

property projectId

public projectId: pulumi.Output<string>;

Identifier for the Atlas project associated with the X.509 configuration.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property username

public username: pulumi.Output<string | undefined>;

Username of the database user to create a certificate for.

Functions

Function get509AuthenticationDatabaseUser

get509AuthenticationDatabaseUser(args: Get509AuthenticationDatabaseUserArgs, opts?: pulumi.InvokeOptions): Promise<Get509AuthenticationDatabaseUserResult>

mongodbatlas.X509AuthenticationDatabaseUser describe a X509 Authentication Database User. This represents a X509 Authentication Database User.

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

Example Usage

S
Example Usage: Generate an Atlas-managed X.509 certificate for a MongoDB user
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const user = new mongodbatlas.DatabaseUser("user", {
    databaseName: "$external",
    labels: [{
        key: "My Key",
        value: "My Value",
    }],
    projectId: "<PROJECT-ID>",
    roles: [{
        databaseName: "admin",
        roleName: "atlasAdmin",
    }],
    username: "myUsername",
    x509Type: "MANAGED",
});
const testX509AuthenticationDatabaseUser = new mongodbatlas.X509AuthenticationDatabaseUser("test", {
    monthsUntilExpiration: 2,
    projectId: user.projectId,
    username: user.username,
});
const test509AuthenticationDatabaseUser = pulumi.all([testX509AuthenticationDatabaseUser.projectId, testX509AuthenticationDatabaseUser.username]).apply(([projectId, username]) => mongodbatlas.get509AuthenticationDatabaseUser({
    projectId: projectId,
    username: username,
}, { async: true }));
Example Usage: Save a customer-managed X.509 configuration for an Atlas project
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testX509AuthenticationDatabaseUser = new mongodbatlas.X509AuthenticationDatabaseUser("test", {
    customerX509Cas: `  -----BEGIN CERTIFICATE-----
  MIICmTCCAgICCQDZnHzklxsT9TANBgkqhkiG9w0BAQsFADCBkDELMAkGA1UEBhMC
  VVMxDjAMBgNVBAgMBVRleGFzMQ8wDQYDVQQHDAZBdXN0aW4xETAPBgNVBAoMCHRl
  c3QuY29tMQ0wCwYDVQQLDARUZXN0MREwDwYDVQQDDAh0ZXN0LmNvbTErMCkGCSqG
  SIb3DQEJARYcbWVsaXNzYS5wbHVua2V0dEBtb25nb2RiLmNvbTAeFw0yMDAyMDQy
  MDQ2MDFaFw0yMTAyMDMyMDQ2MDFaMIGQMQswCQYDVQQGEwJVUzEOMAwGA1UECAwF
  VGV4YXMxDzANBgNVBAcMBkF1c3RpbjERMA8GA1UECgwIdGVzdC5jb20xDTALBgNV
  BAsMBFRlc3QxETAPBgNVBAMMCHRlc3QuY29tMSswKQYJKoZIhvcNAQkBFhxtZWxp
  c3NhLnBsdW5rZXR0QG1vbmdvZGIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
  iQKBgQCf1LRqr1zftzdYx2Aj9G76tb0noMPtj6faGLlPji1+m6Rn7RWD9L0ntWAr
  cURxvypa9jZ9MXFzDtLevvd3tHEmfrUT3ukNDX6+Jtc4kWm+Dh2A70Pd+deKZ2/O
  Fh8audEKAESGXnTbeJCeQa1XKlIkjqQHBNwES5h1b9vJtFoLJwIDAQABMA0GCSqG
  SIb3DQEBCwUAA4GBADMUncjEPV/MiZUcVNGmktP6BPmEqMXQWUDpdGW2+Tg2JtUA
  7MMILtepBkFzLO+GlpZxeAlXO0wxiNgEmCRONgh4+t2w3e7a8GFijYQ99FHrAC5A
  iul59bdl18gVqXia1Yeq/iK7Ohfy/Jwd7Hsm530elwkM/ZEkYDjBlZSXYdyz
  -----END CERTIFICATE-----"
`,
    projectId: "<PROJECT-ID>",
});
const test509AuthenticationDatabaseUser = testX509AuthenticationDatabaseUser.projectId.apply(projectId => mongodbatlas.get509AuthenticationDatabaseUser({
    projectId: projectId,
}, { async: true }));

Function getAlertConfiguration

getAlertConfiguration(args: GetAlertConfigurationArgs, opts?: pulumi.InvokeOptions): Promise<GetAlertConfigurationResult>

mongodbatlas.AlertConfiguration describes an Alert Configuration.

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

Example Usage

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

const testMongodbatlasAlertConfiguration = new mongodbatlas.AlertConfiguration("test", {
    enabled: true,
    eventType: "OUTSIDE_METRIC_THRESHOLD",
    matchers: [{
        fieldName: "HOSTNAME_AND_PORT",
        operator: "EQUALS",
        value: "SECONDARY",
    }],
    metricThreshold: {
        metric_name: "ASSERT_REGULAR",
        mode: "AVERAGE",
        operator: "LESS_THAN",
        threshold: 99,
        units: "RAW",
    },
    notifications: [{
        delayMin: 0,
        emailEnabled: true,
        intervalMin: 5,
        smsEnabled: false,
        typeName: "GROUP",
    }],
    projectId: "<PROJECT-ID>",
});
const testAlertConfiguration = pulumi.all([testMongodbatlasAlertConfiguration.alertConfigurationId, testMongodbatlasAlertConfiguration.projectId]).apply(([alertConfigurationId, projectId]) => mongodbatlas.getAlertConfiguration({
    alertConfigurationId: alertConfigurationId,
    projectId: projectId,
}, { async: true }));

NOTE: In order to allow for a fast pace of change to alert variables some validations have been removed from this resource in order to unblock alert creation. Impacted areas have links to the MongoDB Atlas API documentation so always check it for the most current information: https://docs.atlas.mongodb.com/reference/api/alert-configurations-create-config/

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

const testMongodbatlasAlertConfiguration = new mongodbatlas.AlertConfiguration("test", {
    enabled: true,
    eventType: "REPLICATION_OPLOG_WINDOW_RUNNING_OUT",
    matchers: [{
        fieldName: "HOSTNAME_AND_PORT",
        operator: "EQUALS",
        value: "SECONDARY",
    }],
    notifications: [{
        delayMin: 0,
        emailEnabled: true,
        intervalMin: 5,
        roles: [
            "GROUP_CHARTS_ADMIN",
            "GROUP_CLUSTER_MANAGER",
        ],
        smsEnabled: false,
        typeName: "GROUP",
    }],
    projectId: "<PROJECT-ID>",
    threshold: {
        operator: "LESS_THAN",
        threshold: 1,
        units: "HOURS",
    },
});
const testAlertConfiguration = pulumi.all([testMongodbatlasAlertConfiguration.alertConfigurationId, testMongodbatlasAlertConfiguration.projectId]).apply(([alertConfigurationId, projectId]) => mongodbatlas.getAlertConfiguration({
    alertConfigurationId: alertConfigurationId,
    projectId: projectId,
}, { async: true }));

Function getAuditing

getAuditing(args: GetAuditingArgs, opts?: pulumi.InvokeOptions): Promise<GetAuditingResult>

mongodbatlas.Auditing describes a Auditing.

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

Example Usage

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

const testMongodbatlasAuditing = new mongodbatlas.Auditing("test", {
    auditAuthorizationSuccess: false,
    auditFilter: "{ 'atype': 'authenticate', 'param': {   'user': 'auditAdmin',   'db': 'admin',   'mechanism': 'SCRAM-SHA-1' }}",
    enabled: true,
    projectId: "<project-id>",
});
const testAuditing = testMongodbatlasAuditing.id.apply(id => mongodbatlas.getAuditing({
    projectId: id,
}, { async: true }));

Function getCloudProviderSnapshot

getCloudProviderSnapshot(args: GetCloudProviderSnapshotArgs, opts?: pulumi.InvokeOptions): Promise<GetCloudProviderSnapshotResult>

mongodbatlas.CloudProviderSnapshot provides an Cloud Backup Snapshot datasource. Atlas Cloud Backup Snapshots provide localized backup storage using the native snapshot functionality of the cluster’s cloud service.

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

Example Usage

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

const testMongodbatlasCloudProviderSnapshot = new mongodbatlas.CloudProviderSnapshot("test", {
    clusterName: "MyClusterTest",
    description: "SomeDescription",
    groupId: "5d0f1f73cf09a29120e173cf",
    retentionInDays: 1,
});
const testCloudProviderSnapshot = pulumi.all([testMongodbatlasCloudProviderSnapshot.clusterName, testMongodbatlasCloudProviderSnapshot.groupId]).apply(([clusterName, groupId]) => mongodbatlas.getCloudProviderSnapshot({
    clusterName: clusterName,
    groupId: groupId,
    snapshotId: "5d1285acd5ec13b6c2d1726a",
}, { async: true }));

Function getCloudProviderSnapshotBackupPolicy

getCloudProviderSnapshotBackupPolicy(args: GetCloudProviderSnapshotBackupPolicyArgs, opts?: pulumi.InvokeOptions): Promise<GetCloudProviderSnapshotBackupPolicyResult>

mongodbatlas.CloudProviderSnapshotBackupPolicy provides a Cloud Backup Snapshot Backup Policy datasource. An Atlas Cloud Backup Snapshot Policy provides the current snapshot schedule and retention settings for the cluster.

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

Function getCloudProviderSnapshotRestoreJob

getCloudProviderSnapshotRestoreJob(args: GetCloudProviderSnapshotRestoreJobArgs, opts?: pulumi.InvokeOptions): Promise<GetCloudProviderSnapshotRestoreJobResult>

mongodbatlas.CloudProviderSnapshotRestoreJob provides a Cloud Backup Snapshot Restore Job datasource. Gets all the cloud backup snapshot restore jobs for the specified cluster.

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

Example Usage

First create a snapshot of the desired cluster. Then request that snapshot be restored in an automated fashion to the designated cluster and project.

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

const testCloudProviderSnapshot = new mongodbatlas.CloudProviderSnapshot("test", {
    clusterName: "MyCluster",
    description: "MyDescription",
    projectId: "5cf5a45a9ccf6400e60981b6",
    retentionInDays: 1,
});
const testMongodbatlasCloudProviderSnapshotRestoreJob = new mongodbatlas.CloudProviderSnapshotRestoreJob("test", {
    clusterName: "MyCluster",
    deliveryType: {
        automated: true,
        target_cluster_name: "MyCluster",
        target_project_id: "5cf5a45a9ccf6400e60981b6",
    },
    projectId: "5cf5a45a9ccf6400e60981b6",
    snapshotId: testCloudProviderSnapshot.id,
});
const testCloudProviderSnapshotRestoreJob = pulumi.all([testMongodbatlasCloudProviderSnapshotRestoreJob.clusterName, testMongodbatlasCloudProviderSnapshotRestoreJob.id, testMongodbatlasCloudProviderSnapshotRestoreJob.projectId]).apply(([clusterName, id, projectId]) => mongodbatlas.getCloudProviderSnapshotRestoreJob({
    clusterName: clusterName,
    jobId: id,
    projectId: projectId,
}, { async: true }));

Function getCloudProviderSnapshotRestoreJobs

getCloudProviderSnapshotRestoreJobs(args: GetCloudProviderSnapshotRestoreJobsArgs, opts?: pulumi.InvokeOptions): Promise<GetCloudProviderSnapshotRestoreJobsResult>

mongodbatlas.getCloudProviderSnapshotRestoreJobs provides a Cloud Backup Snapshot Restore Jobs datasource. Gets all the cloud backup snapshot restore jobs for the specified cluster.

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

Example Usage

First create a snapshot of the desired cluster. Then request that snapshot be restored in an automated fashion to the designated cluster and project.

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

const testCloudProviderSnapshot = new mongodbatlas.CloudProviderSnapshot("test", {
    clusterName: "MyCluster",
    description: "MyDescription",
    projectId: "5cf5a45a9ccf6400e60981b6",
    retentionInDays: 1,
});
const testCloudProviderSnapshotRestoreJob = new mongodbatlas.CloudProviderSnapshotRestoreJob("test", {
    clusterName: "MyCluster",
    deliveryType: {
        automated: true,
        target_cluster_name: "MyCluster",
        target_project_id: "5cf5a45a9ccf6400e60981b6",
    },
    projectId: "5cf5a45a9ccf6400e60981b6",
    snapshotId: testCloudProviderSnapshot.id,
});
const testCloudProviderSnapshotRestoreJobs = pulumi.all([testCloudProviderSnapshotRestoreJob.clusterName, testCloudProviderSnapshotRestoreJob.projectId]).apply(([clusterName, projectId]) => mongodbatlas.getCloudProviderSnapshotRestoreJobs({
    clusterName: clusterName,
    itemsPerPage: 5,
    pageNum: 1,
    projectId: projectId,
}, { async: true }));

Function getCloudProviderSnapshots

getCloudProviderSnapshots(args: GetCloudProviderSnapshotsArgs, opts?: pulumi.InvokeOptions): Promise<GetCloudProviderSnapshotsResult>

mongodbatlas.getCloudProviderSnapshots provides an Cloud Backup Snapshot datasource. Atlas Cloud Backup Snapshots provide localized backup storage using the native snapshot functionality of the cluster’s cloud service.

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

Example Usage

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

const testMongodbatlasCloudProviderSnapshots = new mongodbatlas.CloudProviderSnapshots("test", {
    clusterName: "MyClusterTest",
    description: "SomeDescription",
    groupId: "5d0f1f73cf09a29120e173cf",
    retentionInDays: 1,
});
const testCloudProviderSnapshots = pulumi.all([testMongodbatlasCloudProviderSnapshots.clusterName, testMongodbatlasCloudProviderSnapshots.groupId]).apply(([clusterName, groupId]) => mongodbatlas.getCloudProviderSnapshots({
    clusterName: clusterName,
    groupId: groupId,
    itemsPerPage: 5,
    pageNum: 1,
}, { async: true }));

Function getCluster

getCluster(args: GetClusterArgs, opts?: pulumi.InvokeOptions): Promise<GetClusterResult>

mongodbatlas.Cluster describes a Cluster. The. The data source requires your Project ID.

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

IMPORTANT:
• Changes to cluster configurations can affect costs. Before making changes, please see Billing.
• If your Atlas project contains a custom role that uses actions introduced in a specific MongoDB version, you cannot create a cluster with a MongoDB version less than that version unless you delete the custom role.

Function getClusters

getClusters(args: GetClustersArgs, opts?: pulumi.InvokeOptions): Promise<GetClustersResult>

mongodbatlas.Cluster describes all Clusters by the provided project_id. The data source requires your Project ID.

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

IMPORTANT:
• Changes to cluster configurations can affect costs. Before making changes, please see Billing.
• If your Atlas project contains a custom role that uses actions introduced in a specific MongoDB version, you cannot create a cluster with a MongoDB version less than that version unless you delete the custom role.

Example Usage

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

const testCluster = new mongodbatlas.Cluster("testCluster", {
    projectId: "<YOUR-PROJECT-ID>",
    diskSizeGb: 100,
    numShards: 1,
    replicationFactor: 3,
    providerBackupEnabled: true,
    autoScalingDiskGbEnabled: true,
    providerName: "AWS",
    providerDiskIops: 300,
    providerVolumeType: "STANDARD",
    providerEncryptEbsVolume: true,
    providerInstanceSizeName: "M40",
    providerRegionName: "US_EAST_1",
});
const testClusters = testCluster.projectId.apply(projectId => mongodbatlas.getClusters({
    projectId: projectId,
}));

Function getCustomDbRole

getCustomDbRole(args: GetCustomDbRoleArgs, opts?: pulumi.InvokeOptions): Promise<GetCustomDbRoleResult>

mongodbatlas.CustomDbRole describe a Custom DB Role. This represents a custom db role.

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

Example Usage

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

const testRole = new mongodbatlas.CustomDbRole("test_role", {
    actions: [
        {
            action: "UPDATE",
            resources: [{
                collectionName: "",
                databaseName: "anyDatabase",
            }],
        },
        {
            action: "INSERT",
            resources: [{
                collectionName: "",
                databaseName: "anyDatabase",
            }],
        },
    ],
    projectId: "<PROJECT-ID>",
    roleName: "myCustomRole",
});
const test = pulumi.all([testRole.projectId, testRole.roleName]).apply(([projectId, roleName]) => mongodbatlas.getCustomDbRole({
    projectId: projectId,
    roleName: roleName,
}, { async: true }));

Function getCustomDbRoles

getCustomDbRoles(args: GetCustomDbRolesArgs, opts?: pulumi.InvokeOptions): Promise<GetCustomDbRolesResult>

mongodbatlas.getCustomDbRoles describe all Custom DB Roles. This represents a custom db roles.

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

Example Usage

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

const testDatabaseUser = new mongodbatlas.DatabaseUser("test", {
    databaseName: "admin",
    password: "test-acc-password",
    projectId: "<PROJECT-ID>",
    roles: [
        {
            databaseName: "admin",
            roleName: "readWrite",
        },
        {
            databaseName: "admin",
            roleName: "atlasAdmin",
        },
    ],
    username: "test-acc-username",
});
const testCustomDbRoles = mongodbatlas_custom_db_role_test.projectId.apply(projectId => mongodbatlas.getCustomDbRoles({
    projectId: projectId,
}, { async: true }));

Function getDatabaseUser

getDatabaseUser(args: GetDatabaseUserArgs, opts?: pulumi.InvokeOptions): Promise<GetDatabaseUserResult>

mongodbatlas.DatabaseUser describe a Database User. This represents a database user which will be applied to all clusters within the project.

Each user has a set of roles that provide access to the project’s databases. User’s roles apply to all the clusters in the project: if two clusters have a products database and a user has a role granting read access on the products database, the user has that access on both clusters.

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

Function getDatabaseUsers

getDatabaseUsers(args: GetDatabaseUsersArgs, opts?: pulumi.InvokeOptions): Promise<GetDatabaseUsersResult>

mongodbatlas.getDatabaseUsers describe all Database Users. This represents a database user which will be applied to all clusters within the project.

Each user has a set of roles that provide access to the project’s databases. User’s roles apply to all the clusters in the project: if two clusters have a products database and a user has a role granting read access on the products database, the user has that access on both clusters.

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

Example Usage

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

const testDatabaseUser = new mongodbatlas.DatabaseUser("testDatabaseUser", {
    username: "test-acc-username",
    password: "test-acc-password",
    projectId: "<PROJECT-ID>",
    authDatabaseName: "admin",
    roles: [
        {
            roleName: "readWrite",
            databaseName: "admin",
        },
        {
            roleName: "atlasAdmin",
            databaseName: "admin",
        },
    ],
    labels: [
        {
            key: "key 1",
            value: "value 1",
        },
        {
            key: "key 2",
            value: "value 2",
        },
    ],
});
const testDatabaseUsers = testDatabaseUser.projectId.apply(projectId => mongodbatlas.getDatabaseUsers({
    projectId: projectId,
}));

Function getGlobalClusterConfig

getGlobalClusterConfig(args: GetGlobalClusterConfigArgs, opts?: pulumi.InvokeOptions): Promise<GetGlobalClusterConfigResult>

mongodbatlas.GlobalClusterConfig describes all managed namespaces and custom zone mappings associated with the specified Global Cluster.

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

Function getMaintenanceWindow

getMaintenanceWindow(args: GetMaintenanceWindowArgs, opts?: pulumi.InvokeOptions): Promise<GetMaintenanceWindowResult>

mongodbatlas.MaintenanceWindow provides a Maintenance Window entry datasource. Gets information regarding the configured maintenance window for a MongoDB Atlas project.

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

Examples Usage

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

const testMongodbatlasMaintenanceWindow = new mongodbatlas.MaintenanceWindow("test", {
    dayOfWeek: 3,
    hourOfDay: 4,
    projectId: "<your-project-id>",
});
const testMaintenanceWindow = testMongodbatlasMaintenanceWindow.id.apply(id => mongodbatlas.getMaintenanceWindow({
    projectId: id,
}, { async: true }));
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testMongodbatlasMaintenanceWindow = new mongodbatlas.MaintenanceWindow("test", {
    projectId: "<your-project-id>",
    startAsap: true,
});
const testMaintenanceWindow = testMongodbatlasMaintenanceWindow.id.apply(id => mongodbatlas.getMaintenanceWindow({
    projectId: id,
}, { async: true }));

Function getNetworkContainer

getNetworkContainer(args: GetNetworkContainerArgs, opts?: pulumi.InvokeOptions): Promise<GetNetworkContainerResult>

mongodbatlas.NetworkContainer describes a Network Peering Container. The resource requires your Project ID and container ID.

IMPORTANT: This resource creates one Network Peering container into which Atlas can deploy Network Peering connections. An Atlas project can have a maximum of one container for each cloud provider. You must have either the Project Owner or Organization Owner role to successfully call this endpoint.

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

Example Usage

Function getNetworkContainers

getNetworkContainers(args: GetNetworkContainersArgs, opts?: pulumi.InvokeOptions): Promise<GetNetworkContainersResult>

mongodbatlas.getNetworkContainers describes all Network Peering Containers. The data source requires your Project ID.

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

Example Usage

Basic Example.
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testNetworkContainer = new mongodbatlas.NetworkContainer("testNetworkContainer", {
    projectId: "<YOUR-PROJECT-ID>",
    atlasCidrBlock: "10.8.0.0/21",
    providerName: "AWS",
    regionName: "US_EAST_1",
});
const testNetworkContainers = pulumi.all([testNetworkContainer.projectId, testNetworkContainer.providerName]).apply(([projectId, providerName]) => mongodbatlas.getNetworkContainers({
    projectId: projectId,
    providerName: providerName,
}));

Function getNetworkPeering

getNetworkPeering(args: GetNetworkPeeringArgs, opts?: pulumi.InvokeOptions): Promise<GetNetworkPeeringResult>

mongodbatlas.NetworkPeering describes a Network Peering Connection.

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

Example Usage

Function getNetworkPeerings

getNetworkPeerings(args: GetNetworkPeeringsArgs, opts?: pulumi.InvokeOptions): Promise<GetNetworkPeeringsResult>

mongodbatlas.getNetworkPeerings describes all Network Peering Connections.

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

Example Usage

Basic Example (AWS).
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testNetworkPeering = new mongodbatlas.NetworkPeering("testNetworkPeering", {
    accepterRegionName: "us-east-1",
    projectId: "<YOUR-PROJEC-ID>",
    containerId: "507f1f77bcf86cd799439011",
    providerName: "AWS",
    routeTableCidrBlock: "192.168.0.0/24",
    vpcId: "vpc-abc123abc123",
    awsAccountId: "abc123abc123",
});
const testNetworkPeerings = testNetworkPeering.projectId.apply(projectId => mongodbatlas.getNetworkPeerings({
    projectId: projectId,
}));

Function getPrivateEndpoint

getPrivateEndpoint(args: GetPrivateEndpointArgs, opts?: pulumi.InvokeOptions): Promise<GetPrivateEndpointResult>

mongodbatlas.PrivateEndpoint describe a Private Endpoint. This represents a Private Endpoint Connection to retrieve details regarding a private endpoint by id in an Atlas project

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

Example Usage

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

const testMongodbatlasPrivateEndpoint = new mongodbatlas.PrivateEndpoint("test", {
    projectId: "<PROJECT-ID>",
    providerName: "AWS",
    region: "us-east-1",
});
const testPrivateEndpoint = pulumi.all([testMongodbatlasPrivateEndpoint.privateLinkId, testMongodbatlasPrivateEndpoint.projectId]).apply(([privateLinkId, projectId]) => mongodbatlas.getPrivateEndpoint({
    privateLinkId: privateLinkId,
    projectId: projectId,
}, { async: true }));
getPrivateEndpointInterfaceLink(args: GetPrivateEndpointInterfaceLinkArgs, opts?: pulumi.InvokeOptions): Promise<GetPrivateEndpointInterfaceLinkResult>

mongodbatlasPrivateEndpointLink describe a Private Endpoint Link. This represents a Private Endpoint Link Connection that wants to retrieve details in an Atlas project.

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

Example Usage

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

const testPrivateEndpoint = new mongodbatlas.PrivateEndpoint("test", {
    projectId: "<PROJECT_ID>",
    providerName: "AWS",
    region: "us-east-1",
});
const ptfeService = new aws.ec2.VpcEndpoint("ptfe_service", {
    securityGroupIds: ["sg-3f238186"],
    serviceName: testPrivateEndpoint.endpointServiceName,
    subnetIds: ["subnet-de0406d2"],
    vpcEndpointType: "Interface",
    vpcId: "vpc-7fc0a543",
});
const testMongodbatlasPrivateEndpointLink = new mongodbatlas.PrivateEndpointLink("test", {
    interfaceEndpointId: ptfeService.id,
    privateLinkId: testPrivateEndpoint.privateLinkId,
    projectId: testPrivateEndpoint.projectId,
});
const testPrivateEndpointLink = pulumi.all([testMongodbatlasPrivateEndpointLink.interfaceEndpointId, testMongodbatlasPrivateEndpointLink.privateLinkId, testMongodbatlasPrivateEndpointLink.projectId]).apply(([interfaceEndpointId, privateLinkId, projectId]) => mongodbatlas.PrivateEndpointLink({
    interfaceEndpointId: interfaceEndpointId,
    privateLinkId: privateLinkId,
    projectId: projectId,
}, { async: true }));

Function getProject

getProject(args?: GetProjectArgs, opts?: pulumi.InvokeOptions): Promise<GetProjectResult>

mongodbatlas.Project describes a MongoDB Atlas Project. This represents a project that has been created.

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

Example Usage

Using projectId attribute to query
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testMongodbatlasProject = new mongodbatlas.Project("test", {
    orgId: "<ORG_ID>",
    teams: [
        {
            roleNames: ["GROUP_OWNER"],
            teamId: "5e0fa8c99ccf641c722fe645",
        },
        {
            roleNames: [
                "GROUP_READ_ONLY",
                "GROUP_DATA_ACCESS_READ_WRITE",
            ],
            teamId: "5e1dd7b4f2a30ba80a70cd4rw",
        },
    ],
});
const testProject = testMongodbatlasProject.id.apply(id => mongodbatlas.getProject({
    projectId: id,
}, { async: true }));
Using name attribute to query
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testMongodbatlasProject = new mongodbatlas.Project("test", {
    orgId: "<ORG_ID>",
    teams: [
        {
            roleNames: ["GROUP_OWNER"],
            teamId: "5e0fa8c99ccf641c722fe645",
        },
        {
            roleNames: [
                "GROUP_READ_ONLY",
                "GROUP_DATA_ACCESS_READ_WRITE",
            ],
            teamId: "5e1dd7b4f2a30ba80a70cd4rw",
        },
    ],
});
const testProject = testMongodbatlasProject.name.apply(name => mongodbatlas.getProject({
    name: name,
}, { async: true }));

Function getProjectIpWhitelist

getProjectIpWhitelist(args: GetProjectIpWhitelistArgs, opts?: pulumi.InvokeOptions): Promise<GetProjectIpWhitelistResult>

mongodbatlas.ProjectIpWhitelist describes an IP Whitelist entry resource. The whitelist grants access from IPs, CIDRs or AWS Security Groups (if VPC Peering is enabled) to clusters within the Project.

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

IMPORTANT: When you remove an entry from the whitelist, existing connections from the removed address(es) may remain open for a variable amount of time. How much time passes before Atlas closes the connection depends on several factors, including how the connection was established, the particular behavior of the application or driver using the address, and the connection protocol (e.g., TCP or UDP). This is particularly important to consider when changing an existing IP address or CIDR block as they cannot be updated via the Provider (comments can however), hence a change will force the destruction and recreation of entries.

Example Usage

Function getProjects

getProjects(args?: GetProjectsArgs, opts?: pulumi.InvokeOptions): Promise<GetProjectsResult>

mongodbatlas.getProjects describe all Projects. This represents projects that have been created.

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

Example Usage

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

const testMongodbatlasProject = new mongodbatlas.Project("test", {
    orgId: "<ORG_ID>",
    teams: [
        {
            roleNames: ["GROUP_OWNER"],
            teamId: "5e0fa8c99ccf641c722fe645",
        },
        {
            roleNames: [
                "GROUP_READ_ONLY",
                "GROUP_DATA_ACCESS_READ_WRITE",
            ],
            teamId: "5e1dd7b4f2a30ba80a70cd4rw",
        },
    ],
});
const testProject = pulumi.output(mongodbatlas.getProject({
    itemsPerPage: 5,
    pageNum: 1,
}, { async: true }));

Function getTeam

getTeam(args: GetTeamArgs, opts?: pulumi.InvokeOptions): Promise<GetTeamResult>

mongodbatlas.Teams describes a Team. The resource requires your Organization ID, Project ID and Team ID.

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

Function getTeams

getTeams(args: GetTeamsArgs, opts?: pulumi.InvokeOptions): Promise<GetTeamsResult>

Others

interface AlertConfigurationArgs

interface AlertConfigurationArgs

The set of arguments for constructing a AlertConfiguration resource.

property enabled

enabled?: pulumi.Input<boolean>;

It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.

property eventType

eventType: pulumi.Input<string>;

The type of event that will trigger an alert.

property matchers

matchers?: pulumi.Input<pulumi.Input<AlertConfigurationMatcher>[]>;

property metricThreshold

metricThreshold?: pulumi.Input<AlertConfigurationMetricThreshold>;

property notifications

notifications: pulumi.Input<pulumi.Input<AlertConfigurationNotification>[]>;

property projectId

projectId: pulumi.Input<string>;

The ID of the project where the alert configuration will create.

property threshold

threshold?: pulumi.Input<AlertConfigurationThreshold>;

Threshold value outside of which an alert will be triggered.

interface AlertConfigurationState

interface AlertConfigurationState

Input properties used for looking up and filtering AlertConfiguration resources.

property alertConfigurationId

alertConfigurationId?: pulumi.Input<string>;

Unique identifier for the alert configuration.

property created

created?: pulumi.Input<string>;

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.

property enabled

enabled?: pulumi.Input<boolean>;

It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.

property eventType

eventType?: pulumi.Input<string>;

The type of event that will trigger an alert.

property matchers

matchers?: pulumi.Input<pulumi.Input<AlertConfigurationMatcher>[]>;

property metricThreshold

metricThreshold?: pulumi.Input<AlertConfigurationMetricThreshold>;

property notifications

notifications?: pulumi.Input<pulumi.Input<AlertConfigurationNotification>[]>;

property projectId

projectId?: pulumi.Input<string>;

The ID of the project where the alert configuration will create.

property threshold

threshold?: pulumi.Input<AlertConfigurationThreshold>;

Threshold value outside of which an alert will be triggered.

property updated

updated?: pulumi.Input<string>;

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.

interface AuditingArgs

interface AuditingArgs

The set of arguments for constructing a Auditing resource.

property auditAuthorizationSuccess

auditAuthorizationSuccess?: pulumi.Input<boolean>;

JSON-formatted audit filter used by the project

property auditFilter

auditFilter?: pulumi.Input<string>;

Indicates whether the auditing system captures successful authentication attempts for audit filters using the “atype” : “authCheck” auditing event. For more information, see auditAuthorizationSuccess

property enabled

enabled?: pulumi.Input<boolean>;

Denotes whether or not the project associated with the {project_id} has database auditing enabled.

property projectId

projectId: pulumi.Input<string>;

The unique ID for the project to configure auditing.

interface AuditingState

interface AuditingState

Input properties used for looking up and filtering Auditing resources.

property auditAuthorizationSuccess

auditAuthorizationSuccess?: pulumi.Input<boolean>;

JSON-formatted audit filter used by the project

property auditFilter

auditFilter?: pulumi.Input<string>;

Indicates whether the auditing system captures successful authentication attempts for audit filters using the “atype” : “authCheck” auditing event. For more information, see auditAuthorizationSuccess

property configurationType

configurationType?: pulumi.Input<string>;

Denotes the configuration method for the audit filter. Possible values are: * NONE - auditing not configured for the project. * FILTER_BUILDER - auditing configured via Atlas UI filter builder. * FILTER_JSON - auditing configured via Atlas custom filter or API.

property enabled

enabled?: pulumi.Input<boolean>;

Denotes whether or not the project associated with the {project_id} has database auditing enabled.

property projectId

projectId?: pulumi.Input<string>;

The unique ID for the project to configure auditing.

interface CloudProviderSnapshotArgs

interface CloudProviderSnapshotArgs

The set of arguments for constructing a CloudProviderSnapshot resource.

property clusterName

clusterName: pulumi.Input<string>;

The name of the Atlas cluster that contains the snapshots you want to retrieve.

property description

description: pulumi.Input<string>;

Description of the on-demand snapshot.

property projectId

projectId: pulumi.Input<string>;

The unique identifier of the project for the Atlas cluster.

property retentionInDays

retentionInDays: pulumi.Input<number>;

The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.

interface CloudProviderSnapshotBackupPolicyArgs

interface CloudProviderSnapshotBackupPolicyArgs

The set of arguments for constructing a CloudProviderSnapshotBackupPolicy resource.

property clusterName

clusterName: pulumi.Input<string>;

The name of the Atlas cluster that contains the snapshot backup policy you want to retrieve.

property policies

policies: pulumi.Input<pulumi.Input<CloudProviderSnapshotBackupPolicyPolicy>[]>;

Contains a document for each backup policy item in the desired updated backup policy. * policies.#.id - (Required) Unique identifier of the backup policy that you want to update. policies.#.id is a value obtained via the mongodbatlas.Cluster resource. providerBackupEnabled of the mongodbatlas.Cluster resource must be set to true. See the example above for how to refer to the mongodbatlas.Cluster resource for policies.#.id

property projectId

projectId: pulumi.Input<string>;

The unique identifier of the project for the Atlas cluster.

property referenceHourOfDay

referenceHourOfDay?: pulumi.Input<number>;

UTC Hour of day between 0 and 23, inclusive, representing which hour of the day that Atlas takes snapshots for backup policy items.

property referenceMinuteOfHour

referenceMinuteOfHour?: pulumi.Input<number>;

UTC Minutes after referenceHourOfDay that Atlas takes snapshots for backup policy items. Must be between 0 and 59, inclusive.

property restoreWindowDays

restoreWindowDays?: pulumi.Input<number>;

Number of days back in time you can restore to with point-in-time accuracy. Must be a positive, non-zero integer.

property updateSnapshots

updateSnapshots?: pulumi.Input<boolean>;

Specify true to apply the retention changes in the updated backup policy to snapshots that Atlas took previously.

interface CloudProviderSnapshotBackupPolicyState

interface CloudProviderSnapshotBackupPolicyState

Input properties used for looking up and filtering CloudProviderSnapshotBackupPolicy resources.

property clusterId

clusterId?: pulumi.Input<string>;

Unique identifier of the Atlas cluster.

property clusterName

clusterName?: pulumi.Input<string>;

The name of the Atlas cluster that contains the snapshot backup policy you want to retrieve.

property nextSnapshot

nextSnapshot?: pulumi.Input<string>;

Timestamp in the number of seconds that have elapsed since the UNIX epoch when Atlas takes the next snapshot.

property policies

policies?: pulumi.Input<pulumi.Input<CloudProviderSnapshotBackupPolicyPolicy>[]>;

Contains a document for each backup policy item in the desired updated backup policy. * policies.#.id - (Required) Unique identifier of the backup policy that you want to update. policies.#.id is a value obtained via the mongodbatlas.Cluster resource. providerBackupEnabled of the mongodbatlas.Cluster resource must be set to true. See the example above for how to refer to the mongodbatlas.Cluster resource for policies.#.id

property projectId

projectId?: pulumi.Input<string>;

The unique identifier of the project for the Atlas cluster.

property referenceHourOfDay

referenceHourOfDay?: pulumi.Input<number>;

UTC Hour of day between 0 and 23, inclusive, representing which hour of the day that Atlas takes snapshots for backup policy items.

property referenceMinuteOfHour

referenceMinuteOfHour?: pulumi.Input<number>;

UTC Minutes after referenceHourOfDay that Atlas takes snapshots for backup policy items. Must be between 0 and 59, inclusive.

property restoreWindowDays

restoreWindowDays?: pulumi.Input<number>;

Number of days back in time you can restore to with point-in-time accuracy. Must be a positive, non-zero integer.

property updateSnapshots

updateSnapshots?: pulumi.Input<boolean>;

Specify true to apply the retention changes in the updated backup policy to snapshots that Atlas took previously.

interface CloudProviderSnapshotRestoreJobArgs

interface CloudProviderSnapshotRestoreJobArgs

The set of arguments for constructing a CloudProviderSnapshotRestoreJob resource.

property clusterName

clusterName: pulumi.Input<string>;

The name of the Atlas cluster whose snapshot you want to restore.

property deliveryType

deliveryType: pulumi.Input<CloudProviderSnapshotRestoreJobDeliveryType>;

Type of restore job to create. Possible values are: download or automated, only one must be set it in true.

property projectId

projectId: pulumi.Input<string>;

The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.

property snapshotId

snapshotId: pulumi.Input<string>;

Unique identifier of the snapshot to restore.

interface CloudProviderSnapshotRestoreJobState

interface CloudProviderSnapshotRestoreJobState

Input properties used for looking up and filtering CloudProviderSnapshotRestoreJob resources.

property cancelled

cancelled?: pulumi.Input<boolean>;

Indicates whether the restore job was canceled.

property clusterName

clusterName?: pulumi.Input<string>;

The name of the Atlas cluster whose snapshot you want to restore.

property createdAt

createdAt?: pulumi.Input<string>;

UTC ISO 8601 formatted point in time when Atlas created the restore job.

property deliveryType

deliveryType?: pulumi.Input<CloudProviderSnapshotRestoreJobDeliveryType>;

Type of restore job to create. Possible values are: download or automated, only one must be set it in true.

property deliveryUrls

deliveryUrls?: pulumi.Input<pulumi.Input<string>[]>;

One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.

property expired

expired?: pulumi.Input<boolean>;

Indicates whether the restore job expired.

property expiresAt

expiresAt?: pulumi.Input<string>;

UTC ISO 8601 formatted point in time when the restore job expires.

property finishedAt

finishedAt?: pulumi.Input<string>;

UTC ISO 8601 formatted point in time when the restore job completed.

property projectId

projectId?: pulumi.Input<string>;

The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.

property snapshotId

snapshotId?: pulumi.Input<string>;

Unique identifier of the snapshot to restore.

property snapshotRestoreJobId

snapshotRestoreJobId?: pulumi.Input<string>;

The unique identifier of the restore job.

property timestamp

timestamp?: pulumi.Input<string>;

Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.

interface CloudProviderSnapshotState

interface CloudProviderSnapshotState

Input properties used for looking up and filtering CloudProviderSnapshot resources.

property clusterName

clusterName?: pulumi.Input<string>;

The name of the Atlas cluster that contains the snapshots you want to retrieve.

property createdAt

createdAt?: pulumi.Input<string>;

UTC ISO 8601 formatted point in time when Atlas took the snapshot.

property description

description?: pulumi.Input<string>;

Description of the on-demand snapshot.

property expiresAt

expiresAt?: pulumi.Input<string>;

UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.

property masterKeyUuid

masterKeyUuid?: pulumi.Input<string>;

Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS.

property mongodVersion

mongodVersion?: pulumi.Input<string>;

Version of the MongoDB server.

property projectId

projectId?: pulumi.Input<string>;

The unique identifier of the project for the Atlas cluster.

property retentionInDays

retentionInDays?: pulumi.Input<number>;

The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.

property snapshotId

snapshotId?: pulumi.Input<string>;

Unique identifier of the snapshot.

property snapshotType

snapshotType?: pulumi.Input<string>;

Specified the type of snapshot. Valid values are onDemand and scheduled.

property status

status?: pulumi.Input<string>;

Current status of the snapshot. One of the following values will be returned: queued, inProgress, completed, failed.

property storageSizeBytes

storageSizeBytes?: pulumi.Input<number>;

Specifies the size of the snapshot in bytes.

property type

type?: pulumi.Input<string>;

Specifies the type of cluster: replicaSet or shardedCluster.

interface ClusterArgs

interface ClusterArgs

The set of arguments for constructing a Cluster resource.

property advancedConfiguration

advancedConfiguration?: pulumi.Input<ClusterAdvancedConfiguration>;

property autoScalingComputeEnabled

autoScalingComputeEnabled?: pulumi.Input<boolean>;

Specifies whether cluster tier auto-scaling is enabled. The default is false. - Set to true to enable cluster tier auto-scaling. If enabled, you must specify a value for providerSettings.autoScaling.compute.maxInstanceSize. - Set to false to disable cluster tier auto-scaling.

property autoScalingComputeScaleDownEnabled

autoScalingComputeScaleDownEnabled?: pulumi.Input<boolean>;

Set to true to enable the cluster tier to scale down. This option is only available if autoScaling.compute.enabled is true. - If this option is enabled, you must specify a value for providerSettings.autoScaling.compute.minInstanceSize

property autoScalingDiskGbEnabled

autoScalingDiskGbEnabled?: pulumi.Input<boolean>;

Specifies whether disk auto-scaling is enabled. The default is true. - Set to true to enable disk auto-scaling. - Set to false to disable disk auto-scaling.

property backingProviderName

backingProviderName?: pulumi.Input<string>;

Cloud service provider on which the server for a multi-tenant cluster is provisioned.

property backupEnabled

backupEnabled?: pulumi.Input<boolean>;

property biConnector

biConnector?: pulumi.Input<ClusterBiConnector>;

Specifies BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See BI Connector below for more details.

property clusterType

clusterType?: pulumi.Input<string>;

Specifies the type of the cluster that you want to modify. You cannot convert a sharded cluster deployment to a replica set deployment.

property diskSizeGb

diskSizeGb?: pulumi.Input<number>;

Capacity, in gigabytes, of the host’s root volume. Increase this number to add capacity, up to a maximum possible value of 4096 (i.e., 4 TB). This value must be a positive integer. * The minimum disk size for dedicated clusters is 10GB for AWS and GCP. If you specify diskSizeGB with a lower disk size, Atlas defaults to the minimum disk size value. * Note: The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require additional storage space beyond this limitation, consider upgrading your cluster to a higher tier. * Cannot be used with clusters with local NVMe SSDs * Cannot be used with Azure clusters

property encryptionAtRestProvider

encryptionAtRestProvider?: pulumi.Input<string>;

Possible values are AWS, GCP, AZURE or NONE. Only needed if you desire to manage the keys, see Encryption at Rest using Customer Key Management for complete documentation. You must configure encryption at rest for the Atlas project before enabling it on any cluster in the project. For complete documentation on configuring Encryption at Rest, see Encryption at Rest using Customer Key Management. Requires M10 or greater. and for legacy backups, backup_enabled, to be false or omitted. Note: Atlas encrypts all cluster storage and snapshot volumes, securing all cluster data on disk: a concept known as encryption at rest, by default.

property labels

labels?: pulumi.Input<pulumi.Input<ClusterLabel>[]>;

property mongoDbMajorVersion

mongoDbMajorVersion?: pulumi.Input<string>;

Version of the cluster to deploy. Atlas supports the following MongoDB versions for M10+ clusters: 3.6, 4.0, or 4.2. You must set this value to 4.2 if providerInstanceSizeName is either M2 or M5.

property name

name?: pulumi.Input<string>;

Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed.

property numShards

numShards?: pulumi.Input<number>;

Number of shards to deploy in the specified zone, minimum 1.

property pitEnabled

pitEnabled?: pulumi.Input<boolean>;
  • Flag that indicates if the cluster uses Continuous Cloud Backup. If set to true, providerBackupEnabled must also be set to true.

property projectId

projectId: pulumi.Input<string>;

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

property providerAutoScalingComputeMaxInstanceSize

providerAutoScalingComputeMaxInstanceSize?: pulumi.Input<string>;

Maximum instance size to which your cluster can automatically scale (e.g., M40). Required if autoScaling.compute.enabled is true.

property providerAutoScalingComputeMinInstanceSize

providerAutoScalingComputeMinInstanceSize?: pulumi.Input<string>;

Minimum instance size to which your cluster can automatically scale (e.g., M10). Required if autoScaling.compute.scaleDownEnabled is true.

property providerBackupEnabled

providerBackupEnabled?: pulumi.Input<boolean>;

Flag indicating if the cluster uses Cloud Backup for backups.

property providerDiskIops

providerDiskIops?: pulumi.Input<number>;

The maximum input/output operations per second (IOPS) the system can perform. The possible values depend on the selected providerInstanceSizeName and diskSizeGb.

property providerDiskTypeName

providerDiskTypeName?: pulumi.Input<string>;

Azure disk type of the server’s root volume. If omitted, Atlas uses the default disk type for the selected providerSettings.instanceSizeName. Example disk types and associated storage sizes: P4 - 32GB, P6 - 64GB, P10 - 128GB, P15 - 256GB, P20 - 512GB, P30 - 1024GB, P40 - 2048GB, P50 - 4095GB. More information and the most update to date disk types/storage sizes can be located at https://docs.atlas.mongodb.com/reference/api/clusters-create-one/.

property providerEncryptEbsVolume

providerEncryptEbsVolume?: pulumi.Input<boolean>;

If enabled, the Amazon EBS encryption feature encrypts the server’s root volume for both data at rest within the volume and for data moving between the volume and the cluster. Atlas encrypts all cluster storage and snapshot volumes, securing all cluster data on disk: a concept known as encryption at rest, by default.

property providerInstanceSizeName

providerInstanceSizeName: pulumi.Input<string>;

Atlas provides different instance sizes, each with a default storage capacity and RAM size. The instance size you select is used for all the data-bearing servers in your cluster. See Create a Cluster providerSettings.instanceSizeName for valid values and default resources. Note free tier (M0) creation is not supported by the Atlas API and hence not supported by this provider.)

property providerName

providerName: pulumi.Input<string>;

Cloud service provider on which the servers are provisioned.

property providerRegionName

providerRegionName?: pulumi.Input<string>;

Physical location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases. Requires the Atlas region name, see the reference list for AWS, GCP, Azure. Do not specify this field when creating a multi-region cluster using the replicationSpec document or a Global Cluster with the replicationSpecs array.

property providerVolumeType

providerVolumeType?: pulumi.Input<string>;

The type of the volume. The possible values are: STANDARD and PROVISIONED. PROVISIONED required if setting IOPS higher than the default instance IOPS.

property replicationFactor

replicationFactor?: pulumi.Input<number>;

Number of replica set members. Each member keeps a copy of your databases, providing high availability and data redundancy. The possible values are 3, 5, or 7. The default value is 3.

property replicationSpecs

replicationSpecs?: pulumi.Input<pulumi.Input<ClusterReplicationSpec>[]>;

Configuration for cluster regions. See Replication Spec below for more details.

interface ClusterState

interface ClusterState

Input properties used for looking up and filtering Cluster resources.

property advancedConfiguration

advancedConfiguration?: pulumi.Input<ClusterAdvancedConfiguration>;

property autoScalingComputeEnabled

autoScalingComputeEnabled?: pulumi.Input<boolean>;

Specifies whether cluster tier auto-scaling is enabled. The default is false. - Set to true to enable cluster tier auto-scaling. If enabled, you must specify a value for providerSettings.autoScaling.compute.maxInstanceSize. - Set to false to disable cluster tier auto-scaling.

property autoScalingComputeScaleDownEnabled

autoScalingComputeScaleDownEnabled?: pulumi.Input<boolean>;

Set to true to enable the cluster tier to scale down. This option is only available if autoScaling.compute.enabled is true. - If this option is enabled, you must specify a value for providerSettings.autoScaling.compute.minInstanceSize

property autoScalingDiskGbEnabled

autoScalingDiskGbEnabled?: pulumi.Input<boolean>;

Specifies whether disk auto-scaling is enabled. The default is true. - Set to true to enable disk auto-scaling. - Set to false to disable disk auto-scaling.

property backingProviderName

backingProviderName?: pulumi.Input<string>;

Cloud service provider on which the server for a multi-tenant cluster is provisioned.

property backupEnabled

backupEnabled?: pulumi.Input<boolean>;

property biConnector

biConnector?: pulumi.Input<ClusterBiConnector>;

Specifies BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See BI Connector below for more details.

property clusterId

clusterId?: pulumi.Input<string>;

The cluster ID.

property clusterType

clusterType?: pulumi.Input<string>;

Specifies the type of the cluster that you want to modify. You cannot convert a sharded cluster deployment to a replica set deployment.

property connectionStrings

connectionStrings?: pulumi.Input<ClusterConnectionStrings>;

Set of connection strings that your applications use to connect to this cluster. More info in Connection-strings. Use the parameters in this object to connect your applications to this cluster. To learn more about the formats of connection strings, see Connection String Options. NOTE: Atlas returns the contents of this object after the cluster is operational, not while it builds the cluster.

property containerId

containerId?: pulumi.Input<string>;

The Network Peering Container ID. The id of the container either created programmatically by the user before any clusters existed in the project or when the first cluster in the region (AWS/Azure) or project (GCP) was created.

property diskSizeGb

diskSizeGb?: pulumi.Input<number>;

Capacity, in gigabytes, of the host’s root volume. Increase this number to add capacity, up to a maximum possible value of 4096 (i.e., 4 TB). This value must be a positive integer. * The minimum disk size for dedicated clusters is 10GB for AWS and GCP. If you specify diskSizeGB with a lower disk size, Atlas defaults to the minimum disk size value. * Note: The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require additional storage space beyond this limitation, consider upgrading your cluster to a higher tier. * Cannot be used with clusters with local NVMe SSDs * Cannot be used with Azure clusters

property encryptionAtRestProvider

encryptionAtRestProvider?: pulumi.Input<string>;

Possible values are AWS, GCP, AZURE or NONE. Only needed if you desire to manage the keys, see Encryption at Rest using Customer Key Management for complete documentation. You must configure encryption at rest for the Atlas project before enabling it on any cluster in the project. For complete documentation on configuring Encryption at Rest, see Encryption at Rest using Customer Key Management. Requires M10 or greater. and for legacy backups, backup_enabled, to be false or omitted. Note: Atlas encrypts all cluster storage and snapshot volumes, securing all cluster data on disk: a concept known as encryption at rest, by default.

property labels

labels?: pulumi.Input<pulumi.Input<ClusterLabel>[]>;

property mongoDbMajorVersion

mongoDbMajorVersion?: pulumi.Input<string>;

Version of the cluster to deploy. Atlas supports the following MongoDB versions for M10+ clusters: 3.6, 4.0, or 4.2. You must set this value to 4.2 if providerInstanceSizeName is either M2 or M5.

property mongoDbVersion

mongoDbVersion?: pulumi.Input<string>;

Version of MongoDB the cluster runs, in major-version.minor-version format.

property mongoUri

mongoUri?: pulumi.Input<string>;

Base connection string for the cluster. Atlas only displays this field after the cluster is operational, not while it builds the cluster.

property mongoUriUpdated

mongoUriUpdated?: pulumi.Input<string>;

Lists when the connection string was last updated. The connection string changes, for example, if you change a replica set to a sharded cluster.

property mongoUriWithOptions

mongoUriWithOptions?: pulumi.Input<string>;

connection string for connecting to the Atlas cluster. Includes the replicaSet, ssl, and authSource query parameters in the connection string with values appropriate for the cluster.

property name

name?: pulumi.Input<string>;

Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed.

property numShards

numShards?: pulumi.Input<number>;

Number of shards to deploy in the specified zone, minimum 1.

property paused

paused?: pulumi.Input<boolean>;

Flag that indicates whether the cluster is paused or not.

property pitEnabled

pitEnabled?: pulumi.Input<boolean>;
  • Flag that indicates if the cluster uses Continuous Cloud Backup. If set to true, providerBackupEnabled must also be set to true.

property projectId

projectId?: pulumi.Input<string>;

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

property providerAutoScalingComputeMaxInstanceSize

providerAutoScalingComputeMaxInstanceSize?: pulumi.Input<string>;

Maximum instance size to which your cluster can automatically scale (e.g., M40). Required if autoScaling.compute.enabled is true.

property providerAutoScalingComputeMinInstanceSize

providerAutoScalingComputeMinInstanceSize?: pulumi.Input<string>;

Minimum instance size to which your cluster can automatically scale (e.g., M10). Required if autoScaling.compute.scaleDownEnabled is true.

property providerBackupEnabled

providerBackupEnabled?: pulumi.Input<boolean>;

Flag indicating if the cluster uses Cloud Backup for backups.

property providerDiskIops

providerDiskIops?: pulumi.Input<number>;

The maximum input/output operations per second (IOPS) the system can perform. The possible values depend on the selected providerInstanceSizeName and diskSizeGb.

property providerDiskTypeName

providerDiskTypeName?: pulumi.Input<string>;

Azure disk type of the server’s root volume. If omitted, Atlas uses the default disk type for the selected providerSettings.instanceSizeName. Example disk types and associated storage sizes: P4 - 32GB, P6 - 64GB, P10 - 128GB, P15 - 256GB, P20 - 512GB, P30 - 1024GB, P40 - 2048GB, P50 - 4095GB. More information and the most update to date disk types/storage sizes can be located at https://docs.atlas.mongodb.com/reference/api/clusters-create-one/.

property providerEncryptEbsVolume

providerEncryptEbsVolume?: pulumi.Input<boolean>;

If enabled, the Amazon EBS encryption feature encrypts the server’s root volume for both data at rest within the volume and for data moving between the volume and the cluster. Atlas encrypts all cluster storage and snapshot volumes, securing all cluster data on disk: a concept known as encryption at rest, by default.

property providerInstanceSizeName

providerInstanceSizeName?: pulumi.Input<string>;

Atlas provides different instance sizes, each with a default storage capacity and RAM size. The instance size you select is used for all the data-bearing servers in your cluster. See Create a Cluster providerSettings.instanceSizeName for valid values and default resources. Note free tier (M0) creation is not supported by the Atlas API and hence not supported by this provider.)

property providerName

providerName?: pulumi.Input<string>;

Cloud service provider on which the servers are provisioned.

property providerRegionName

providerRegionName?: pulumi.Input<string>;

Physical location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases. Requires the Atlas region name, see the reference list for AWS, GCP, Azure. Do not specify this field when creating a multi-region cluster using the replicationSpec document or a Global Cluster with the replicationSpecs array.

property providerVolumeType

providerVolumeType?: pulumi.Input<string>;

The type of the volume. The possible values are: STANDARD and PROVISIONED. PROVISIONED required if setting IOPS higher than the default instance IOPS.

property replicationFactor

replicationFactor?: pulumi.Input<number>;

Number of replica set members. Each member keeps a copy of your databases, providing high availability and data redundancy. The possible values are 3, 5, or 7. The default value is 3.

property replicationSpecs

replicationSpecs?: pulumi.Input<pulumi.Input<ClusterReplicationSpec>[]>;

Configuration for cluster regions. See Replication Spec below for more details.

property snapshotBackupPolicies

snapshotBackupPolicies?: pulumi.Input<pulumi.Input<ClusterSnapshotBackupPolicy>[]>;

current snapshot schedule and retention settings for the cluster.

property srvAddress

srvAddress?: pulumi.Input<string>;

Connection string for connecting to the Atlas cluster. The +srv modifier forces the connection to use TLS/SSL. See the mongoURI for additional options.

property stateName

stateName?: pulumi.Input<string>;

Current state of the cluster. The possible states are: - IDLE - CREATING - UPDATING - DELETING - DELETED - REPAIRING

interface CustomDbRoleArgs

interface CustomDbRoleArgs

The set of arguments for constructing a CustomDbRole resource.

property actions

actions?: pulumi.Input<pulumi.Input<CustomDbRoleAction>[]>;

property inheritedRoles

inheritedRoles?: pulumi.Input<pulumi.Input<CustomDbRoleInheritedRole>[]>;

property projectId

projectId: pulumi.Input<string>;

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

property roleName

roleName: pulumi.Input<string>;

Name of the inherited role. This can either be another custom role or a built-in role.

interface CustomDbRoleState

interface CustomDbRoleState

Input properties used for looking up and filtering CustomDbRole resources.

property actions

actions?: pulumi.Input<pulumi.Input<CustomDbRoleAction>[]>;

property inheritedRoles

inheritedRoles?: pulumi.Input<pulumi.Input<CustomDbRoleInheritedRole>[]>;

property projectId

projectId?: pulumi.Input<string>;

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

property roleName

roleName?: pulumi.Input<string>;

Name of the inherited role. This can either be another custom role or a built-in role.

interface DatabaseUserArgs

interface DatabaseUserArgs

The set of arguments for constructing a DatabaseUser resource.

property authDatabaseName

authDatabaseName?: pulumi.Input<string>;

Database against which Atlas authenticates the user. A user must provide both a username and authentication database to log into MongoDB. Accepted values include:

property awsIamType

awsIamType?: pulumi.Input<string>;

If this value is set, the new database user authenticates with AWS IAM credentials. If no value is given, Atlas uses the default value of NONE. The accepted types are:

property databaseName

DEPRECATED use auth_database_name instead
databaseName?: pulumi.Input<string>;

Database on which the user has the specified role. A role on the admin database can include privileges that apply to the other databases.

property labels

labels?: pulumi.Input<pulumi.Input<DatabaseUserLabel>[]>;

property password

password?: pulumi.Input<string>;

property projectId

projectId: pulumi.Input<string>;

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

property roles

roles?: pulumi.Input<pulumi.Input<DatabaseUserRole>[]>;

List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.

property scopes

scopes?: pulumi.Input<pulumi.Input<DatabaseUserScope>[]>;

property username

username: pulumi.Input<string>;

Username for authenticating to MongoDB.

property x509Type

x509Type?: pulumi.Input<string>;

X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:

interface DatabaseUserState

interface DatabaseUserState

Input properties used for looking up and filtering DatabaseUser resources.

property authDatabaseName

authDatabaseName?: pulumi.Input<string>;

Database against which Atlas authenticates the user. A user must provide both a username and authentication database to log into MongoDB. Accepted values include:

property awsIamType

awsIamType?: pulumi.Input<string>;

If this value is set, the new database user authenticates with AWS IAM credentials. If no value is given, Atlas uses the default value of NONE. The accepted types are:

property databaseName

DEPRECATED use auth_database_name instead
databaseName?: pulumi.Input<string>;

Database on which the user has the specified role. A role on the admin database can include privileges that apply to the other databases.

property labels

labels?: pulumi.Input<pulumi.Input<DatabaseUserLabel>[]>;

property password

password?: pulumi.Input<string>;

property projectId

projectId?: pulumi.Input<string>;

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

property roles

roles?: pulumi.Input<pulumi.Input<DatabaseUserRole>[]>;

List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.

property scopes

scopes?: pulumi.Input<pulumi.Input<DatabaseUserScope>[]>;

property username

username?: pulumi.Input<string>;

Username for authenticating to MongoDB.

property x509Type

x509Type?: pulumi.Input<string>;

X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:

interface EncryptionAtRestArgs

interface EncryptionAtRestArgs

The set of arguments for constructing a EncryptionAtRest resource.

property awsKms

awsKms?: pulumi.Input<EncryptionAtRestAwsKms>;

Specifies AWS KMS configuration details and whether Encryption at Rest is enabled for an Atlas project.

property azureKeyVault

azureKeyVault?: pulumi.Input<EncryptionAtRestAzureKeyVault>;

Specifies Azure Key Vault configuration details and whether Encryption at Rest is enabled for an Atlas project.

property googleCloudKms

googleCloudKms?: pulumi.Input<EncryptionAtRestGoogleCloudKms>;

Specifies GCP KMS configuration details and whether Encryption at Rest is enabled for an Atlas project.

property projectId

projectId: pulumi.Input<string>;

The unique identifier for the project.

interface EncryptionAtRestState

interface EncryptionAtRestState

Input properties used for looking up and filtering EncryptionAtRest resources.

property awsKms

awsKms?: pulumi.Input<EncryptionAtRestAwsKms>;

Specifies AWS KMS configuration details and whether Encryption at Rest is enabled for an Atlas project.

property azureKeyVault

azureKeyVault?: pulumi.Input<EncryptionAtRestAzureKeyVault>;

Specifies Azure Key Vault configuration details and whether Encryption at Rest is enabled for an Atlas project.

property googleCloudKms

googleCloudKms?: pulumi.Input<EncryptionAtRestGoogleCloudKms>;

Specifies GCP KMS configuration details and whether Encryption at Rest is enabled for an Atlas project.

property projectId

projectId?: pulumi.Input<string>;

The unique identifier for the project.

interface Get509AuthenticationDatabaseUserArgs

interface Get509AuthenticationDatabaseUserArgs

A collection of arguments for invoking get509AuthenticationDatabaseUser.

property projectId

projectId: string;

Identifier for the Atlas project associated with the X.509 configuration.

property username

username?: undefined | string;

Username of the database user to create a certificate for.

interface Get509AuthenticationDatabaseUserResult

interface Get509AuthenticationDatabaseUserResult

A collection of values returned by get509AuthenticationDatabaseUser.

property certificates

certificates: Get509AuthenticationDatabaseUserCertificate[];

Array of objects where each details one unexpired database user certificate.

property customerX509Cas

customerX509Cas: string;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property projectId

projectId: string;

property username

username?: undefined | string;

interface GetAlertConfigurationArgs

interface GetAlertConfigurationArgs

A collection of arguments for invoking getAlertConfiguration.

property alertConfigurationId

alertConfigurationId: string;

Unique identifier for the alert configuration.

property projectId

projectId: string;

The ID of the project where the alert configuration will create.

interface GetAlertConfigurationResult

interface GetAlertConfigurationResult

A collection of values returned by getAlertConfiguration.

property alertConfigurationId

alertConfigurationId: string;

property created

created: string;

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.

property enabled

enabled: boolean;

If set to true, the alert configuration is enabled. If enabled is not exported it is set to false.

property eventType

eventType: string;

The type of event that will trigger an alert.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property matchers

matchers: GetAlertConfigurationMatcher[];

property metricThreshold

metricThreshold: GetAlertConfigurationMetricThreshold;

property notifications

notifications: GetAlertConfigurationNotification[];

property projectId

projectId: string;

property threshold

threshold: GetAlertConfigurationThreshold;

Threshold value outside of which an alert will be triggered.

property updated

updated: string;

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.

interface GetAuditingArgs

interface GetAuditingArgs

A collection of arguments for invoking getAuditing.

property projectId

projectId: string;

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

interface GetAuditingResult

interface GetAuditingResult

A collection of values returned by getAuditing.

property auditAuthorizationSuccess

auditAuthorizationSuccess: boolean;

JSON-formatted audit filter used by the project

property auditFilter

auditFilter: string;

Indicates whether the auditing system captures successful authentication attempts for audit filters using the “atype” : “authCheck” auditing event. For more information, see auditAuthorizationSuccess

property configurationType

configurationType: string;

Denotes the configuration method for the audit filter. Possible values are: NONE - auditing not configured for the project.m FILTER_BUILDER - auditing configured via Atlas UI filter builderm FILTER_JSON - auditing configured via Atlas custom filter or API.

property enabled

enabled: boolean;

Denotes whether or not the project associated with the {GROUP-ID} has database auditing enabled.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property projectId

projectId: string;

interface GetCloudProviderSnapshotArgs

interface GetCloudProviderSnapshotArgs

A collection of arguments for invoking getCloudProviderSnapshot.

property clusterName

clusterName: string;

The name of the Atlas cluster that contains the snapshot you want to retrieve.

property projectId

projectId: string;

property snapshotId

snapshotId: string;

The unique identifier of the snapshot you want to retrieve.

interface GetCloudProviderSnapshotBackupPolicyArgs

interface GetCloudProviderSnapshotBackupPolicyArgs

A collection of arguments for invoking getCloudProviderSnapshotBackupPolicy.

property clusterName

clusterName: string;

The name of the Atlas cluster that contains the snapshots backup policy you want to retrieve.

property projectId

projectId: string;

The unique identifier of the project for the Atlas cluster.

interface GetCloudProviderSnapshotBackupPolicyResult

interface GetCloudProviderSnapshotBackupPolicyResult

A collection of values returned by getCloudProviderSnapshotBackupPolicy.

property clusterId

clusterId: string;

Unique identifier of the Atlas cluster.

property clusterName

clusterName: string;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property nextSnapshot

nextSnapshot: string;

UTC ISO 8601 formatted point in time when Atlas will take the next snapshot.

property policies

policies: GetCloudProviderSnapshotBackupPolicyPolicy[];

A list of policy definitions for the cluster. * policies.#.id - Unique identifier of the backup policy.

property projectId

projectId: string;

property referenceHourOfDay

referenceHourOfDay: number;

UTC Hour of day between 0 and 23 representing which hour of the day that Atlas takes a snapshot.

property referenceMinuteOfHour

referenceMinuteOfHour: number;

UTC Minute of day between 0 and 59 representing which minute of the referenceHourOfDay that Atlas takes the snapshot.

property restoreWindowDays

restoreWindowDays: number;

Specifies a restore window in days for cloud backup to maintain.

property updateSnapshots

updateSnapshots: boolean;

interface GetCloudProviderSnapshotRestoreJobArgs

interface GetCloudProviderSnapshotRestoreJobArgs

A collection of arguments for invoking getCloudProviderSnapshotRestoreJob.

property clusterName

clusterName: string;

The name of the Atlas cluster for which you want to retrieve the restore job.

property jobId

jobId: string;

The unique identifier of the restore job to retrieve.

property projectId

projectId: string;

The unique identifier of the project for the Atlas cluster.

interface GetCloudProviderSnapshotRestoreJobResult

interface GetCloudProviderSnapshotRestoreJobResult

A collection of values returned by getCloudProviderSnapshotRestoreJob.

property cancelled

cancelled: boolean;

Indicates whether the restore job was canceled.

property clusterName

clusterName: string;

property createdAt

createdAt: string;

UTC ISO 8601 formatted point in time when Atlas created the restore job.

property deliveryType

deliveryType: string;

Type of restore job to create. Possible values are: automated and download.

property deliveryUrls

deliveryUrls: string[];

One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.

property expired

expired: boolean;

Indicates whether the restore job expired.

property expiresAt

expiresAt: string;

UTC ISO 8601 formatted point in time when the restore job expires.

property finishedAt

finishedAt: string;

UTC ISO 8601 formatted point in time when the restore job completed.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property jobId

jobId: string;

property oplogInc

oplogInc: number;

property oplogTs

oplogTs: number;

property pointInTimeUtcSeconds

pointInTimeUtcSeconds: number;

property projectId

projectId: string;

property snapshotId

snapshotId: string;

Unique identifier of the source snapshot ID of the restore job.

property targetClusterName

targetClusterName: string;

Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.

property targetProjectId

targetProjectId: string;

property timestamp

timestamp: string;

Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.

interface GetCloudProviderSnapshotRestoreJobsArgs

interface GetCloudProviderSnapshotRestoreJobsArgs

A collection of arguments for invoking getCloudProviderSnapshotRestoreJobs.

property clusterName

clusterName: string;

The name of the Atlas cluster for which you want to retrieve restore jobs.

property itemsPerPage

itemsPerPage?: undefined | number;

Number of items to return per page, up to a maximum of 500. Defaults to 100.

property pageNum

pageNum?: undefined | number;

The page to return. Defaults to 1.

property projectId

projectId: string;

The unique identifier of the project for the Atlas cluster.

interface GetCloudProviderSnapshotRestoreJobsResult

interface GetCloudProviderSnapshotRestoreJobsResult

A collection of values returned by getCloudProviderSnapshotRestoreJobs.

property clusterName

clusterName: string;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property itemsPerPage

itemsPerPage?: undefined | number;

property pageNum

pageNum?: undefined | number;

property projectId

projectId: string;

property results

results: GetCloudProviderSnapshotRestoreJobsResult[];

Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.

property totalCount

totalCount: number;

interface GetCloudProviderSnapshotResult

interface GetCloudProviderSnapshotResult

A collection of values returned by getCloudProviderSnapshot.

property clusterName

clusterName: string;

property createdAt

createdAt: string;

UTC ISO 8601 formatted point in time when Atlas took the snapshot.

property description

description: string;

UDescription of the snapshot. Only present for on-demand snapshots.

property expiresAt

expiresAt: string;

UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property masterKeyUuid

masterKeyUuid: string;

Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS.

property mongodVersion

mongodVersion: string;

Version of the MongoDB server.

property projectId

projectId: string;

property snapshotId

snapshotId: string;

property snapshotType

snapshotType: string;

Specified the type of snapshot. Valid values are onDemand and scheduled.

property status

status: string;

Current status of the snapshot. One of the following values: queued, inProgress, completed, failed.

property storageSizeBytes

storageSizeBytes: number;

Specifies the size of the snapshot in bytes.

property type

type: string;

Specifies the type of cluster: replicaSet or shardedCluster.

interface GetCloudProviderSnapshotsArgs

interface GetCloudProviderSnapshotsArgs

A collection of arguments for invoking getCloudProviderSnapshots.

property clusterName

clusterName: string;

The name of the Atlas cluster that contains the snapshot you want to retrieve.

property itemsPerPage

itemsPerPage?: undefined | number;

Number of items to return per page, up to a maximum of 500. Defaults to 100.

property pageNum

pageNum?: undefined | number;

The page to return. Defaults to 1.

property projectId

projectId: string;

interface GetCloudProviderSnapshotsResult

interface GetCloudProviderSnapshotsResult

A collection of values returned by getCloudProviderSnapshots.

property clusterName

clusterName: string;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property itemsPerPage

itemsPerPage?: undefined | number;

property pageNum

pageNum?: undefined | number;

property projectId

projectId: string;

property results

results: GetCloudProviderSnapshotsResult[];

Includes cloudProviderSnapshot object for each item detailed in the results array section.

property totalCount

totalCount: number;

interface GetClusterArgs

interface GetClusterArgs

A collection of arguments for invoking getCluster.

property name

name: string;

Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed.

property projectId

projectId: string;

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

interface GetClusterResult

interface GetClusterResult

A collection of values returned by getCluster.

property autoScalingComputeEnabled

autoScalingComputeEnabled: boolean;

(Optional) Specifies whether cluster tier auto-scaling is enabled. The default is false.

property autoScalingComputeScaleDownEnabled

autoScalingComputeScaleDownEnabled: boolean;

(Optional) Set to true to enable the cluster tier to scale down.

property autoScalingDiskGbEnabled

autoScalingDiskGbEnabled: boolean;

Indicates whether disk auto-scaling is enabled.

property backingProviderName

backingProviderName: string;

Indicates Cloud service provider on which the server for a multi-tenant cluster is provisioned.

property backupEnabled

backupEnabled: boolean;

Legacy Option, Indicates whether Atlas continuous backups are enabled for the cluster.

property biConnector

biConnector: GetClusterBiConnector;

Indicates BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See BI Connector below for more details.

property clusterType

clusterType: string;

Indicates the type of the cluster that you want to modify. You cannot convert a sharded cluster deployment to a replica set deployment.

property connectionStrings

connectionStrings: GetClusterConnectionStrings;

Set of connection strings that your applications use to connect to this cluster. More info in Connection-strings. Use the parameters in this object to connect your applications to this cluster. To learn more about the formats of connection strings, see Connection String Options. NOTE: Atlas returns the contents of this object after the cluster is operational, not while it builds the cluster. - connection_strings.standard - Public mongodb:// connection string for this cluster. - connection_strings.standard_srv - Public mongodb+srv:// connection string for this cluster. The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.standard. - connection_strings.aws_private_link - Private-endpoint-aware mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. - connection_strings.aws_private_link_srv - Private-endpoint-aware mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.awsPrivateLink. - connection_strings.private - Network-peering-endpoint-aware mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - connection_strings.private_srv - Network-peering-endpoint-aware mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster.

property containerId

containerId: string;

The Network Peering Container ID.

property diskSizeGb

diskSizeGb: number;

Indicates the size in gigabytes of the server’s root volume (AWS/GCP Only).

property encryptionAtRestProvider

encryptionAtRestProvider: string;

Indicates whether Encryption at Rest is enabled or disabled.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property labels

labels: GetClusterLabel[];

property mongoDbMajorVersion

mongoDbMajorVersion: string;

Indicates the version of the cluster to deploy.

property mongoDbVersion

mongoDbVersion: string;

Version of MongoDB the cluster runs, in major-version.minor-version format.

property mongoUri

mongoUri: string;

Base connection string for the cluster. Atlas only displays this field after the cluster is operational, not while it builds the cluster.

property mongoUriUpdated

mongoUriUpdated: string;

Lists when the connection string was last updated. The connection string changes, for example, if you change a replica set to a sharded cluster.

property mongoUriWithOptions

mongoUriWithOptions: string;

Describes connection string for connecting to the Atlas cluster. Includes the replicaSet, ssl, and authSource query parameters in the connection string with values appropriate for the cluster.

property name

name: string;

The name of the current plugin

property numShards

numShards: number;

Number of shards to deploy in the specified zone.

property paused

paused: boolean;

Flag that indicates whether the cluster is paused or not.

property pitEnabled

pitEnabled: boolean;

Flag that indicates if the cluster uses Continuous Cloud Backup.

property projectId

projectId: string;

property providerAutoScalingComputeMaxInstanceSize

providerAutoScalingComputeMaxInstanceSize: string;

(Optional) Maximum instance size to which your cluster can automatically scale.

property providerAutoScalingComputeMinInstanceSize

providerAutoScalingComputeMinInstanceSize: string;

(Optional) Minimum instance size to which your cluster can automatically scale.

property providerBackupEnabled

providerBackupEnabled: boolean;

Flag indicating if the cluster uses Cloud Backup Snapshots for backups.

property providerDiskIops

providerDiskIops: number;

Indicates the maximum input/output operations per second (IOPS) the system can perform. The possible values depend on the selected providerSettings.instanceSizeName and diskSizeGB.

property providerDiskTypeName

providerDiskTypeName: string;

Describes Azure disk type of the server’s root volume (Azure Only).

property providerEncryptEbsVolume

providerEncryptEbsVolume: boolean;

Indicates whether the Amazon EBS encryption is enabled. This feature encrypts the server’s root volume for both data at rest within the volume and data moving between the volume and the instance.

property providerInstanceSizeName

providerInstanceSizeName: string;

Atlas provides different instance sizes, each with a default storage capacity and RAM size.

property providerName

providerName: string;

Indicates the cloud service provider on which the servers are provisioned.

property providerRegionName

providerRegionName: string;

Indicates Physical location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases. Requires the Atlas Region name, see the reference list for AWS, GCP, Azure.

property providerVolumeType

providerVolumeType: string;

Indicates the type of the volume. The possible values are: STANDARD and PROVISIONED.

property replicationFactor

replicationFactor: number;

Number of replica set members. Each member keeps a copy of your databases, providing high availability and data redundancy. The possible values are 3, 5, or 7. The default value is 3.

property replicationSpecs

replicationSpecs: GetClusterReplicationSpec[];

Configuration for cluster regions. See Replication Spec below for more details.

property snapshotBackupPolicies

snapshotBackupPolicies: GetClusterSnapshotBackupPolicy[];

current snapshot schedule and retention settings for the cluster.

property srvAddress

srvAddress: string;

Connection string for connecting to the Atlas cluster. The +srv modifier forces the connection to use TLS/SSL. See the mongoURI for additional options.

property stateName

stateName: string;

Indicates the current state of the cluster. The possible states are: - IDLE - CREATING - UPDATING - DELETING - DELETED - REPAIRING

interface GetClustersArgs

interface GetClustersArgs

A collection of arguments for invoking getClusters.

property projectId

projectId: string;

The unique ID for the project to get the clusters.

interface GetClustersResult

interface GetClustersResult

A collection of values returned by getClusters.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property projectId

projectId: string;

property results

results: GetClustersResult[];

A list where each represents a Cluster. See Cluster below for more details.

interface GetCustomDbRoleArgs

interface GetCustomDbRoleArgs

A collection of arguments for invoking getCustomDbRole.

property inheritedRoles

inheritedRoles?: GetCustomDbRoleInheritedRole[];

property projectId

projectId: string;

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

property roleName

roleName: string;

Name of the custom role.

interface GetCustomDbRoleResult

interface GetCustomDbRoleResult

A collection of values returned by getCustomDbRole.

property actions

actions: GetCustomDbRoleAction[];

property id

id: string;

The provider-assigned unique ID for this managed resource.

property inheritedRoles

inheritedRoles?: GetCustomDbRoleInheritedRole[];

property projectId

projectId: string;

property roleName

roleName: string;

interface GetCustomDbRolesArgs

interface GetCustomDbRolesArgs

A collection of arguments for invoking getCustomDbRoles.

property projectId

projectId: string;

The unique ID for the project to get all custom db roles.

interface GetCustomDbRolesResult

interface GetCustomDbRolesResult

A collection of values returned by getCustomDbRoles.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property projectId

projectId: string;

property results

results: GetCustomDbRolesResult[];

A list where each represents a custom db roles.

interface GetDatabaseUserArgs

interface GetDatabaseUserArgs

A collection of arguments for invoking getDatabaseUser.

property authDatabaseName

authDatabaseName?: undefined | string;

The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.

property databaseName

DEPRECATED use auth_database_name instead
databaseName?: undefined | string;

Database on which the user has the specified role. A role on the admin database can include privileges that apply to the other databases.

property projectId

projectId: string;

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

property username

username: string;

Username for authenticating to MongoDB.

interface GetDatabaseUserResult

interface GetDatabaseUserResult

A collection of values returned by getDatabaseUser.

property authDatabaseName

authDatabaseName?: undefined | string;

property awsIamType

awsIamType: string;

The new database user authenticates with AWS IAM credentials. Default is NONE, USER means user has AWS IAM user credentials, ROLE - means user has credentials associated with an AWS IAM role.

property databaseName

DEPRECATED use auth_database_name instead
databaseName?: undefined | string;

Database on which the user has the specified role. A role on the admin database can include privileges that apply to the other databases.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property labels

labels: GetDatabaseUserLabel[];

property projectId

projectId: string;

property roles

roles: GetDatabaseUserRole[];

List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.

property scopes

scopes: GetDatabaseUserScope[];

Array of clusters and Atlas Data Lakes that this user has access to.

property username

username: string;

property x509Type

x509Type: string;

X.509 method by which the provided username is authenticated.

interface GetDatabaseUsersArgs

interface GetDatabaseUsersArgs

A collection of arguments for invoking getDatabaseUsers.

property projectId

projectId: string;

The unique ID for the project to get all database users.

interface GetDatabaseUsersResult

interface GetDatabaseUsersResult

A collection of values returned by getDatabaseUsers.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property projectId

projectId: string;

ID of the Atlas project the user belongs to.

property results

results: GetDatabaseUsersResult[];

A list where each represents a Database user.

function getEnv

getEnv(vars: string[]): string | undefined

function getEnvBoolean

getEnvBoolean(vars: string[]): boolean | undefined

function getEnvNumber

getEnvNumber(vars: string[]): number | undefined

interface GetGlobalClusterConfigArgs

interface GetGlobalClusterConfigArgs

A collection of arguments for invoking getGlobalClusterConfig.

property clusterName

clusterName: string;

property managedNamespaces

managedNamespaces?: GetGlobalClusterConfigManagedNamespace[];

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

property projectId

projectId: string;

The unique ID for the project to create the database user. * `clusterName - (Required) The name of the Global Cluster.

interface GetGlobalClusterConfigResult

interface GetGlobalClusterConfigResult

A collection of values returned by getGlobalClusterConfig.

property clusterName

clusterName: string;

property customZoneMapping

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.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property managedNamespaces

managedNamespaces: GetGlobalClusterConfigManagedNamespace[];

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

property projectId

projectId: string;

interface GetMaintenanceWindowArgs

interface GetMaintenanceWindowArgs

A collection of arguments for invoking getMaintenanceWindow.

property projectId

projectId: string;

The unique identifier of the project for the Maintenance Window.

interface GetMaintenanceWindowResult

interface GetMaintenanceWindowResult

A collection of values returned by getMaintenanceWindow.

property dayOfWeek

dayOfWeek: number;

Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.

property hourOfDay

hourOfDay: number;

Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).

property id

id: string;

The provider-assigned unique ID for this managed resource.

property numberOfDeferrals

numberOfDeferrals: number;

Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.

property projectId

projectId: string;

property startAsap

startAsap: boolean;

Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.

interface GetNetworkContainerArgs

interface GetNetworkContainerArgs

A collection of arguments for invoking getNetworkContainer.

property containerId

containerId: string;

The Network Peering Container ID.

property projectId

projectId: string;

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

interface GetNetworkContainerResult

interface GetNetworkContainerResult

A collection of values returned by getNetworkContainer.

property atlasCidrBlock

atlasCidrBlock: string;

CIDR block that Atlas uses for your clusters. Atlas uses the specified CIDR block for all other Network Peering connections created in the project. The Atlas CIDR block must be at least a /24 and at most a /21 in one of the following private networks.

property azureSubscriptionId

azureSubscriptionId: string;

Unique identifer of the Azure subscription in which the VNet resides.

property containerId

containerId: string;

property gcpProjectId

gcpProjectId: string;

Unique identifier of the GCP project in which the Network Peering connection resides.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property networkName

networkName: string;

Name of the Network Peering connection in the Atlas project.

property projectId

projectId: string;

property providerName

providerName: string;

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

property provisioned

provisioned: boolean;

Indicates whether the project has Network Peering connections deployed in the container.

property region

region: string;

The Atlas Azure region name for where this container will exist.

property regionName

regionName: string;

The Atlas AWS region name for where this container will exist.

property vnetName

vnetName: string;

The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.

property vpcId

vpcId: string;

Unique identifier of the project’s VPC.

interface GetNetworkContainersArgs

interface GetNetworkContainersArgs

A collection of arguments for invoking getNetworkContainers.

property projectId

projectId: string;

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

property providerName

providerName: string;

Cloud provider for this Network peering container. Accepted values are AWS, GCP, and Azure.

interface GetNetworkContainersResult

interface GetNetworkContainersResult

A collection of values returned by getNetworkContainers.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property projectId

projectId: string;

property providerName

providerName: string;

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

property results

results: GetNetworkContainersResult[];

A list where each represents a Network Peering Container.

interface GetNetworkPeeringArgs

interface GetNetworkPeeringArgs

A collection of arguments for invoking getNetworkPeering.

property peeringId

peeringId: string;

Atlas assigned unique ID for the peering connection.

property projectId

projectId: string;

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

interface GetNetworkPeeringResult

interface GetNetworkPeeringResult

A collection of values returned by getNetworkPeering.

property accepterRegionName

accepterRegionName: string;

Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.

property atlasCidrBlock

atlasCidrBlock: string;

Unique identifier for an Azure AD directory.

property atlasId

atlasId: string;

property awsAccountId

awsAccountId: string;

Account ID of the owner of the peer VPC.

property azureDirectoryId

azureDirectoryId: string;

Unique identifier for an Azure AD directory.

property azureSubscriptionId

azureSubscriptionId: string;

Unique identifer of the Azure subscription in which the VNet resides.

property connectionId

connectionId: string;

Unique identifier for the peering connection.

property containerId

containerId: string;

property errorMessage

errorMessage: string;

When "status" : "FAILED", Atlas provides a description of the error.

property errorState

errorState: string;

Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.

property errorStateName

errorStateName: string;

Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.

property gcpProjectId

gcpProjectId: string;

GCP project ID of the owner of the network peer.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property networkName

networkName: string;

Name of the network peer to which Atlas connects.

property peeringId

peeringId: string;

property projectId

projectId: string;

property providerName

providerName: string;

Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values AWS, AZURE, GCP).

property resourceGroupName

resourceGroupName: string;

Name of your Azure resource group.

property routeTableCidrBlock

routeTableCidrBlock: string;

Peer VPC CIDR block or subnet.

property status

status: string;

Status of the Atlas network peering connection: ADDING_PEER, AVAILABLE, FAILED, DELETING, WAITING_FOR_USER.

property statusName

statusName: string;

The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.

property vnetName

vnetName: string;

Name of your Azure VNet.

property vpcId

vpcId: string;

Unique identifier of the peer VPC.

interface GetNetworkPeeringsArgs

interface GetNetworkPeeringsArgs

A collection of arguments for invoking getNetworkPeerings.

property projectId

projectId: string;

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

interface GetNetworkPeeringsResult

interface GetNetworkPeeringsResult

A collection of values returned by getNetworkPeerings.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property projectId

projectId: string;

property results

results: GetNetworkPeeringsResult[];

A list where each represents a Network Peering Connection.

interface GetPrivateEndpointArgs

interface GetPrivateEndpointArgs

A collection of arguments for invoking getPrivateEndpoint.

property privateLinkId

privateLinkId: string;

Unique identifier of the AWS PrivateLink connection.

property projectId

projectId: string;

Unique identifier for the project.

interface GetPrivateEndpointInterfaceLinkArgs

interface GetPrivateEndpointInterfaceLinkArgs

A collection of arguments for invoking getPrivateEndpointInterfaceLink.

property interfaceEndpointId

interfaceEndpointId: string;

property privateLinkId

privateLinkId: string;

Unique identifier of the AWS PrivateLink connection.

property projectId

projectId: string;

Unique identifier for the project.

interface GetPrivateEndpointInterfaceLinkResult

interface GetPrivateEndpointInterfaceLinkResult

A collection of values returned by getPrivateEndpointInterfaceLink.

property connectionStatus

connectionStatus: string;

Status of the interface endpoint. Returns one of the following values:

property deleteRequested

deleteRequested: boolean;

Indicates if Atlas received a request to remove the interface endpoint from the private endpoint connection.

property errorMessage

errorMessage: string;

Error message pertaining to the interface endpoint. Returns null if there are no errors.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property interfaceEndpointId

interfaceEndpointId: string;

property privateLinkId

privateLinkId: string;

property projectId

projectId: string;

interface GetPrivateEndpointResult

interface GetPrivateEndpointResult

A collection of values returned by getPrivateEndpoint.

property endpointServiceName

endpointServiceName: string;

Name of the PrivateLink endpoint service in AWS. Returns null while the endpoint service is being created.

property errorMessage

errorMessage: string;

Error message pertaining to the AWS PrivateLink connection. Returns null if there are no errors.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property interfaceEndpoints

interfaceEndpoints: string[];

Unique identifiers of the interface endpoints in your VPC that you added to the AWS PrivateLink connection.

property privateLinkId

privateLinkId: string;

property projectId

projectId: string;

property status

status: string;

Status of the AWS PrivateLink connection. Returns one of the following values:

interface GetProjectArgs

interface GetProjectArgs

A collection of arguments for invoking getProject.

property name

name?: undefined | string;

The unique ID for the project.

property projectId

projectId?: undefined | string;

The unique ID for the project.

interface GetProjectIpWhitelistArgs

interface GetProjectIpWhitelistArgs

A collection of arguments for invoking getProjectIpWhitelist.

property awsSecurityGroup

awsSecurityGroup?: undefined | string;

ID of the whitelisted AWS security group. Mutually exclusive with cidrBlock and ipAddress.

property cidrBlock

cidrBlock?: undefined | string;

Whitelist entry in Classless Inter-Domain Routing (CIDR) notation. Mutually exclusive with awsSecurityGroup and ipAddress.

property ipAddress

ipAddress?: undefined | string;

Whitelisted IP address. Mutually exclusive with awsSecurityGroup and cidrBlock.

property projectId

projectId: string;

The ID of the project in which to add the whitelist entry.

interface GetProjectIpWhitelistResult

interface GetProjectIpWhitelistResult

A collection of values returned by getProjectIpWhitelist.

property awsSecurityGroup

awsSecurityGroup: string;

property cidrBlock

cidrBlock: string;

property comment

comment: string;

Comment to add to the whitelist entry.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ipAddress

ipAddress: string;

property projectId

projectId: string;

interface GetProjectResult

interface GetProjectResult

A collection of values returned by getProject.

property clusterCount

clusterCount: number;

property created

created: string;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property name

name?: undefined | string;

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

property orgId

orgId: string;

The ID of the organization you want to create the project within. *clusterCount - The number of Atlas clusters deployed in the project. *created - The ISO-8601-formatted timestamp of when Atlas created the project. * teams.#.team_id - The unique identifier of the team you want to associate with the project. The team and project must share the same parent organization. * teams.#.role_names - Each string in the array represents a project role assigned to the team. Every user associated with the team inherits these roles. The following are valid roles: * GROUP_OWNER * GROUP_READ_ONLY * GROUP_DATA_ACCESS_ADMIN * GROUP_DATA_ACCESS_READ_WRITE * GROUP_DATA_ACCESS_READ_ONLY * GROUP_CLUSTER_MANAGER

property projectId

projectId?: undefined | string;

property teams

teams: GetProjectTeam[];

interface GetProjectsArgs

interface GetProjectsArgs

A collection of arguments for invoking getProjects.

property itemsPerPage

itemsPerPage?: undefined | number;

Number of items to return per page, up to a maximum of 500. Defaults to 100.

property pageNum

pageNum?: undefined | number;

The page to return. Defaults to 1.

interface GetProjectsResult

interface GetProjectsResult

A collection of values returned by getProjects.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property itemsPerPage

itemsPerPage?: undefined | number;

property pageNum

pageNum?: undefined | number;

property results

results: GetProjectsResult[];

property totalCount

totalCount: number;

interface GetTeamArgs

interface GetTeamArgs

A collection of arguments for invoking getTeam.

property name

name?: undefined | string;

The team name.

property orgId

orgId: string;

The unique identifier for the organization you want to associate the team with.

property teamId

teamId?: undefined | string;

The unique identifier for the team.

interface GetTeamResult

interface GetTeamResult

A collection of values returned by getTeam.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property name

name: string;

The name of the team you want to create.

property orgId

orgId: string;

property teamId

teamId: string;

The unique identifier for the team.

property usernames

usernames: string[];

The users who are part of the organization.

interface GetTeamsArgs

interface GetTeamsArgs

A collection of arguments for invoking getTeams.

property name

name?: undefined | string;

property orgId

orgId: string;

property teamId

teamId?: undefined | string;

interface GetTeamsResult

interface GetTeamsResult

A collection of values returned by getTeams.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property name

name: string;

property orgId

orgId: string;

property teamId

teamId: string;

property usernames

usernames: string[];

function getVersion

getVersion(): string

interface GlobalClusterConfigArgs

interface GlobalClusterConfigArgs

The set of arguments for constructing a GlobalClusterConfig resource.

property clusterName

clusterName: pulumi.Input<string>;

property customZoneMappings

customZoneMappings?: pulumi.Input<pulumi.Input<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.

property managedNamespaces

managedNamespaces?: pulumi.Input<pulumi.Input<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.

property projectId

projectId: pulumi.Input<string>;

The unique ID for the project to create the database user. * `clusterName - (Required) The name of the Global Cluster.

interface GlobalClusterConfigState

interface GlobalClusterConfigState

Input properties used for looking up and filtering GlobalClusterConfig resources.

property clusterName

clusterName?: pulumi.Input<string>;

property customZoneMapping

customZoneMapping?: pulumi.Input<{[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.

property customZoneMappings

customZoneMappings?: pulumi.Input<pulumi.Input<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.

property managedNamespaces

managedNamespaces?: pulumi.Input<pulumi.Input<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.

property projectId

projectId?: pulumi.Input<string>;

The unique ID for the project to create the database user. * `clusterName - (Required) The name of the Global Cluster.

interface MaintenanceWindowArgs

interface MaintenanceWindowArgs

The set of arguments for constructing a MaintenanceWindow resource.

property dayOfWeek

dayOfWeek?: pulumi.Input<number>;

Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.

property defer

defer?: pulumi.Input<boolean>;

Defer maintenance for the given project for one week.

property hourOfDay

hourOfDay?: pulumi.Input<number>;

Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).

property numberOfDeferrals

numberOfDeferrals?: pulumi.Input<number>;

Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.

property projectId

projectId: pulumi.Input<string>;

The unique identifier of the project for the Maintenance Window.

interface MaintenanceWindowState

interface MaintenanceWindowState

Input properties used for looking up and filtering MaintenanceWindow resources.

property dayOfWeek

dayOfWeek?: pulumi.Input<number>;

Day of the week when you would like the maintenance window to start as a 1-based integer: S=1, M=2, T=3, W=4, T=5, F=6, S=7.

property defer

defer?: pulumi.Input<boolean>;

Defer maintenance for the given project for one week.

property hourOfDay

hourOfDay?: pulumi.Input<number>;

Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).

property numberOfDeferrals

numberOfDeferrals?: pulumi.Input<number>;

Number of times the current maintenance event for this project has been deferred, you can set a maximum of 2 deferrals.

property projectId

projectId?: pulumi.Input<string>;

The unique identifier of the project for the Maintenance Window.

property startAsap

startAsap?: pulumi.Input<boolean>;

Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.

interface NetworkContainerArgs

interface NetworkContainerArgs

The set of arguments for constructing a NetworkContainer resource.

property atlasCidrBlock

atlasCidrBlock: pulumi.Input<string>;

CIDR block that Atlas uses for the Network Peering containers in your project. Atlas uses the specified CIDR block for all other Network Peering connections created in the project. The Atlas CIDR block must be at least a /24 and at most a /21 in one of the following private networks: * Lower bound: 10.0.0.0 - Upper bound: 10.255.255.255 - Prefix: 10/8 * Lower bound: 172.16.0.0 - Upper bound:172.31.255.255 - Prefix: 172.16/12 * Lower bound: 192.168.0.0 - Upper bound:192.168.255.255 - Prefix: 192.168/16

property projectId

projectId: pulumi.Input<string>;

Unique identifier for the Atlas project for this Network Peering Container.

property providerName

providerName?: pulumi.Input<string>;

Cloud provider for this Network Peering connection. Accepted values are GCP, AWS, AZURE. If omitted, Atlas sets this parameter to AWS.

property region

region?: pulumi.Input<string>;

Atlas region where the container resides, see the reference list for Atlas Azure region names Azure.

property regionName

regionName?: pulumi.Input<string>;

The Atlas AWS region name for where this container will exist, see the reference list for Atlas AWS region names AWS.

interface NetworkContainerState

interface NetworkContainerState

Input properties used for looking up and filtering NetworkContainer resources.

property atlasCidrBlock

atlasCidrBlock?: pulumi.Input<string>;

CIDR block that Atlas uses for the Network Peering containers in your project. Atlas uses the specified CIDR block for all other Network Peering connections created in the project. The Atlas CIDR block must be at least a /24 and at most a /21 in one of the following private networks: * Lower bound: 10.0.0.0 - Upper bound: 10.255.255.255 - Prefix: 10/8 * Lower bound: 172.16.0.0 - Upper bound:172.31.255.255 - Prefix: 172.16/12 * Lower bound: 192.168.0.0 - Upper bound:192.168.255.255 - Prefix: 192.168/16

property azureSubscriptionId

azureSubscriptionId?: pulumi.Input<string>;

Unique identifier of the Azure subscription in which the VNet resides. * * vnetName - The name of the Azure VNet. Returns null. This value is populated once you create a new network peering connection with the network peering resource.

property containerId

containerId?: pulumi.Input<string>;

The Network Peering Container ID.

property gcpProjectId

gcpProjectId?: pulumi.Input<string>;

Unique identifier of the GCP project in which the network peer resides. Returns null. This value is populated once you create a new network peering connection with the network peering resource.

property networkName

networkName?: pulumi.Input<string>;

Unique identifier of the Network Peering connection in the Atlas project. Returns null. This value is populated once you create a new network peering connection with the network peering resource. AZURE ONLY:

property projectId

projectId?: pulumi.Input<string>;

Unique identifier for the Atlas project for this Network Peering Container.

property providerName

providerName?: pulumi.Input<string>;

Cloud provider for this Network Peering connection. Accepted values are GCP, AWS, AZURE. If omitted, Atlas sets this parameter to AWS.

property provisioned

provisioned?: pulumi.Input<boolean>;

Indicates whether the project has Network Peering connections deployed in the container. AWS ONLY:

property region

region?: pulumi.Input<string>;

Atlas region where the container resides, see the reference list for Atlas Azure region names Azure.

property regionName

regionName?: pulumi.Input<string>;

The Atlas AWS region name for where this container will exist, see the reference list for Atlas AWS region names AWS.

property vnetName

vnetName?: pulumi.Input<string>;

property vpcId

vpcId?: pulumi.Input<string>;

Unique identifier of Atlas’ AWS VPC. CGP ONLY:

interface NetworkPeeringArgs

interface NetworkPeeringArgs

The set of arguments for constructing a NetworkPeering resource.

property accepterRegionName

accepterRegionName?: pulumi.Input<string>;

Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.

property atlasCidrBlock

atlasCidrBlock?: pulumi.Input<string>;

property atlasGcpProjectId

atlasGcpProjectId?: pulumi.Input<string>;

The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that it is need to set up the reciprocal connection.

property atlasVpcName

atlasVpcName?: pulumi.Input<string>;

property awsAccountId

awsAccountId?: pulumi.Input<string>;

AWS Account ID of the owner of the peer VPC.

property azureDirectoryId

azureDirectoryId?: pulumi.Input<string>;

Unique identifier for an Azure AD directory.

property azureSubscriptionId

azureSubscriptionId?: pulumi.Input<string>;

Unique identifier of the Azure subscription in which the VNet resides.

property containerId

containerId: pulumi.Input<string>;

Unique identifier of the MongoDB Atlas container for the provider (GCP) or provider/region (AWS, AZURE). You can create an MongoDB Atlas container using the networkContainer resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.

property gcpProjectId

gcpProjectId?: pulumi.Input<string>;

GCP project ID of the owner of the network peer.

property networkName

networkName?: pulumi.Input<string>;

Name of the network peer to which Atlas connects.

property projectId

projectId: pulumi.Input<string>;

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

property providerName

providerName: pulumi.Input<string>;

Cloud provider to whom the peering connection is being made. (Possible Values AWS, AZURE, GCP).

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

Name of your Azure resource group.

property routeTableCidrBlock

routeTableCidrBlock?: pulumi.Input<string>;

AWS VPC CIDR block or subnet.

property vnetName

vnetName?: pulumi.Input<string>;

Name of your Azure VNet.

property vpcId

vpcId?: pulumi.Input<string>;

Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the networkContainer resource).

interface NetworkPeeringState

interface NetworkPeeringState

Input properties used for looking up and filtering NetworkPeering resources.

property accepterRegionName

accepterRegionName?: pulumi.Input<string>;

Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.

property atlasCidrBlock

atlasCidrBlock?: pulumi.Input<string>;

property atlasGcpProjectId

atlasGcpProjectId?: pulumi.Input<string>;

The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that it is need to set up the reciprocal connection.

property atlasId

atlasId?: pulumi.Input<string>;

property atlasVpcName

atlasVpcName?: pulumi.Input<string>;

property awsAccountId

awsAccountId?: pulumi.Input<string>;

AWS Account ID of the owner of the peer VPC.

property azureDirectoryId

azureDirectoryId?: pulumi.Input<string>;

Unique identifier for an Azure AD directory.

property azureSubscriptionId

azureSubscriptionId?: pulumi.Input<string>;

Unique identifier of the Azure subscription in which the VNet resides.

property connectionId

connectionId?: pulumi.Input<string>;

Unique identifier of the Atlas network peering container.

property containerId

containerId?: pulumi.Input<string>;

Unique identifier of the MongoDB Atlas container for the provider (GCP) or provider/region (AWS, AZURE). You can create an MongoDB Atlas container using the networkContainer resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.

property errorMessage

errorMessage?: pulumi.Input<string>;

When "status" : "FAILED", Atlas provides a description of the error.

property errorState

errorState?: pulumi.Input<string>;

Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.

property errorStateName

errorStateName?: pulumi.Input<string>;

Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.

property gcpProjectId

gcpProjectId?: pulumi.Input<string>;

GCP project ID of the owner of the network peer.

property networkName

networkName?: pulumi.Input<string>;

Name of the network peer to which Atlas connects.

property peerId

peerId?: pulumi.Input<string>;

Unique identifier of the Atlas network peer.

property projectId

projectId?: pulumi.Input<string>;

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

property providerName

providerName?: pulumi.Input<string>;

Cloud provider to whom the peering connection is being made. (Possible Values AWS, AZURE, GCP).

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

Name of your Azure resource group.

property routeTableCidrBlock

routeTableCidrBlock?: pulumi.Input<string>;

AWS VPC CIDR block or subnet.

property status

status?: pulumi.Input<string>;

Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.

property statusName

statusName?: pulumi.Input<string>;

(AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.

property vnetName

vnetName?: pulumi.Input<string>;

Name of your Azure VNet.

property vpcId

vpcId?: pulumi.Input<string>;

Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the networkContainer resource).

interface PrivateEndpointArgs

interface PrivateEndpointArgs

The set of arguments for constructing a PrivateEndpoint resource.

property projectId

projectId: pulumi.Input<string>;

Required Unique identifier for the project.

property providerName

providerName: pulumi.Input<string>;

property region

region: pulumi.Input<string>;

Cloud provider region in which you want to create the private endpoint connection. Accepted values are: * us-east-1 * us-east-2 * us-west-1 * us-west-2 * ca-central-1 * sa-east-1 * eu-north-1 * eu-west-1 * eu-west-2 * eu-west-3 * eu-central-1 * me-south-1 * ap-northeast-1 * ap-northeast-2 * ap-south-1 * ap-southeast-1 * ap-southeast-2 * ap-east-1

interface PrivateEndpointInterfaceLinkArgs

interface PrivateEndpointInterfaceLinkArgs

The set of arguments for constructing a PrivateEndpointInterfaceLink resource.

property interfaceEndpointId

interfaceEndpointId: pulumi.Input<string>;

Unique identifier of the interface endpoint you created in your VPC with the AWS resource.

property privateLinkId

privateLinkId: pulumi.Input<string>;

Unique identifier of the AWS PrivateLink connection which is created by mongodbatlas.PrivateEndpoint resource.

property projectId

projectId: pulumi.Input<string>;

Unique identifier for the project.

interface PrivateEndpointInterfaceLinkState

interface PrivateEndpointInterfaceLinkState

Input properties used for looking up and filtering PrivateEndpointInterfaceLink resources.

property connectionStatus

connectionStatus?: pulumi.Input<string>;

Status of the interface endpoint. Returns one of the following values:

property deleteRequested

deleteRequested?: pulumi.Input<boolean>;

Indicates if Atlas received a request to remove the interface endpoint from the private endpoint connection.

property errorMessage

errorMessage?: pulumi.Input<string>;

Error message pertaining to the interface endpoint. Returns null if there are no errors.

property interfaceEndpointId

interfaceEndpointId?: pulumi.Input<string>;

Unique identifier of the interface endpoint you created in your VPC with the AWS resource.

property privateLinkId

privateLinkId?: pulumi.Input<string>;

Unique identifier of the AWS PrivateLink connection which is created by mongodbatlas.PrivateEndpoint resource.

property projectId

projectId?: pulumi.Input<string>;

Unique identifier for the project.

interface PrivateEndpointState

interface PrivateEndpointState

Input properties used for looking up and filtering PrivateEndpoint resources.

property endpointServiceName

endpointServiceName?: pulumi.Input<string>;

Name of the PrivateLink endpoint service in AWS. Returns null while the endpoint service is being created.

property errorMessage

errorMessage?: pulumi.Input<string>;

Error message pertaining to the AWS PrivateLink connection. Returns null if there are no errors.

property interfaceEndpoints

interfaceEndpoints?: pulumi.Input<pulumi.Input<string>[]>;

Unique identifiers of the interface endpoints in your VPC that you added to the AWS PrivateLink connection.

property privateLinkId

privateLinkId?: pulumi.Input<string>;

Unique identifier of the AWS PrivateLink connection.

property projectId

projectId?: pulumi.Input<string>;

Required Unique identifier for the project.

property providerName

providerName?: pulumi.Input<string>;

property region

region?: pulumi.Input<string>;

Cloud provider region in which you want to create the private endpoint connection. Accepted values are: * us-east-1 * us-east-2 * us-west-1 * us-west-2 * ca-central-1 * sa-east-1 * eu-north-1 * eu-west-1 * eu-west-2 * eu-west-3 * eu-central-1 * me-south-1 * ap-northeast-1 * ap-northeast-2 * ap-south-1 * ap-southeast-1 * ap-southeast-2 * ap-east-1

property status

status?: pulumi.Input<string>;

Status of the AWS PrivateLink connection. Returns one of the following values:

interface PrivateIpModeArgs

interface PrivateIpModeArgs

The set of arguments for constructing a PrivateIpMode resource.

property enabled

enabled: pulumi.Input<boolean>;

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

property projectId

projectId: pulumi.Input<string>;

The unique ID for the project to enable Only Private IP Mode.

interface PrivateIpModeState

interface PrivateIpModeState

Input properties used for looking up and filtering PrivateIpMode resources.

property enabled

enabled?: pulumi.Input<boolean>;

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

property projectId

projectId?: pulumi.Input<string>;

The unique ID for the project to enable Only Private IP Mode.

interface ProjectArgs

interface ProjectArgs

The set of arguments for constructing a Project resource.

property name

name?: pulumi.Input<string>;

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

property orgId

orgId: pulumi.Input<string>;

The ID of the organization you want to create the project within.

property teams

teams?: pulumi.Input<pulumi.Input<ProjectTeam>[]>;

interface ProjectIpWhitelistArgs

interface ProjectIpWhitelistArgs

The set of arguments for constructing a ProjectIpWhitelist resource.

property awsSecurityGroup

awsSecurityGroup?: pulumi.Input<string>;

ID of the whitelisted AWS security group. Mutually exclusive with cidrBlock and ipAddress.

property cidrBlock

cidrBlock?: pulumi.Input<string>;

Whitelist entry in Classless Inter-Domain Routing (CIDR) notation. Mutually exclusive with awsSecurityGroup and ipAddress.

property comment

comment?: pulumi.Input<string>;

Comment to add to the whitelist entry.

property ipAddress

ipAddress?: pulumi.Input<string>;

Whitelisted IP address. Mutually exclusive with awsSecurityGroup and cidrBlock.

property projectId

projectId: pulumi.Input<string>;

The ID of the project in which to add the whitelist entry.

interface ProjectIpWhitelistState

interface ProjectIpWhitelistState

Input properties used for looking up and filtering ProjectIpWhitelist resources.

property awsSecurityGroup

awsSecurityGroup?: pulumi.Input<string>;

ID of the whitelisted AWS security group. Mutually exclusive with cidrBlock and ipAddress.

property cidrBlock

cidrBlock?: pulumi.Input<string>;

Whitelist entry in Classless Inter-Domain Routing (CIDR) notation. Mutually exclusive with awsSecurityGroup and ipAddress.

property comment

comment?: pulumi.Input<string>;

Comment to add to the whitelist entry.

property ipAddress

ipAddress?: pulumi.Input<string>;

Whitelisted IP address. Mutually exclusive with awsSecurityGroup and cidrBlock.

property projectId

projectId?: pulumi.Input<string>;

The ID of the project in which to add the whitelist entry.

interface ProjectState

interface ProjectState

Input properties used for looking up and filtering Project resources.

property clusterCount

clusterCount?: pulumi.Input<number>;

The number of Atlas clusters deployed in the project..

property created

created?: pulumi.Input<string>;

The ISO-8601-formatted timestamp of when Atlas created the project..

property name

name?: pulumi.Input<string>;

The name of the project you want to create. (Cannot be changed via this Provider after creation.)

property orgId

orgId?: pulumi.Input<string>;

The ID of the organization you want to create the project within.

property teams

teams?: pulumi.Input<pulumi.Input<ProjectTeam>[]>;

interface ProviderArgs

interface ProviderArgs

The set of arguments for constructing a Provider resource.

property privateKey

privateKey?: pulumi.Input<string>;

MongoDB Atlas Programmatic Private Key

property publicKey

publicKey?: pulumi.Input<string>;

MongoDB Atlas Programmatic Public Key

interface TeamArgs

interface TeamArgs

The set of arguments for constructing a Team resource.

property name

name?: pulumi.Input<string>;

The name of the team you want to create.

property orgId

orgId: pulumi.Input<string>;

The unique identifier for the organization you want to associate the team with.

property usernames

usernames: pulumi.Input<pulumi.Input<string>[]>;

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

interface TeamsArgs

interface TeamsArgs

The set of arguments for constructing a Teams resource.

property name

name?: pulumi.Input<string>;

property orgId

orgId: pulumi.Input<string>;

property usernames

usernames: pulumi.Input<pulumi.Input<string>[]>;

interface TeamsState

interface TeamsState

Input properties used for looking up and filtering Teams resources.

property name

name?: pulumi.Input<string>;

property orgId

orgId?: pulumi.Input<string>;

property teamId

teamId?: pulumi.Input<string>;

property usernames

usernames?: pulumi.Input<pulumi.Input<string>[]>;

interface TeamState

interface TeamState

Input properties used for looking up and filtering Team resources.

property name

name?: pulumi.Input<string>;

The name of the team you want to create.

property orgId

orgId?: pulumi.Input<string>;

The unique identifier for the organization you want to associate the team with.

property teamId

teamId?: pulumi.Input<string>;

The unique identifier for the team.

property usernames

usernames?: pulumi.Input<pulumi.Input<string>[]>;

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

interface X509AuthenticationDatabaseUserArgs

interface X509AuthenticationDatabaseUserArgs

The set of arguments for constructing a X509AuthenticationDatabaseUser resource.

property customerX509Cas

customerX509Cas?: pulumi.Input<string>;

PEM string containing one or more customer CAs for database user authentication.

property monthsUntilExpiration

monthsUntilExpiration?: pulumi.Input<number>;

A number of months that the created certificate is valid for before expiry, up to 24 months. By default is 3.

property projectId

projectId: pulumi.Input<string>;

Identifier for the Atlas project associated with the X.509 configuration.

property username

username?: pulumi.Input<string>;

Username of the database user to create a certificate for.

interface X509AuthenticationDatabaseUserState

interface X509AuthenticationDatabaseUserState

Input properties used for looking up and filtering X509AuthenticationDatabaseUser resources.

property certificates

certificates?: pulumi.Input<pulumi.Input<X509AuthenticationDatabaseUserCertificate>[]>;

Array of objects where each details one unexpired database user certificate.

property currentCertificate

currentCertificate?: pulumi.Input<string>;

Contains the last X.509 certificate and private key created for a database user.

property customerX509Cas

customerX509Cas?: pulumi.Input<string>;

PEM string containing one or more customer CAs for database user authentication.

property monthsUntilExpiration

monthsUntilExpiration?: pulumi.Input<number>;

A number of months that the created certificate is valid for before expiry, up to 24 months. By default is 3.

property projectId

projectId?: pulumi.Input<string>;

Identifier for the Atlas project associated with the X.509 configuration.

property username

username?: pulumi.Input<string>;

Username of the database user to create a certificate for.