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
new NetworkContainer(name: string, args: NetworkContainerArgs, opts?: CustomResourceOptions);def NetworkContainer(resource_name, opts=None, atlas_cidr_block=None, project_id=None, provider_name=None, region=None, region_name=None, __props__=None);func NewNetworkContainer(ctx *Context, name string, args NetworkContainerArgs, opts ...ResourceOption) (*NetworkContainer, error)public NetworkContainer(string name, NetworkContainerArgs args, CustomResourceOptions? opts = null)- 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:
- Atlas
Cidr stringBlock 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 string The unique ID for the project to create the database user.
- Provider
Name 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.
- Region
Name string The Atlas AWS region name for where this container will exist.
- Atlas
Cidr stringBlock 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 string The unique ID for the project to create the database user.
- Provider
Name 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.
- Region
Name string The Atlas AWS region name for where this container will exist.
- atlas
Cidr stringBlock 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 string The unique ID for the project to create the database user.
- provider
Name 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.
- region
Name string The Atlas AWS region name for where this container will exist.
- atlas_
cidr_ strblock 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:
- Azure
Subscription stringId Unique identifer of the Azure subscription in which the VNet resides.
- Container
Id string The Network Peering Container ID.
- Gcp
Project stringId Unique identifier of the GCP project in which the Network Peering connection resides.
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Name 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.
- Vnet
Name string The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.
- Vpc
Id string Unique identifier of the project’s VPC.
- Azure
Subscription stringId Unique identifer of the Azure subscription in which the VNet resides.
- Container
Id string The Network Peering Container ID.
- Gcp
Project stringId Unique identifier of the GCP project in which the Network Peering connection resides.
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Name 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.
- Vnet
Name string The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.
- Vpc
Id string Unique identifier of the project’s VPC.
- azure
Subscription stringId Unique identifer of the Azure subscription in which the VNet resides.
- container
Id string The Network Peering Container ID.
- gcp
Project stringId Unique identifier of the GCP project in which the Network Peering connection resides.
- id string
- The provider-assigned unique ID for this managed resource.
- network
Name 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.
- vnet
Name string The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.
- vpc
Id string Unique identifier of the project’s VPC.
- azure_
subscription_ strid Unique identifer of the Azure subscription in which the VNet resides.
- container_
id str The Network Peering Container ID.
- gcp_
project_ strid 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): NetworkContainerstatic 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:
- Atlas
Cidr stringBlock 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 stringId Unique identifer of the Azure subscription in which the VNet resides.
- Container
Id string The Network Peering Container ID.
- Gcp
Project stringId Unique identifier of the GCP project in which the Network Peering connection resides.
- Network
Name string Name of the Network Peering connection in the Atlas project.
- Project
Id string The unique ID for the project to create the database user.
- Provider
Name 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.
- Region
Name string The Atlas AWS region name for where this container will exist.
- Vnet
Name string The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.
- Vpc
Id string Unique identifier of the project’s VPC.
- Atlas
Cidr stringBlock 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 stringId Unique identifer of the Azure subscription in which the VNet resides.
- Container
Id string The Network Peering Container ID.
- Gcp
Project stringId Unique identifier of the GCP project in which the Network Peering connection resides.
- Network
Name string Name of the Network Peering connection in the Atlas project.
- Project
Id string The unique ID for the project to create the database user.
- Provider
Name 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.
- Region
Name string The Atlas AWS region name for where this container will exist.
- Vnet
Name string The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.
- Vpc
Id string Unique identifier of the project’s VPC.
- atlas
Cidr stringBlock 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 stringId Unique identifer of the Azure subscription in which the VNet resides.
- container
Id string The Network Peering Container ID.
- gcp
Project stringId Unique identifier of the GCP project in which the Network Peering connection resides.
- network
Name string Name of the Network Peering connection in the Atlas project.
- project
Id string The unique ID for the project to create the database user.
- provider
Name 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.
- region
Name string The Atlas AWS region name for where this container will exist.
- vnet
Name string The name of the Azure VNet. This value is null until you provision an Azure VNet in the container.
- vpc
Id string Unique identifier of the project’s VPC.
- atlas_
cidr_ strblock 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_ strid Unique identifer of the Azure subscription in which the VNet resides.
- container_
id str The Network Peering Container ID.
- gcp_
project_ strid 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
mongodbatlasTerraform Provider.