1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. NetworkPeering
MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi

mongodbatlas.NetworkPeering

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi

    # Resource: mongodbatlas.NetworkPeering

    mongodbatlas.NetworkPeering provides a Network Peering Connection resource. The resource lets you create, edit and delete network peering connections. The resource requires your Project ID.

    Ensure you have first created a network container if it is required for your configuration. See the network_container resource documentation to determine if you need a network container first. Examples for creating both container and peering resource are shown below as well as examples for creating the peering connection only.

    GCP AND AZURE ONLY: Connect via Peering Only mode is deprecated, so no longer needed. See disable Peering Only mode for details

    AZURE ONLY: To create the peering request with an Azure VNET, you must grant Atlas the following permissions on the virtual network. Microsoft.Network/virtualNetworks/virtualNetworkPeerings/read Microsoft.Network/virtualNetworks/virtualNetworkPeerings/write Microsoft.Network/virtualNetworks/virtualNetworkPeerings/delete Microsoft.Network/virtualNetworks/peer/action For more information see https://docs.atlas.mongodb.com/security-vpc-peering/ and https://docs.atlas.mongodb.com/reference/api/vpc-create-peering-connection/

    Create a Whitelist: Ensure you whitelist the private IP ranges of the subnets in which your application is hosted in order to connect to your Atlas cluster. See the project_ip_whitelist resource.

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

    Example Usage

    Container & Peering Connection

    Example with AWS

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    // Container example provided but not always required, 
    // see network_container documentation for details. 
    const test = new mongodbatlas.NetworkContainer("test", {
        projectId: projectId,
        atlasCidrBlock: "10.8.0.0/21",
        providerName: "AWS",
        regionName: "US_EAST_1",
    });
    // Create the peering connection request
    const testNetworkPeering = new mongodbatlas.NetworkPeering("test", {
        accepterRegionName: "us-east-1",
        projectId: projectId,
        containerId: "507f1f77bcf86cd799439011",
        providerName: "AWS",
        routeTableCidrBlock: "192.168.0.0/24",
        vpcId: "vpc-abc123abc123",
        awsAccountId: "abc123abc123",
    });
    // the following assumes an AWS provider is configured
    // Accept the peering connection request
    const peer = new aws.index.VpcPeeringConnectionAccepter("peer", {
        vpcPeeringConnectionId: testNetworkPeering.connectionId,
        autoAccept: true,
    });
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_mongodbatlas as mongodbatlas
    
    # Container example provided but not always required, 
    # see network_container documentation for details. 
    test = mongodbatlas.NetworkContainer("test",
        project_id=project_id,
        atlas_cidr_block="10.8.0.0/21",
        provider_name="AWS",
        region_name="US_EAST_1")
    # Create the peering connection request
    test_network_peering = mongodbatlas.NetworkPeering("test",
        accepter_region_name="us-east-1",
        project_id=project_id,
        container_id="507f1f77bcf86cd799439011",
        provider_name="AWS",
        route_table_cidr_block="192.168.0.0/24",
        vpc_id="vpc-abc123abc123",
        aws_account_id="abc123abc123")
    # the following assumes an AWS provider is configured
    # Accept the peering connection request
    peer = aws.index.VpcPeeringConnectionAccepter("peer",
        vpc_peering_connection_id=test_network_peering.connection_id,
        auto_accept=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws"
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Container example provided but not always required,
    		// see network_container documentation for details.
    		_, err := mongodbatlas.NewNetworkContainer(ctx, "test", &mongodbatlas.NetworkContainerArgs{
    			ProjectId:      pulumi.Any(projectId),
    			AtlasCidrBlock: pulumi.String("10.8.0.0/21"),
    			ProviderName:   pulumi.String("AWS"),
    			RegionName:     pulumi.String("US_EAST_1"),
    		})
    		if err != nil {
    			return err
    		}
    		// Create the peering connection request
    		testNetworkPeering, err := mongodbatlas.NewNetworkPeering(ctx, "test", &mongodbatlas.NetworkPeeringArgs{
    			AccepterRegionName:  pulumi.String("us-east-1"),
    			ProjectId:           pulumi.Any(projectId),
    			ContainerId:         pulumi.String("507f1f77bcf86cd799439011"),
    			ProviderName:        pulumi.String("AWS"),
    			RouteTableCidrBlock: pulumi.String("192.168.0.0/24"),
    			VpcId:               pulumi.String("vpc-abc123abc123"),
    			AwsAccountId:        pulumi.String("abc123abc123"),
    		})
    		if err != nil {
    			return err
    		}
    		// the following assumes an AWS provider is configured
    		// Accept the peering connection request
    		_, err = aws.NewVpcPeeringConnectionAccepter(ctx, "peer", &aws.VpcPeeringConnectionAccepterArgs{
    			VpcPeeringConnectionId: testNetworkPeering.ConnectionId,
    			AutoAccept:             true,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        // Container example provided but not always required, 
        // see network_container documentation for details. 
        var test = new Mongodbatlas.NetworkContainer("test", new()
        {
            ProjectId = projectId,
            AtlasCidrBlock = "10.8.0.0/21",
            ProviderName = "AWS",
            RegionName = "US_EAST_1",
        });
    
        // Create the peering connection request
        var testNetworkPeering = new Mongodbatlas.NetworkPeering("test", new()
        {
            AccepterRegionName = "us-east-1",
            ProjectId = projectId,
            ContainerId = "507f1f77bcf86cd799439011",
            ProviderName = "AWS",
            RouteTableCidrBlock = "192.168.0.0/24",
            VpcId = "vpc-abc123abc123",
            AwsAccountId = "abc123abc123",
        });
    
        // the following assumes an AWS provider is configured
        // Accept the peering connection request
        var peer = new Aws.Index.VpcPeeringConnectionAccepter("peer", new()
        {
            VpcPeeringConnectionId = testNetworkPeering.ConnectionId,
            AutoAccept = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.NetworkContainer;
    import com.pulumi.mongodbatlas.NetworkContainerArgs;
    import com.pulumi.mongodbatlas.NetworkPeering;
    import com.pulumi.mongodbatlas.NetworkPeeringArgs;
    import com.pulumi.aws.vpcPeeringConnectionAccepter;
    import com.pulumi.aws.VpcPeeringConnectionAccepterArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Container example provided but not always required, 
            // see network_container documentation for details. 
            var test = new NetworkContainer("test", NetworkContainerArgs.builder()
                .projectId(projectId)
                .atlasCidrBlock("10.8.0.0/21")
                .providerName("AWS")
                .regionName("US_EAST_1")
                .build());
    
            // Create the peering connection request
            var testNetworkPeering = new NetworkPeering("testNetworkPeering", NetworkPeeringArgs.builder()
                .accepterRegionName("us-east-1")
                .projectId(projectId)
                .containerId("507f1f77bcf86cd799439011")
                .providerName("AWS")
                .routeTableCidrBlock("192.168.0.0/24")
                .vpcId("vpc-abc123abc123")
                .awsAccountId("abc123abc123")
                .build());
    
            // the following assumes an AWS provider is configured
            // Accept the peering connection request
            var peer = new VpcPeeringConnectionAccepter("peer", VpcPeeringConnectionAccepterArgs.builder()
                .vpcPeeringConnectionId(testNetworkPeering.connectionId())
                .autoAccept(true)
                .build());
    
        }
    }
    
    resources:
      # Container example provided but not always required, 
      # see network_container documentation for details.
      test:
        type: mongodbatlas:NetworkContainer
        properties:
          projectId: ${projectId}
          atlasCidrBlock: 10.8.0.0/21
          providerName: AWS
          regionName: US_EAST_1
      # Create the peering connection request
      testNetworkPeering:
        type: mongodbatlas:NetworkPeering
        name: test
        properties:
          accepterRegionName: us-east-1
          projectId: ${projectId}
          containerId: 507f1f77bcf86cd799439011
          providerName: AWS
          routeTableCidrBlock: 192.168.0.0/24
          vpcId: vpc-abc123abc123
          awsAccountId: abc123abc123
      # the following assumes an AWS provider is configured
      # Accept the peering connection request
      peer:
        type: aws:vpcPeeringConnectionAccepter
        properties:
          vpcPeeringConnectionId: ${testNetworkPeering.connectionId}
          autoAccept: true
    

    Example with Azure

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    // Ensure you have created the required Azure service principal first, see
    // see https://docs.atlas.mongodb.com/security-vpc-peering/
    // Container example provided but not always required, 
    // see network_container documentation for details. 
    const test = new mongodbatlas.NetworkContainer("test", {
        projectId: projectId,
        atlasCidrBlock: ATLAS_CIDR_BLOCK,
        providerName: "AZURE",
        region: "US_EAST_2",
    });
    // Create the peering connection request
    const testNetworkPeering = new mongodbatlas.NetworkPeering("test", {
        projectId: projectId,
        containerId: test.containerId,
        providerName: "AZURE",
        azureDirectoryId: AZURE_DIRECTORY_ID,
        azureSubscriptionId: AZURE_SUBSCRIPTION_ID,
        resourceGroupName: AZURE_RESOURCES_GROUP_NAME,
        vnetName: AZURE_VNET_NAME,
    });
    // Create the cluster once the peering connection is completed
    const testAdvancedCluster = new mongodbatlas.AdvancedCluster("test", {
        projectId: projectId,
        name: "terraform-manually-test",
        clusterType: "REPLICASET",
        backupEnabled: true,
        replicationSpecs: [{
            regionConfigs: [{
                priority: 7,
                providerName: "AZURE",
                regionName: "US_EAST_2",
                electableSpecs: {
                    instanceSize: "M10",
                    nodeCount: 3,
                },
            }],
        }],
    }, {
        dependsOn: [testNetworkPeering],
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    # Ensure you have created the required Azure service principal first, see
    # see https://docs.atlas.mongodb.com/security-vpc-peering/
    # Container example provided but not always required, 
    # see network_container documentation for details. 
    test = mongodbatlas.NetworkContainer("test",
        project_id=project_id,
        atlas_cidr_block=atla_s__cid_r__block,
        provider_name="AZURE",
        region="US_EAST_2")
    # Create the peering connection request
    test_network_peering = mongodbatlas.NetworkPeering("test",
        project_id=project_id,
        container_id=test.container_id,
        provider_name="AZURE",
        azure_directory_id=azur_e__director_y__id,
        azure_subscription_id=azur_e__subscriptio_n__id,
        resource_group_name=azur_e__resource_s__grou_p__name,
        vnet_name=azur_e__vne_t__name)
    # Create the cluster once the peering connection is completed
    test_advanced_cluster = mongodbatlas.AdvancedCluster("test",
        project_id=project_id,
        name="terraform-manually-test",
        cluster_type="REPLICASET",
        backup_enabled=True,
        replication_specs=[{
            "region_configs": [{
                "priority": 7,
                "provider_name": "AZURE",
                "region_name": "US_EAST_2",
                "electable_specs": {
                    "instance_size": "M10",
                    "node_count": 3,
                },
            }],
        }],
        opts = pulumi.ResourceOptions(depends_on=[test_network_peering]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Ensure you have created the required Azure service principal first, see
    		// see https://docs.atlas.mongodb.com/security-vpc-peering/
    		// Container example provided but not always required,
    		// see network_container documentation for details.
    		test, err := mongodbatlas.NewNetworkContainer(ctx, "test", &mongodbatlas.NetworkContainerArgs{
    			ProjectId:      pulumi.Any(projectId),
    			AtlasCidrBlock: pulumi.Any(ATLAS_CIDR_BLOCK),
    			ProviderName:   pulumi.String("AZURE"),
    			Region:         pulumi.String("US_EAST_2"),
    		})
    		if err != nil {
    			return err
    		}
    		// Create the peering connection request
    		testNetworkPeering, err := mongodbatlas.NewNetworkPeering(ctx, "test", &mongodbatlas.NetworkPeeringArgs{
    			ProjectId:           pulumi.Any(projectId),
    			ContainerId:         test.ContainerId,
    			ProviderName:        pulumi.String("AZURE"),
    			AzureDirectoryId:    pulumi.Any(AZURE_DIRECTORY_ID),
    			AzureSubscriptionId: pulumi.Any(AZURE_SUBSCRIPTION_ID),
    			ResourceGroupName:   pulumi.Any(AZURE_RESOURCES_GROUP_NAME),
    			VnetName:            pulumi.Any(AZURE_VNET_NAME),
    		})
    		if err != nil {
    			return err
    		}
    		// Create the cluster once the peering connection is completed
    		_, err = mongodbatlas.NewAdvancedCluster(ctx, "test", &mongodbatlas.AdvancedClusterArgs{
    			ProjectId:     pulumi.Any(projectId),
    			Name:          pulumi.String("terraform-manually-test"),
    			ClusterType:   pulumi.String("REPLICASET"),
    			BackupEnabled: pulumi.Bool(true),
    			ReplicationSpecs: mongodbatlas.AdvancedClusterReplicationSpecArray{
    				&mongodbatlas.AdvancedClusterReplicationSpecArgs{
    					RegionConfigs: mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArray{
    						&mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArgs{
    							Priority:     pulumi.Int(7),
    							ProviderName: pulumi.String("AZURE"),
    							RegionName:   pulumi.String("US_EAST_2"),
    							ElectableSpecs: &mongodbatlas.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs{
    								InstanceSize: pulumi.String("M10"),
    								NodeCount:    pulumi.Int(3),
    							},
    						},
    					},
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			testNetworkPeering,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        // Ensure you have created the required Azure service principal first, see
        // see https://docs.atlas.mongodb.com/security-vpc-peering/
        // Container example provided but not always required, 
        // see network_container documentation for details. 
        var test = new Mongodbatlas.NetworkContainer("test", new()
        {
            ProjectId = projectId,
            AtlasCidrBlock = ATLAS_CIDR_BLOCK,
            ProviderName = "AZURE",
            Region = "US_EAST_2",
        });
    
        // Create the peering connection request
        var testNetworkPeering = new Mongodbatlas.NetworkPeering("test", new()
        {
            ProjectId = projectId,
            ContainerId = test.ContainerId,
            ProviderName = "AZURE",
            AzureDirectoryId = AZURE_DIRECTORY_ID,
            AzureSubscriptionId = AZURE_SUBSCRIPTION_ID,
            ResourceGroupName = AZURE_RESOURCES_GROUP_NAME,
            VnetName = AZURE_VNET_NAME,
        });
    
        // Create the cluster once the peering connection is completed
        var testAdvancedCluster = new Mongodbatlas.AdvancedCluster("test", new()
        {
            ProjectId = projectId,
            Name = "terraform-manually-test",
            ClusterType = "REPLICASET",
            BackupEnabled = true,
            ReplicationSpecs = new[]
            {
                new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecArgs
                {
                    RegionConfigs = new[]
                    {
                        new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigArgs
                        {
                            Priority = 7,
                            ProviderName = "AZURE",
                            RegionName = "US_EAST_2",
                            ElectableSpecs = new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs
                            {
                                InstanceSize = "M10",
                                NodeCount = 3,
                            },
                        },
                    },
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                testNetworkPeering,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.NetworkContainer;
    import com.pulumi.mongodbatlas.NetworkContainerArgs;
    import com.pulumi.mongodbatlas.NetworkPeering;
    import com.pulumi.mongodbatlas.NetworkPeeringArgs;
    import com.pulumi.mongodbatlas.AdvancedCluster;
    import com.pulumi.mongodbatlas.AdvancedClusterArgs;
    import com.pulumi.mongodbatlas.inputs.AdvancedClusterReplicationSpecArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Ensure you have created the required Azure service principal first, see
            // see https://docs.atlas.mongodb.com/security-vpc-peering/
            // Container example provided but not always required, 
            // see network_container documentation for details. 
            var test = new NetworkContainer("test", NetworkContainerArgs.builder()
                .projectId(projectId)
                .atlasCidrBlock(ATLAS_CIDR_BLOCK)
                .providerName("AZURE")
                .region("US_EAST_2")
                .build());
    
            // Create the peering connection request
            var testNetworkPeering = new NetworkPeering("testNetworkPeering", NetworkPeeringArgs.builder()
                .projectId(projectId)
                .containerId(test.containerId())
                .providerName("AZURE")
                .azureDirectoryId(AZURE_DIRECTORY_ID)
                .azureSubscriptionId(AZURE_SUBSCRIPTION_ID)
                .resourceGroupName(AZURE_RESOURCES_GROUP_NAME)
                .vnetName(AZURE_VNET_NAME)
                .build());
    
            // Create the cluster once the peering connection is completed
            var testAdvancedCluster = new AdvancedCluster("testAdvancedCluster", AdvancedClusterArgs.builder()
                .projectId(projectId)
                .name("terraform-manually-test")
                .clusterType("REPLICASET")
                .backupEnabled(true)
                .replicationSpecs(AdvancedClusterReplicationSpecArgs.builder()
                    .regionConfigs(AdvancedClusterReplicationSpecRegionConfigArgs.builder()
                        .priority(7)
                        .providerName("AZURE")
                        .regionName("US_EAST_2")
                        .electableSpecs(AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs.builder()
                            .instanceSize("M10")
                            .nodeCount(3)
                            .build())
                        .build())
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(testNetworkPeering)
                    .build());
    
        }
    }
    
    resources:
      # Ensure you have created the required Azure service principal first, see
      # see https://docs.atlas.mongodb.com/security-vpc-peering/
    
      # Container example provided but not always required, 
      # see network_container documentation for details.
      test:
        type: mongodbatlas:NetworkContainer
        properties:
          projectId: ${projectId}
          atlasCidrBlock: ${ATLAS_CIDR_BLOCK}
          providerName: AZURE
          region: US_EAST_2
      # Create the peering connection request
      testNetworkPeering:
        type: mongodbatlas:NetworkPeering
        name: test
        properties:
          projectId: ${projectId}
          containerId: ${test.containerId}
          providerName: AZURE
          azureDirectoryId: ${AZURE_DIRECTORY_ID}
          azureSubscriptionId: ${AZURE_SUBSCRIPTION_ID}
          resourceGroupName: ${AZURE_RESOURCES_GROUP_NAME}
          vnetName: ${AZURE_VNET_NAME}
      # Create the cluster once the peering connection is completed
      testAdvancedCluster:
        type: mongodbatlas:AdvancedCluster
        name: test
        properties:
          projectId: ${projectId}
          name: terraform-manually-test
          clusterType: REPLICASET
          backupEnabled: true
          replicationSpecs:
            - regionConfigs:
                - priority: 7
                  providerName: AZURE
                  regionName: US_EAST_2
                  electableSpecs:
                    instanceSize: M10
                    nodeCount: 3
        options:
          dependson:
            - ${testNetworkPeering}
    

    Peering Connection Only, Container Exists

    You can create a peering connection if an appropriate container for your cloud provider already exists in your project (see the network_container resource for more information). A container may already exist if you have already created a cluster in your project, if so you may obtain the container_id from the cluster resource as shown in the examples below.

    Create NetworkPeering Resource

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

    Constructor syntax

    new NetworkPeering(name: string, args: NetworkPeeringArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkPeering(resource_name: str,
                       args: NetworkPeeringArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkPeering(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       container_id: Optional[str] = None,
                       provider_name: Optional[str] = None,
                       project_id: Optional[str] = None,
                       gcp_project_id: Optional[str] = None,
                       aws_account_id: Optional[str] = None,
                       azure_directory_id: Optional[str] = None,
                       azure_subscription_id: Optional[str] = None,
                       atlas_vpc_name: Optional[str] = None,
                       accepter_region_name: Optional[str] = None,
                       network_name: Optional[str] = None,
                       atlas_gcp_project_id: Optional[str] = None,
                       atlas_cidr_block: Optional[str] = None,
                       resource_group_name: Optional[str] = None,
                       route_table_cidr_block: Optional[str] = None,
                       vnet_name: Optional[str] = None,
                       vpc_id: Optional[str] = None)
    func NewNetworkPeering(ctx *Context, name string, args NetworkPeeringArgs, opts ...ResourceOption) (*NetworkPeering, error)
    public NetworkPeering(string name, NetworkPeeringArgs args, CustomResourceOptions? opts = null)
    public NetworkPeering(String name, NetworkPeeringArgs args)
    public NetworkPeering(String name, NetworkPeeringArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:NetworkPeering
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NetworkPeeringArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NetworkPeeringArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NetworkPeeringArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkPeeringArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkPeeringArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var networkPeeringResource = new Mongodbatlas.NetworkPeering("networkPeeringResource", new()
    {
        ContainerId = "string",
        ProviderName = "string",
        ProjectId = "string",
        GcpProjectId = "string",
        AwsAccountId = "string",
        AzureDirectoryId = "string",
        AzureSubscriptionId = "string",
        AtlasVpcName = "string",
        AccepterRegionName = "string",
        NetworkName = "string",
        AtlasGcpProjectId = "string",
        AtlasCidrBlock = "string",
        ResourceGroupName = "string",
        RouteTableCidrBlock = "string",
        VnetName = "string",
        VpcId = "string",
    });
    
    example, err := mongodbatlas.NewNetworkPeering(ctx, "networkPeeringResource", &mongodbatlas.NetworkPeeringArgs{
    	ContainerId:         pulumi.String("string"),
    	ProviderName:        pulumi.String("string"),
    	ProjectId:           pulumi.String("string"),
    	GcpProjectId:        pulumi.String("string"),
    	AwsAccountId:        pulumi.String("string"),
    	AzureDirectoryId:    pulumi.String("string"),
    	AzureSubscriptionId: pulumi.String("string"),
    	AtlasVpcName:        pulumi.String("string"),
    	AccepterRegionName:  pulumi.String("string"),
    	NetworkName:         pulumi.String("string"),
    	AtlasGcpProjectId:   pulumi.String("string"),
    	AtlasCidrBlock:      pulumi.String("string"),
    	ResourceGroupName:   pulumi.String("string"),
    	RouteTableCidrBlock: pulumi.String("string"),
    	VnetName:            pulumi.String("string"),
    	VpcId:               pulumi.String("string"),
    })
    
    var networkPeeringResource = new NetworkPeering("networkPeeringResource", NetworkPeeringArgs.builder()
        .containerId("string")
        .providerName("string")
        .projectId("string")
        .gcpProjectId("string")
        .awsAccountId("string")
        .azureDirectoryId("string")
        .azureSubscriptionId("string")
        .atlasVpcName("string")
        .accepterRegionName("string")
        .networkName("string")
        .atlasGcpProjectId("string")
        .atlasCidrBlock("string")
        .resourceGroupName("string")
        .routeTableCidrBlock("string")
        .vnetName("string")
        .vpcId("string")
        .build());
    
    network_peering_resource = mongodbatlas.NetworkPeering("networkPeeringResource",
        container_id="string",
        provider_name="string",
        project_id="string",
        gcp_project_id="string",
        aws_account_id="string",
        azure_directory_id="string",
        azure_subscription_id="string",
        atlas_vpc_name="string",
        accepter_region_name="string",
        network_name="string",
        atlas_gcp_project_id="string",
        atlas_cidr_block="string",
        resource_group_name="string",
        route_table_cidr_block="string",
        vnet_name="string",
        vpc_id="string")
    
    const networkPeeringResource = new mongodbatlas.NetworkPeering("networkPeeringResource", {
        containerId: "string",
        providerName: "string",
        projectId: "string",
        gcpProjectId: "string",
        awsAccountId: "string",
        azureDirectoryId: "string",
        azureSubscriptionId: "string",
        atlasVpcName: "string",
        accepterRegionName: "string",
        networkName: "string",
        atlasGcpProjectId: "string",
        atlasCidrBlock: "string",
        resourceGroupName: "string",
        routeTableCidrBlock: "string",
        vnetName: "string",
        vpcId: "string",
    });
    
    type: mongodbatlas:NetworkPeering
    properties:
        accepterRegionName: string
        atlasCidrBlock: string
        atlasGcpProjectId: string
        atlasVpcName: string
        awsAccountId: string
        azureDirectoryId: string
        azureSubscriptionId: string
        containerId: string
        gcpProjectId: string
        networkName: string
        projectId: string
        providerName: string
        resourceGroupName: string
        routeTableCidrBlock: string
        vnetName: string
        vpcId: string
    

    NetworkPeering Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The NetworkPeering resource accepts the following input properties:

    ContainerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    ProjectId string
    The unique ID for the MongoDB Atlas project to create the database user.
    ProviderName string

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

    AWS ONLY:

    AccepterRegionName string
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    AtlasCidrBlock string
    AtlasGcpProjectId string
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    AtlasVpcName string
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    AwsAccountId string
    AWS Account ID of the owner of the peer VPC.
    AzureDirectoryId string
    Unique identifier for an Azure AD directory.
    AzureSubscriptionId string
    Unique identifier of the Azure subscription in which the VNet resides.
    GcpProjectId string
    GCP project ID of the owner of the network peer.
    NetworkName string

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    ResourceGroupName string
    Name of your Azure resource group.
    RouteTableCidrBlock string

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    VnetName string
    Name of your Azure VNet.
    VpcId string
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    ContainerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    ProjectId string
    The unique ID for the MongoDB Atlas project to create the database user.
    ProviderName string

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

    AWS ONLY:

    AccepterRegionName string
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    AtlasCidrBlock string
    AtlasGcpProjectId string
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    AtlasVpcName string
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    AwsAccountId string
    AWS Account ID of the owner of the peer VPC.
    AzureDirectoryId string
    Unique identifier for an Azure AD directory.
    AzureSubscriptionId string
    Unique identifier of the Azure subscription in which the VNet resides.
    GcpProjectId string
    GCP project ID of the owner of the network peer.
    NetworkName string

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    ResourceGroupName string
    Name of your Azure resource group.
    RouteTableCidrBlock string

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    VnetName string
    Name of your Azure VNet.
    VpcId string
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    containerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    projectId String
    The unique ID for the MongoDB Atlas project to create the database user.
    providerName String

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

    AWS ONLY:

    accepterRegionName String
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    atlasCidrBlock String
    atlasGcpProjectId String
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    atlasVpcName String
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    awsAccountId String
    AWS Account ID of the owner of the peer VPC.
    azureDirectoryId String
    Unique identifier for an Azure AD directory.
    azureSubscriptionId String
    Unique identifier of the Azure subscription in which the VNet resides.
    gcpProjectId String
    GCP project ID of the owner of the network peer.
    networkName String

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    resourceGroupName String
    Name of your Azure resource group.
    routeTableCidrBlock String

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    vnetName String
    Name of your Azure VNet.
    vpcId String
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    containerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    projectId string
    The unique ID for the MongoDB Atlas project to create the database user.
    providerName string

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

    AWS ONLY:

    accepterRegionName string
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    atlasCidrBlock string
    atlasGcpProjectId string
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    atlasVpcName string
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    awsAccountId string
    AWS Account ID of the owner of the peer VPC.
    azureDirectoryId string
    Unique identifier for an Azure AD directory.
    azureSubscriptionId string
    Unique identifier of the Azure subscription in which the VNet resides.
    gcpProjectId string
    GCP project ID of the owner of the network peer.
    networkName string

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    resourceGroupName string
    Name of your Azure resource group.
    routeTableCidrBlock string

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    vnetName string
    Name of your Azure VNet.
    vpcId string
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    container_id str
    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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    project_id str
    The unique ID for the MongoDB Atlas project to create the database user.
    provider_name str

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

    AWS ONLY:

    accepter_region_name str
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    atlas_cidr_block str
    atlas_gcp_project_id str
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    atlas_vpc_name str
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    aws_account_id str
    AWS Account ID of the owner of the peer VPC.
    azure_directory_id str
    Unique identifier for an Azure AD directory.
    azure_subscription_id str
    Unique identifier of the Azure subscription in which the VNet resides.
    gcp_project_id str
    GCP project ID of the owner of the network peer.
    network_name str

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    resource_group_name str
    Name of your Azure resource group.
    route_table_cidr_block str

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    vnet_name str
    Name of your Azure VNet.
    vpc_id str
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    containerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    projectId String
    The unique ID for the MongoDB Atlas project to create the database user.
    providerName String

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

    AWS ONLY:

    accepterRegionName String
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    atlasCidrBlock String
    atlasGcpProjectId String
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    atlasVpcName String
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    awsAccountId String
    AWS Account ID of the owner of the peer VPC.
    azureDirectoryId String
    Unique identifier for an Azure AD directory.
    azureSubscriptionId String
    Unique identifier of the Azure subscription in which the VNet resides.
    gcpProjectId String
    GCP project ID of the owner of the network peer.
    networkName String

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    resourceGroupName String
    Name of your Azure resource group.
    routeTableCidrBlock String

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    vnetName String
    Name of your Azure VNet.
    vpcId String
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).

    Outputs

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

    AtlasId string
    ConnectionId string
    Unique identifier of the Atlas network peering container.
    ErrorMessage string
    When "status" : "FAILED", Atlas provides a description of the error.
    ErrorState string
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    ErrorStateName string
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    Id string
    The provider-assigned unique ID for this managed resource.
    PeerId string
    Unique identifier of the Atlas network peer.
    Status string
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    StatusName string
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    AtlasId string
    ConnectionId string
    Unique identifier of the Atlas network peering container.
    ErrorMessage string
    When "status" : "FAILED", Atlas provides a description of the error.
    ErrorState string
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    ErrorStateName string
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    Id string
    The provider-assigned unique ID for this managed resource.
    PeerId string
    Unique identifier of the Atlas network peer.
    Status string
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    StatusName string
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    atlasId String
    connectionId String
    Unique identifier of the Atlas network peering container.
    errorMessage String
    When "status" : "FAILED", Atlas provides a description of the error.
    errorState String
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    errorStateName String
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    id String
    The provider-assigned unique ID for this managed resource.
    peerId String
    Unique identifier of the Atlas network peer.
    status String
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    statusName String
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    atlasId string
    connectionId string
    Unique identifier of the Atlas network peering container.
    errorMessage string
    When "status" : "FAILED", Atlas provides a description of the error.
    errorState string
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    errorStateName string
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    id string
    The provider-assigned unique ID for this managed resource.
    peerId string
    Unique identifier of the Atlas network peer.
    status string
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    statusName string
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    atlas_id str
    connection_id str
    Unique identifier of the Atlas network peering container.
    error_message str
    When "status" : "FAILED", Atlas provides a description of the error.
    error_state str
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    error_state_name str
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    id str
    The provider-assigned unique ID for this managed resource.
    peer_id str
    Unique identifier of the Atlas network peer.
    status str
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    status_name str
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    atlasId String
    connectionId String
    Unique identifier of the Atlas network peering container.
    errorMessage String
    When "status" : "FAILED", Atlas provides a description of the error.
    errorState String
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    errorStateName String
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    id String
    The provider-assigned unique ID for this managed resource.
    peerId String
    Unique identifier of the Atlas network peer.
    status String
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    statusName String
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.

    Look up Existing NetworkPeering Resource

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

    public static get(name: string, id: Input<ID>, state?: NetworkPeeringState, opts?: CustomResourceOptions): NetworkPeering
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accepter_region_name: Optional[str] = None,
            atlas_cidr_block: Optional[str] = None,
            atlas_gcp_project_id: Optional[str] = None,
            atlas_id: Optional[str] = None,
            atlas_vpc_name: Optional[str] = None,
            aws_account_id: Optional[str] = None,
            azure_directory_id: Optional[str] = None,
            azure_subscription_id: Optional[str] = None,
            connection_id: Optional[str] = None,
            container_id: Optional[str] = None,
            error_message: Optional[str] = None,
            error_state: Optional[str] = None,
            error_state_name: Optional[str] = None,
            gcp_project_id: Optional[str] = None,
            network_name: Optional[str] = None,
            peer_id: Optional[str] = None,
            project_id: Optional[str] = None,
            provider_name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            route_table_cidr_block: Optional[str] = None,
            status: Optional[str] = None,
            status_name: Optional[str] = None,
            vnet_name: Optional[str] = None,
            vpc_id: Optional[str] = None) -> NetworkPeering
    func GetNetworkPeering(ctx *Context, name string, id IDInput, state *NetworkPeeringState, opts ...ResourceOption) (*NetworkPeering, error)
    public static NetworkPeering Get(string name, Input<string> id, NetworkPeeringState? state, CustomResourceOptions? opts = null)
    public static NetworkPeering get(String name, Output<String> id, NetworkPeeringState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccepterRegionName string
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    AtlasCidrBlock string
    AtlasGcpProjectId string
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    AtlasId string
    AtlasVpcName string
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    AwsAccountId string
    AWS Account ID of the owner of the peer VPC.
    AzureDirectoryId string
    Unique identifier for an Azure AD directory.
    AzureSubscriptionId string
    Unique identifier of the Azure subscription in which the VNet resides.
    ConnectionId string
    Unique identifier of the Atlas network peering container.
    ContainerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    ErrorMessage string
    When "status" : "FAILED", Atlas provides a description of the error.
    ErrorState string
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    ErrorStateName string
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    GcpProjectId string
    GCP project ID of the owner of the network peer.
    NetworkName string

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    PeerId string
    Unique identifier of the Atlas network peer.
    ProjectId string
    The unique ID for the MongoDB Atlas project to create the database user.
    ProviderName string

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

    AWS ONLY:

    ResourceGroupName string
    Name of your Azure resource group.
    RouteTableCidrBlock string

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    Status string
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    StatusName string
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    VnetName string
    Name of your Azure VNet.
    VpcId string
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    AccepterRegionName string
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    AtlasCidrBlock string
    AtlasGcpProjectId string
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    AtlasId string
    AtlasVpcName string
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    AwsAccountId string
    AWS Account ID of the owner of the peer VPC.
    AzureDirectoryId string
    Unique identifier for an Azure AD directory.
    AzureSubscriptionId string
    Unique identifier of the Azure subscription in which the VNet resides.
    ConnectionId string
    Unique identifier of the Atlas network peering container.
    ContainerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    ErrorMessage string
    When "status" : "FAILED", Atlas provides a description of the error.
    ErrorState string
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    ErrorStateName string
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    GcpProjectId string
    GCP project ID of the owner of the network peer.
    NetworkName string

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    PeerId string
    Unique identifier of the Atlas network peer.
    ProjectId string
    The unique ID for the MongoDB Atlas project to create the database user.
    ProviderName string

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

    AWS ONLY:

    ResourceGroupName string
    Name of your Azure resource group.
    RouteTableCidrBlock string

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    Status string
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    StatusName string
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    VnetName string
    Name of your Azure VNet.
    VpcId string
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    accepterRegionName String
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    atlasCidrBlock String
    atlasGcpProjectId String
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    atlasId String
    atlasVpcName String
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    awsAccountId String
    AWS Account ID of the owner of the peer VPC.
    azureDirectoryId String
    Unique identifier for an Azure AD directory.
    azureSubscriptionId String
    Unique identifier of the Azure subscription in which the VNet resides.
    connectionId String
    Unique identifier of the Atlas network peering container.
    containerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    errorMessage String
    When "status" : "FAILED", Atlas provides a description of the error.
    errorState String
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    errorStateName String
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    gcpProjectId String
    GCP project ID of the owner of the network peer.
    networkName String

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    peerId String
    Unique identifier of the Atlas network peer.
    projectId String
    The unique ID for the MongoDB Atlas project to create the database user.
    providerName String

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

    AWS ONLY:

    resourceGroupName String
    Name of your Azure resource group.
    routeTableCidrBlock String

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    status String
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    statusName String
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    vnetName String
    Name of your Azure VNet.
    vpcId String
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    accepterRegionName string
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    atlasCidrBlock string
    atlasGcpProjectId string
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    atlasId string
    atlasVpcName string
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    awsAccountId string
    AWS Account ID of the owner of the peer VPC.
    azureDirectoryId string
    Unique identifier for an Azure AD directory.
    azureSubscriptionId string
    Unique identifier of the Azure subscription in which the VNet resides.
    connectionId string
    Unique identifier of the Atlas network peering container.
    containerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    errorMessage string
    When "status" : "FAILED", Atlas provides a description of the error.
    errorState string
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    errorStateName string
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    gcpProjectId string
    GCP project ID of the owner of the network peer.
    networkName string

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    peerId string
    Unique identifier of the Atlas network peer.
    projectId string
    The unique ID for the MongoDB Atlas project to create the database user.
    providerName string

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

    AWS ONLY:

    resourceGroupName string
    Name of your Azure resource group.
    routeTableCidrBlock string

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    status string
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    statusName string
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    vnetName string
    Name of your Azure VNet.
    vpcId string
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    accepter_region_name str
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    atlas_cidr_block str
    atlas_gcp_project_id str
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    atlas_id str
    atlas_vpc_name str
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    aws_account_id str
    AWS Account ID of the owner of the peer VPC.
    azure_directory_id str
    Unique identifier for an Azure AD directory.
    azure_subscription_id str
    Unique identifier of the Azure subscription in which the VNet resides.
    connection_id str
    Unique identifier of the Atlas network peering container.
    container_id str
    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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    error_message str
    When "status" : "FAILED", Atlas provides a description of the error.
    error_state str
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    error_state_name str
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    gcp_project_id str
    GCP project ID of the owner of the network peer.
    network_name str

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    peer_id str
    Unique identifier of the Atlas network peer.
    project_id str
    The unique ID for the MongoDB Atlas project to create the database user.
    provider_name str

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

    AWS ONLY:

    resource_group_name str
    Name of your Azure resource group.
    route_table_cidr_block str

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    status str
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    status_name str
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    vnet_name str
    Name of your Azure VNet.
    vpc_id str
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).
    accepterRegionName String
    Specifies the AWS region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
    atlasCidrBlock String
    atlasGcpProjectId String
    The Atlas GCP Project ID for the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    atlasId String
    atlasVpcName String
    Name of the GCP VPC used by your atlas cluster that is needed to set up the reciprocal connection.
    awsAccountId String
    AWS Account ID of the owner of the peer VPC.
    azureDirectoryId String
    Unique identifier for an Azure AD directory.
    azureSubscriptionId String
    Unique identifier of the Azure subscription in which the VNet resides.
    connectionId String
    Unique identifier of the Atlas network peering container.
    containerId 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 network_container resource or it can be obtained from the cluster returned values if a cluster has been created before the first container.
    errorMessage String
    When "status" : "FAILED", Atlas provides a description of the error.
    errorState String
    Description of the Atlas error when status is Failed, Otherwise, Atlas returns null.
    errorStateName String
    Error state, if any. The VPC peering connection error state value can be one of the following: REJECTED, EXPIRED, INVALID_ARGUMENT.
    gcpProjectId String
    GCP project ID of the owner of the network peer.
    networkName String

    Name of the network peer to which Atlas connects.

    AZURE ONLY:

    peerId String
    Unique identifier of the Atlas network peer.
    projectId String
    The unique ID for the MongoDB Atlas project to create the database user.
    providerName String

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

    AWS ONLY:

    resourceGroupName String
    Name of your Azure resource group.
    routeTableCidrBlock String

    AWS VPC CIDR block or subnet.

    GCP ONLY:

    status String
    Status of the Atlas network peering connection. Azure/GCP: ADDING_PEER, AVAILABLE, FAILED, DELETING GCP Only: WAITING_FOR_USER.
    statusName String
    (AWS Only) The VPC peering connection status value can be one of the following: INITIATING, PENDING_ACCEPTANCE, FAILED, FINALIZING, AVAILABLE, TERMINATING.
    vnetName String
    Name of your Azure VNet.
    vpcId String
    Unique identifier of the AWS peer VPC (Note: this is not the same as the Atlas AWS VPC that is returned by the network_container resource).

    Import

    Network Peering Connections can be imported using project ID and network peering id, in the format PROJECTID-PEERID-PROVIDERNAME, e.g.

    $ pulumi import mongodbatlas:index/networkPeering:NetworkPeering my_peering 1112222b3bf99403840e8934-5cbf563d87d9d67253be590a-AWS
    

    Use the [MongoDB Atlas CLI][https://www.mongodb.com/docs/atlas/cli/current/command/atlas-networking-peering-list/#std-label-atlas-networking-peering-list] to obtain your project_id and peering_id. Attention gcp and azure users: The atlas networking peering list command returns only AWS peerings by default. You have to include the --provider parameter to list peerings for your cloud provider. Valid values are AWS, AZURE, or GCP.

    atlas projects list

    atlas networking peering list –projectId –provider <AZURE|GCP|AWS>

    See detailed information for arguments and attributes: MongoDB API Network Peering Connection

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

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi