Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

MongoDB Atlas

v3.0.1 published on Monday, Nov 1, 2021 by Pulumi

getNetworkPeerings

mongodbatlas.getNetworkPeerings describes all Network Peering Connections.

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

Example Usage

Basic Example (AWS).

using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

class MyStack : Stack
{
    public MyStack()
    {
        var testNetworkPeering = new Mongodbatlas.NetworkPeering("testNetworkPeering", new Mongodbatlas.NetworkPeeringArgs
        {
            AccepterRegionName = "us-east-1",
            ProjectId = "<YOUR-PROJEC-ID>",
            ContainerId = "507f1f77bcf86cd799439011",
            ProviderName = "AWS",
            RouteTableCidrBlock = "192.168.0.0/24",
            VpcId = "vpc-abc123abc123",
            AwsAccountId = "abc123abc123",
        });
        var testNetworkPeerings = testNetworkPeering.ProjectId.Apply(projectId => Mongodbatlas.GetNetworkPeerings.InvokeAsync(new Mongodbatlas.GetNetworkPeeringsArgs
        {
            ProjectId = projectId,
        }));
    }

}
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 {
		testNetworkPeering, err := mongodbatlas.NewNetworkPeering(ctx, "testNetworkPeering", &mongodbatlas.NetworkPeeringArgs{
			AccepterRegionName:  pulumi.String("us-east-1"),
			ProjectId:           pulumi.String("<YOUR-PROJEC-ID>"),
			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
		}
		return nil
	})
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas

test_network_peering = mongodbatlas.NetworkPeering("testNetworkPeering",
    accepter_region_name="us-east-1",
    project_id="<YOUR-PROJEC-ID>",
    container_id="507f1f77bcf86cd799439011",
    provider_name="AWS",
    route_table_cidr_block="192.168.0.0/24",
    vpc_id="vpc-abc123abc123",
    aws_account_id="abc123abc123")
test_network_peerings = test_network_peering.project_id.apply(lambda project_id: mongodbatlas.get_network_peerings(project_id=project_id))
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

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

Using getNetworkPeerings

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetworkPeerings(args: GetNetworkPeeringsArgs, opts?: InvokeOptions): Promise<GetNetworkPeeringsResult>
function getNetworkPeeringsOutput(args: GetNetworkPeeringsOutputArgs, opts?: InvokeOptions): Output<GetNetworkPeeringsResult>
def get_network_peerings(project_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetNetworkPeeringsResult
def get_network_peerings_output(project_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetNetworkPeeringsResult]
func GetNetworkPeerings(ctx *Context, args *GetNetworkPeeringsArgs, opts ...InvokeOption) (*GetNetworkPeeringsResult, error)
func GetNetworkPeeringsOutput(ctx *Context, args *GetNetworkPeeringsOutputArgs, opts ...InvokeOption) GetNetworkPeeringsResultOutput

> Note: This function is named GetNetworkPeerings in the Go SDK.

public static class GetNetworkPeerings 
{
    public static Task<GetNetworkPeeringsResult> InvokeAsync(GetNetworkPeeringsArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkPeeringsResult> Invoke(GetNetworkPeeringsInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ProjectId string
The unique ID for the project to create the database user.
ProjectId string
The unique ID for the project to create the database user.
projectId string
The unique ID for the project to create the database user.
project_id str
The unique ID for the project to create the database user.

getNetworkPeerings Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Results List<GetNetworkPeeringsResult>
A list where each represents a Network Peering Connection.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Results []GetNetworkPeeringsResult
A list where each represents a Network Peering Connection.
id string
The provider-assigned unique ID for this managed resource.
projectId string
results GetNetworkPeeringsResult[]
A list where each represents a Network Peering Connection.
id str
The provider-assigned unique ID for this managed resource.
project_id str
results Sequence[GetNetworkPeeringsResult]
A list where each represents a Network Peering Connection.

Supporting Types

GetNetworkPeeringsResult

AccepterRegionName string
Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
AtlasCidrBlock string
AwsAccountId string
Account ID of the owner of the peer VPC.
AzureDirectoryId string
Unique identifier for an Azure AD directory.
AzureSubscriptionId string
Unique identifer of the Azure subscription in which the VNet resides.
ConnectionId string
Unique identifier for the peering connection.
ContainerId string
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.
PeeringId string
Atlas assigned unique ID for the peering connection.
ProviderName string
Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values AWS, AZURE, GCP).
ResourceGroupName string
Name of your Azure resource group.
RouteTableCidrBlock string
Peer VPC CIDR block or subnet.
Status string
Status of the Atlas network peering connection: ADDING_PEER, AVAILABLE, FAILED, DELETING, WAITING_FOR_USER.
StatusName string
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 peer VPC.
AccepterRegionName string
Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
AtlasCidrBlock string
AwsAccountId string
Account ID of the owner of the peer VPC.
AzureDirectoryId string
Unique identifier for an Azure AD directory.
AzureSubscriptionId string
Unique identifer of the Azure subscription in which the VNet resides.
ConnectionId string
Unique identifier for the peering connection.
ContainerId string
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.
PeeringId string
Atlas assigned unique ID for the peering connection.
ProviderName string
Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values AWS, AZURE, GCP).
ResourceGroupName string
Name of your Azure resource group.
RouteTableCidrBlock string
Peer VPC CIDR block or subnet.
Status string
Status of the Atlas network peering connection: ADDING_PEER, AVAILABLE, FAILED, DELETING, WAITING_FOR_USER.
StatusName string
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 peer VPC.
accepterRegionName string
Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
atlasCidrBlock string
awsAccountId string
Account ID of the owner of the peer VPC.
azureDirectoryId string
Unique identifier for an Azure AD directory.
azureSubscriptionId string
Unique identifer of the Azure subscription in which the VNet resides.
connectionId string
Unique identifier for the peering connection.
containerId string
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.
peeringId string
Atlas assigned unique ID for the peering connection.
providerName string
Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values AWS, AZURE, GCP).
resourceGroupName string
Name of your Azure resource group.
routeTableCidrBlock string
Peer VPC CIDR block or subnet.
status string
Status of the Atlas network peering connection: ADDING_PEER, AVAILABLE, FAILED, DELETING, WAITING_FOR_USER.
statusName string
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 peer VPC.
accepter_region_name str
Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
atlas_cidr_block str
aws_account_id str
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 identifer of the Azure subscription in which the VNet resides.
connection_id str
Unique identifier for the peering connection.
container_id str
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.
peering_id str
Atlas assigned unique ID for the peering connection.
provider_name str
Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values AWS, AZURE, GCP).
resource_group_name str
Name of your Azure resource group.
route_table_cidr_block str
Peer VPC CIDR block or subnet.
status str
Status of the Atlas network peering connection: ADDING_PEER, AVAILABLE, FAILED, DELETING, WAITING_FOR_USER.
status_name str
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 peer 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.