MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi
mongodbatlas.getNetworkPeering
Explore with Pulumi AI
mongodbatlas.NetworkPeering
describes a Network Peering Connection.
NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.
NOTE: If you need to get an existing container ID see the How-To Guide.
Example Usage
Basic Example (AWS).
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testNetworkPeering = new mongodbatlas.NetworkPeering("test", {
accepterRegionName: "us-east-1",
projectId: "<YOUR-PROJEC-ID>",
containerId: "507f1f77bcf86cd799439011",
providerName: "AWS",
routeTableCidrBlock: "192.168.0.0/24",
vpcId: "vpc-abc123abc123",
awsAccountId: "abc123abc123",
});
const test = mongodbatlas.getNetworkPeeringOutput({
projectId: testNetworkPeering.projectId,
peeringId: testNetworkPeering.id,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_network_peering = mongodbatlas.NetworkPeering("test",
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 = mongodbatlas.get_network_peering_output(project_id=test_network_peering.project_id,
peering_id=test_network_peering.id)
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, "test", &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
}
_ = mongodbatlas.LookupNetworkPeeringOutput(ctx, mongodbatlas.GetNetworkPeeringOutputArgs{
ProjectId: testNetworkPeering.ProjectId,
PeeringId: testNetworkPeering.ID(),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testNetworkPeering = new Mongodbatlas.NetworkPeering("test", new()
{
AccepterRegionName = "us-east-1",
ProjectId = "<YOUR-PROJEC-ID>",
ContainerId = "507f1f77bcf86cd799439011",
ProviderName = "AWS",
RouteTableCidrBlock = "192.168.0.0/24",
VpcId = "vpc-abc123abc123",
AwsAccountId = "abc123abc123",
});
var test = Mongodbatlas.GetNetworkPeering.Invoke(new()
{
ProjectId = testNetworkPeering.ProjectId,
PeeringId = testNetworkPeering.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.NetworkPeering;
import com.pulumi.mongodbatlas.NetworkPeeringArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetNetworkPeeringArgs;
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) {
var testNetworkPeering = new NetworkPeering("testNetworkPeering", NetworkPeeringArgs.builder()
.accepterRegionName("us-east-1")
.projectId("<YOUR-PROJEC-ID>")
.containerId("507f1f77bcf86cd799439011")
.providerName("AWS")
.routeTableCidrBlock("192.168.0.0/24")
.vpcId("vpc-abc123abc123")
.awsAccountId("abc123abc123")
.build());
final var test = MongodbatlasFunctions.getNetworkPeering(GetNetworkPeeringArgs.builder()
.projectId(testNetworkPeering.projectId())
.peeringId(testNetworkPeering.id())
.build());
}
}
resources:
testNetworkPeering:
type: mongodbatlas:NetworkPeering
name: test
properties:
accepterRegionName: us-east-1
projectId: <YOUR-PROJEC-ID>
containerId: 507f1f77bcf86cd799439011
providerName: AWS
routeTableCidrBlock: 192.168.0.0/24
vpcId: vpc-abc123abc123
awsAccountId: abc123abc123
variables:
test:
fn::invoke:
Function: mongodbatlas:getNetworkPeering
Arguments:
projectId: ${testNetworkPeering.projectId}
peeringId: ${testNetworkPeering.id}
Using getNetworkPeering
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 getNetworkPeering(args: GetNetworkPeeringArgs, opts?: InvokeOptions): Promise<GetNetworkPeeringResult>
function getNetworkPeeringOutput(args: GetNetworkPeeringOutputArgs, opts?: InvokeOptions): Output<GetNetworkPeeringResult>
def get_network_peering(peering_id: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworkPeeringResult
def get_network_peering_output(peering_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworkPeeringResult]
func LookupNetworkPeering(ctx *Context, args *LookupNetworkPeeringArgs, opts ...InvokeOption) (*LookupNetworkPeeringResult, error)
func LookupNetworkPeeringOutput(ctx *Context, args *LookupNetworkPeeringOutputArgs, opts ...InvokeOption) LookupNetworkPeeringResultOutput
> Note: This function is named LookupNetworkPeering
in the Go SDK.
public static class GetNetworkPeering
{
public static Task<GetNetworkPeeringResult> InvokeAsync(GetNetworkPeeringArgs args, InvokeOptions? opts = null)
public static Output<GetNetworkPeeringResult> Invoke(GetNetworkPeeringInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkPeeringResult> getNetworkPeering(GetNetworkPeeringArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: mongodbatlas:index/getNetworkPeering:getNetworkPeering
arguments:
# arguments dictionary
The following arguments are supported:
- peering_
id str - Atlas assigned unique ID for the peering connection.
- project_
id str - The unique ID for the project to create the database user.
getNetworkPeering Result
The following output properties are available:
- Accepter
Region stringName - Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
- Atlas
Cidr stringBlock - Atlas
Id string - Aws
Account stringId - Account ID of the owner of the peer VPC.
- Azure
Directory stringId - Unique identifier for an Azure AD directory.
- Azure
Subscription stringId - Unique identifer of the Azure subscription in which the VNet resides.
- Connection
Id string - Unique identifier for the peering connection.
- Container
Id string - Error
Message string - When
"status" : "FAILED"
, Atlas provides a description of the error. - Error
State string - Description of the Atlas error when
status
isFailed
, Otherwise, Atlas returnsnull
. - Error
State stringName - Error state, if any. The VPC peering connection error state value can be one of the following:
REJECTED
,EXPIRED
,INVALID_ARGUMENT
. - Gcp
Project stringId - GCP project ID of the owner of the network peer.
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Name string - Name of the network peer to which Atlas connects.
- Peering
Id string - Project
Id string - Provider
Name string - Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values
AWS
,AZURE
,GCP
). - Resource
Group stringName - Name of your Azure resource group.
- Route
Table stringCidr Block - Peer VPC CIDR block or subnet.
- Status string
- Status of the Atlas network peering connection:
ADDING_PEER
,AVAILABLE
,FAILED
,DELETING
,WAITING_FOR_USER
. - Status
Name string - The VPC peering connection status value can be one of the following:
INITIATING
,PENDING_ACCEPTANCE
,FAILED
,FINALIZING
,AVAILABLE
,TERMINATING
. - Vnet
Name string - Name of your Azure VNet.
- Vpc
Id string - Unique identifier of the peer VPC.
- Accepter
Region stringName - Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
- Atlas
Cidr stringBlock - Atlas
Id string - Aws
Account stringId - Account ID of the owner of the peer VPC.
- Azure
Directory stringId - Unique identifier for an Azure AD directory.
- Azure
Subscription stringId - Unique identifer of the Azure subscription in which the VNet resides.
- Connection
Id string - Unique identifier for the peering connection.
- Container
Id string - Error
Message string - When
"status" : "FAILED"
, Atlas provides a description of the error. - Error
State string - Description of the Atlas error when
status
isFailed
, Otherwise, Atlas returnsnull
. - Error
State stringName - Error state, if any. The VPC peering connection error state value can be one of the following:
REJECTED
,EXPIRED
,INVALID_ARGUMENT
. - Gcp
Project stringId - GCP project ID of the owner of the network peer.
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Name string - Name of the network peer to which Atlas connects.
- Peering
Id string - Project
Id string - Provider
Name string - Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values
AWS
,AZURE
,GCP
). - Resource
Group stringName - Name of your Azure resource group.
- Route
Table stringCidr Block - Peer VPC CIDR block or subnet.
- Status string
- Status of the Atlas network peering connection:
ADDING_PEER
,AVAILABLE
,FAILED
,DELETING
,WAITING_FOR_USER
. - Status
Name string - The VPC peering connection status value can be one of the following:
INITIATING
,PENDING_ACCEPTANCE
,FAILED
,FINALIZING
,AVAILABLE
,TERMINATING
. - Vnet
Name string - Name of your Azure VNet.
- Vpc
Id string - Unique identifier of the peer VPC.
- accepter
Region StringName - Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
- atlas
Cidr StringBlock - atlas
Id String - aws
Account StringId - Account ID of the owner of the peer VPC.
- azure
Directory StringId - Unique identifier for an Azure AD directory.
- azure
Subscription StringId - Unique identifer of the Azure subscription in which the VNet resides.
- connection
Id String - Unique identifier for the peering connection.
- container
Id String - error
Message String - When
"status" : "FAILED"
, Atlas provides a description of the error. - error
State String - Description of the Atlas error when
status
isFailed
, Otherwise, Atlas returnsnull
. - error
State StringName - Error state, if any. The VPC peering connection error state value can be one of the following:
REJECTED
,EXPIRED
,INVALID_ARGUMENT
. - gcp
Project StringId - GCP project ID of the owner of the network peer.
- id String
- The provider-assigned unique ID for this managed resource.
- network
Name String - Name of the network peer to which Atlas connects.
- peering
Id String - project
Id String - provider
Name String - Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values
AWS
,AZURE
,GCP
). - resource
Group StringName - Name of your Azure resource group.
- route
Table StringCidr Block - Peer VPC CIDR block or subnet.
- status String
- Status of the Atlas network peering connection:
ADDING_PEER
,AVAILABLE
,FAILED
,DELETING
,WAITING_FOR_USER
. - status
Name String - The VPC peering connection status value can be one of the following:
INITIATING
,PENDING_ACCEPTANCE
,FAILED
,FINALIZING
,AVAILABLE
,TERMINATING
. - vnet
Name String - Name of your Azure VNet.
- vpc
Id String - Unique identifier of the peer VPC.
- accepter
Region stringName - Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
- atlas
Cidr stringBlock - atlas
Id string - aws
Account stringId - Account ID of the owner of the peer VPC.
- azure
Directory stringId - Unique identifier for an Azure AD directory.
- azure
Subscription stringId - Unique identifer of the Azure subscription in which the VNet resides.
- connection
Id string - Unique identifier for the peering connection.
- container
Id string - error
Message string - When
"status" : "FAILED"
, Atlas provides a description of the error. - error
State string - Description of the Atlas error when
status
isFailed
, Otherwise, Atlas returnsnull
. - error
State stringName - Error state, if any. The VPC peering connection error state value can be one of the following:
REJECTED
,EXPIRED
,INVALID_ARGUMENT
. - gcp
Project stringId - GCP project ID of the owner of the network peer.
- id string
- The provider-assigned unique ID for this managed resource.
- network
Name string - Name of the network peer to which Atlas connects.
- peering
Id string - project
Id string - provider
Name string - Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values
AWS
,AZURE
,GCP
). - resource
Group stringName - Name of your Azure resource group.
- route
Table stringCidr Block - Peer VPC CIDR block or subnet.
- status string
- Status of the Atlas network peering connection:
ADDING_PEER
,AVAILABLE
,FAILED
,DELETING
,WAITING_FOR_USER
. - status
Name string - The VPC peering connection status value can be one of the following:
INITIATING
,PENDING_ACCEPTANCE
,FAILED
,FINALIZING
,AVAILABLE
,TERMINATING
. - vnet
Name string - Name of your Azure VNet.
- vpc
Id string - Unique identifier of the peer VPC.
- accepter_
region_ strname - Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
- atlas_
cidr_ strblock - atlas_
id str - aws_
account_ strid - Account ID of the owner of the peer VPC.
- azure_
directory_ strid - Unique identifier for an Azure AD directory.
- azure_
subscription_ strid - 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
isFailed
, Otherwise, Atlas returnsnull
. - error_
state_ strname - Error state, if any. The VPC peering connection error state value can be one of the following:
REJECTED
,EXPIRED
,INVALID_ARGUMENT
. - gcp_
project_ strid - GCP project ID of the owner of the network peer.
- id str
- The provider-assigned unique ID for this managed resource.
- network_
name str - Name of the network peer to which Atlas connects.
- peering_
id str - project_
id str - 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_ strname - Name of your Azure resource group.
- route_
table_ strcidr_ block - 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.
- accepter
Region StringName - Specifies the region where the peer VPC resides. For complete lists of supported regions, see Amazon Web Services.
- atlas
Cidr StringBlock - atlas
Id String - aws
Account StringId - Account ID of the owner of the peer VPC.
- azure
Directory StringId - Unique identifier for an Azure AD directory.
- azure
Subscription StringId - Unique identifer of the Azure subscription in which the VNet resides.
- connection
Id String - Unique identifier for the peering connection.
- container
Id String - error
Message String - When
"status" : "FAILED"
, Atlas provides a description of the error. - error
State String - Description of the Atlas error when
status
isFailed
, Otherwise, Atlas returnsnull
. - error
State StringName - Error state, if any. The VPC peering connection error state value can be one of the following:
REJECTED
,EXPIRED
,INVALID_ARGUMENT
. - gcp
Project StringId - GCP project ID of the owner of the network peer.
- id String
- The provider-assigned unique ID for this managed resource.
- network
Name String - Name of the network peer to which Atlas connects.
- peering
Id String - project
Id String - provider
Name String - Cloud provider for this VPC peering connection. If omitted, Atlas sets this parameter to AWS. (Possible Values
AWS
,AZURE
,GCP
). - resource
Group StringName - Name of your Azure resource group.
- route
Table StringCidr Block - Peer VPC CIDR block or subnet.
- status String
- Status of the Atlas network peering connection:
ADDING_PEER
,AVAILABLE
,FAILED
,DELETING
,WAITING_FOR_USER
. - status
Name String - The VPC peering connection status value can be one of the following:
INITIATING
,PENDING_ACCEPTANCE
,FAILED
,FINALIZING
,AVAILABLE
,TERMINATING
. - vnet
Name String - Name of your Azure VNet.
- vpc
Id String - Unique identifier of the peer VPC.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.