mongodbatlas logo
MongoDB Atlas v3.7.2, Mar 31 23

mongodbatlas.PrivateIpMode

Explore with Pulumi AI

mongodbatlas.PrivateIpMode provides a Private IP Mode resource. This allows one to disable Connect via Peering Only mode for a MongoDB Atlas Project.

Deprecated Feature:
This feature has been deprecated. Use Split Horizon connection strings to connect to your cluster. These connection strings allow you to connect using both VPC/VNet Peering and whitelisted public IP addresses. To learn more about support for Split Horizon, see this FAQ. You need this endpoint to disable Peering Only.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var myPrivateIpMode = new Mongodbatlas.PrivateIpMode("myPrivateIpMode", new()
    {
        Enabled = false,
        ProjectId = "<YOUR PROJECT 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 {
		_, err := mongodbatlas.NewPrivateIpMode(ctx, "myPrivateIpMode", &mongodbatlas.PrivateIpModeArgs{
			Enabled:   pulumi.Bool(false),
			ProjectId: pulumi.String("<YOUR PROJECT ID>"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.PrivateIpMode;
import com.pulumi.mongodbatlas.PrivateIpModeArgs;
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 myPrivateIpMode = new PrivateIpMode("myPrivateIpMode", PrivateIpModeArgs.builder()        
            .enabled(false)
            .projectId("<YOUR PROJECT ID>")
            .build());

    }
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas

my_private_ip_mode = mongodbatlas.PrivateIpMode("myPrivateIpMode",
    enabled=False,
    project_id="<YOUR PROJECT ID>")
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const myPrivateIpMode = new mongodbatlas.PrivateIpMode("myPrivateIpMode", {
    enabled: false,
    projectId: "<YOUR PROJECT ID>",
});
resources:
  myPrivateIpMode:
    type: mongodbatlas:PrivateIpMode
    properties:
      enabled: false
      projectId: <YOUR PROJECT ID>

Create PrivateIpMode Resource

new PrivateIpMode(name: string, args: PrivateIpModeArgs, opts?: CustomResourceOptions);
@overload
def PrivateIpMode(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  enabled: Optional[bool] = None,
                  project_id: Optional[str] = None)
@overload
def PrivateIpMode(resource_name: str,
                  args: PrivateIpModeArgs,
                  opts: Optional[ResourceOptions] = None)
func NewPrivateIpMode(ctx *Context, name string, args PrivateIpModeArgs, opts ...ResourceOption) (*PrivateIpMode, error)
public PrivateIpMode(string name, PrivateIpModeArgs args, CustomResourceOptions? opts = null)
public PrivateIpMode(String name, PrivateIpModeArgs args)
public PrivateIpMode(String name, PrivateIpModeArgs args, CustomResourceOptions options)
type: mongodbatlas:PrivateIpMode
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args PrivateIpModeArgs
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 PrivateIpModeArgs
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 PrivateIpModeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PrivateIpModeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args PrivateIpModeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

PrivateIpMode 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 PrivateIpMode resource accepts the following input properties:

Enabled bool

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

ProjectId string

The unique ID for the project to enable Only Private IP Mode.

Enabled bool

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

ProjectId string

The unique ID for the project to enable Only Private IP Mode.

enabled Boolean

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

projectId String

The unique ID for the project to enable Only Private IP Mode.

enabled boolean

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

projectId string

The unique ID for the project to enable Only Private IP Mode.

enabled bool

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

project_id str

The unique ID for the project to enable Only Private IP Mode.

enabled Boolean

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

projectId String

The unique ID for the project to enable Only Private IP Mode.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing PrivateIpMode Resource

Get an existing PrivateIpMode 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?: PrivateIpModeState, opts?: CustomResourceOptions): PrivateIpMode
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        project_id: Optional[str] = None) -> PrivateIpMode
func GetPrivateIpMode(ctx *Context, name string, id IDInput, state *PrivateIpModeState, opts ...ResourceOption) (*PrivateIpMode, error)
public static PrivateIpMode Get(string name, Input<string> id, PrivateIpModeState? state, CustomResourceOptions? opts = null)
public static PrivateIpMode get(String name, Output<String> id, PrivateIpModeState 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:
Enabled bool

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

ProjectId string

The unique ID for the project to enable Only Private IP Mode.

Enabled bool

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

ProjectId string

The unique ID for the project to enable Only Private IP Mode.

enabled Boolean

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

projectId String

The unique ID for the project to enable Only Private IP Mode.

enabled boolean

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

projectId string

The unique ID for the project to enable Only Private IP Mode.

enabled bool

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

project_id str

The unique ID for the project to enable Only Private IP Mode.

enabled Boolean

Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project

projectId String

The unique ID for the project to enable Only Private IP Mode.

Import

Project must be imported using project ID, e.g.

 $ pulumi import mongodbatlas:index/privateIpMode:PrivateIpMode my_private_ip_mode 5d09d6a59ccf6445652a444a

For more information seeMongoDB Atlas API Reference.

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes

This Pulumi package is based on the mongodbatlas Terraform Provider.