NetworkContainer

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.

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.

The following table outlines the maximum number of Network Peering containers per cloud provider: * Cloud Provider: GCP - Container Limit: One container per project. * Cloud Provider: AWS and Azure - Container Limit: 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.

using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Mongodbatlas.NetworkContainer("test", new Mongodbatlas.NetworkContainerArgs
        {
            AtlasCidrBlock = "10.8.0.0/21",
            ProjectId = "<YOUR-PROJECT-ID>",
            ProviderName = "AWS",
            RegionName = "US_EAST_1",
        });
    }

}

Coming soon!

import pulumi
import pulumi_mongodbatlas as mongodbatlas

test = mongodbatlas.NetworkContainer("test",
    atlas_cidr_block="10.8.0.0/21",
    project_id="<YOUR-PROJECT-ID>",
    provider_name="AWS",
    region_name="US_EAST_1")
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

using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Mongodbatlas.NetworkContainer("test", new Mongodbatlas.NetworkContainerArgs
        {
            AtlasCidrBlock = "10.8.0.0/21",
            ProjectId = "<YOUR-PROJECT-ID>",
            ProviderName = "GCP",
        });
    }

}

Coming soon!

import pulumi
import pulumi_mongodbatlas as mongodbatlas

test = mongodbatlas.NetworkContainer("test",
    atlas_cidr_block="10.8.0.0/21",
    project_id="<YOUR-PROJECT-ID>",
    provider_name="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

using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Mongodbatlas.NetworkContainer("test", new Mongodbatlas.NetworkContainerArgs
        {
            AtlasCidrBlock = "10.8.0.0/21",
            ProjectId = "<YOUR-PROJECT-ID>",
            ProviderName = "AZURE",
            Region = "US_EAST_2",
        });
    }

}

Coming soon!

import pulumi
import pulumi_mongodbatlas as mongodbatlas

test = mongodbatlas.NetworkContainer("test",
    atlas_cidr_block="10.8.0.0/21",
    project_id="<YOUR-PROJECT-ID>",
    provider_name="AZURE",
    region="US_EAST_2")
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",
});

Create a NetworkContainer Resource

def NetworkContainer(resource_name, opts=None, atlas_cidr_block=None, project_id=None, provider_name=None, region=None, region_name=None, __props__=None);
name string
The unique name of the resource.
args NetworkContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args NetworkContainerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args NetworkContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

NetworkContainer Resource Properties

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

Inputs

The NetworkContainer resource accepts the following input properties:

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.

ProjectId string

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

ProviderName string

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

Region string

The Atlas Azure region name for where this container will exist.

RegionName string

The Atlas AWS region name for where this container will exist.

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.

ProjectId string

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

ProviderName string

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

Region string

The Atlas Azure region name for where this container will exist.

RegionName string

The Atlas AWS region name for where this container will exist.

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.

projectId string

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

providerName string

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

region string

The Atlas Azure region name for where this container will exist.

regionName string

The Atlas AWS region name for where this container will exist.

atlas_cidr_block str

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.

project_id str

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

provider_name str

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

region str

The Atlas Azure region name for where this container will exist.

region_name str

The Atlas AWS region name for where this container will exist.

Outputs

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

AzureSubscriptionId string

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

ContainerId string

The Network Peering Container ID.

GcpProjectId string

Unique identifier of the GCP project in which the Network Peering connection resides.

Id string
The provider-assigned unique ID for this managed resource.
NetworkName string

Name of the Network Peering connection in the Atlas project.

Provisioned bool

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

VnetName string

The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.

VpcId string

Unique identifier of the project’s VPC.

AzureSubscriptionId string

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

ContainerId string

The Network Peering Container ID.

GcpProjectId string

Unique identifier of the GCP project in which the Network Peering connection resides.

Id string
The provider-assigned unique ID for this managed resource.
NetworkName string

Name of the Network Peering connection in the Atlas project.

Provisioned bool

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

VnetName string

The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.

VpcId string

Unique identifier of the project’s VPC.

azureSubscriptionId string

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

containerId string

The Network Peering Container ID.

gcpProjectId string

Unique identifier of the GCP project in which the Network Peering connection resides.

id string
The provider-assigned unique ID for this managed resource.
networkName string

Name of the Network Peering connection in the Atlas project.

provisioned boolean

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

vnetName string

The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.

vpcId string

Unique identifier of the project’s VPC.

azure_subscription_id str

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

container_id str

The Network Peering Container ID.

gcp_project_id str

Unique identifier of the GCP project in which the Network Peering connection resides.

id str
The provider-assigned unique ID for this managed resource.
network_name str

Name of the Network Peering connection in the Atlas project.

provisioned bool

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

vnet_name str

The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.

vpc_id str

Unique identifier of the project’s VPC.

Look up an Existing NetworkContainer Resource

Get an existing NetworkContainer 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?: NetworkContainerState, opts?: CustomResourceOptions): NetworkContainer
static get(resource_name, id, opts=None, atlas_cidr_block=None, azure_subscription_id=None, container_id=None, gcp_project_id=None, network_name=None, project_id=None, provider_name=None, provisioned=None, region=None, region_name=None, vnet_name=None, vpc_id=None, __props__=None);
func GetNetworkContainer(ctx *Context, name string, id IDInput, state *NetworkContainerState, opts ...ResourceOption) (*NetworkContainer, error)
public static NetworkContainer Get(string name, Input<string> id, NetworkContainerState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

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.

AzureSubscriptionId string

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

ContainerId string

The Network Peering Container ID.

GcpProjectId string

Unique identifier of the GCP project in which the Network Peering connection resides.

NetworkName string

Name of the Network Peering connection in the Atlas project.

ProjectId string

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

ProviderName string

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

Provisioned bool

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

Region string

The Atlas Azure region name for where this container will exist.

RegionName string

The Atlas AWS region name for where this container will exist.

VnetName string

The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.

VpcId string

Unique identifier of the project’s VPC.

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.

AzureSubscriptionId string

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

ContainerId string

The Network Peering Container ID.

GcpProjectId string

Unique identifier of the GCP project in which the Network Peering connection resides.

NetworkName string

Name of the Network Peering connection in the Atlas project.

ProjectId string

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

ProviderName string

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

Provisioned bool

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

Region string

The Atlas Azure region name for where this container will exist.

RegionName string

The Atlas AWS region name for where this container will exist.

VnetName string

The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.

VpcId string

Unique identifier of the project’s VPC.

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.

azureSubscriptionId string

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

containerId string

The Network Peering Container ID.

gcpProjectId string

Unique identifier of the GCP project in which the Network Peering connection resides.

networkName string

Name of the Network Peering connection in the Atlas project.

projectId string

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

providerName string

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

provisioned boolean

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

region string

The Atlas Azure region name for where this container will exist.

regionName string

The Atlas AWS region name for where this container will exist.

vnetName string

The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.

vpcId string

Unique identifier of the project’s VPC.

atlas_cidr_block str

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.

azure_subscription_id str

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

container_id str

The Network Peering Container ID.

gcp_project_id str

Unique identifier of the GCP project in which the Network Peering connection resides.

network_name str

Name of the Network Peering connection in the Atlas project.

project_id str

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

provider_name str

Cloud provider for this Network Peering connection. If omitted, Atlas sets this parameter to AWS.

provisioned bool

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

region str

The Atlas Azure region name for where this container will exist.

region_name str

The Atlas AWS region name for where this container will exist.

vnet_name str

The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.

vpc_id str

Unique identifier of the project’s VPC.

Package Details

Repository
https://github.com/pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.