1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getProjectIpAddresses
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

mongodbatlas.getProjectIpAddresses

Explore with Pulumi AI

# Data Source: mongodbatlas.getProjectIpAddresses

mongodbatlas.getProjectIpAddresses returns the IP addresses in a project categorized by services.

Example Usage

S

import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = mongodbatlas.getProjectIpAddresses({
    projectId: projectId,
});
export const projectServices = test.then(test => test.services);
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

test = mongodbatlas.get_project_ip_addresses(project_id=project_id)
pulumi.export("projectServices", test.services)
Copy
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 {
		test, err := mongodbatlas.LookupProjectIpAddresses(ctx, &mongodbatlas.LookupProjectIpAddressesArgs{
			ProjectId: projectId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("projectServices", test.Services)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var test = Mongodbatlas.GetProjectIpAddresses.Invoke(new()
    {
        ProjectId = projectId,
    });

    return new Dictionary<string, object?>
    {
        ["projectServices"] = test.Apply(getProjectIpAddressesResult => getProjectIpAddressesResult.Services),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetProjectIpAddressesArgs;
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) {
        final var test = MongodbatlasFunctions.getProjectIpAddresses(GetProjectIpAddressesArgs.builder()
            .projectId(projectId)
            .build());

        ctx.export("projectServices", test.applyValue(getProjectIpAddressesResult -> getProjectIpAddressesResult.services()));
    }
}
Copy
variables:
  test:
    fn::invoke:
      function: mongodbatlas:getProjectIpAddresses
      arguments:
        projectId: ${projectId}
outputs:
  projectServices: ${test.services}
Copy

Using getProjectIpAddresses

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 getProjectIpAddresses(args: GetProjectIpAddressesArgs, opts?: InvokeOptions): Promise<GetProjectIpAddressesResult>
function getProjectIpAddressesOutput(args: GetProjectIpAddressesOutputArgs, opts?: InvokeOptions): Output<GetProjectIpAddressesResult>
Copy
def get_project_ip_addresses(project_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetProjectIpAddressesResult
def get_project_ip_addresses_output(project_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetProjectIpAddressesResult]
Copy
func LookupProjectIpAddresses(ctx *Context, args *LookupProjectIpAddressesArgs, opts ...InvokeOption) (*LookupProjectIpAddressesResult, error)
func LookupProjectIpAddressesOutput(ctx *Context, args *LookupProjectIpAddressesOutputArgs, opts ...InvokeOption) LookupProjectIpAddressesResultOutput
Copy

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

public static class GetProjectIpAddresses 
{
    public static Task<GetProjectIpAddressesResult> InvokeAsync(GetProjectIpAddressesArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectIpAddressesResult> Invoke(GetProjectIpAddressesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetProjectIpAddressesResult> getProjectIpAddresses(GetProjectIpAddressesArgs args, InvokeOptions options)
public static Output<GetProjectIpAddressesResult> getProjectIpAddresses(GetProjectIpAddressesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getProjectIpAddresses:getProjectIpAddresses
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project.
projectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project.
project_id This property is required. str
Unique 24-hexadecimal digit string that identifies your project.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project.

getProjectIpAddresses Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Unique 24-hexadecimal digit string that identifies your project.
Services GetProjectIpAddressesServices
List of IP addresses in a project categorized by services.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Unique 24-hexadecimal digit string that identifies your project.
Services GetProjectIpAddressesServices
List of IP addresses in a project categorized by services.
id String
The provider-assigned unique ID for this managed resource.
projectId String
Unique 24-hexadecimal digit string that identifies your project.
services GetProjectIpAddressesServices
List of IP addresses in a project categorized by services.
id string
The provider-assigned unique ID for this managed resource.
projectId string
Unique 24-hexadecimal digit string that identifies your project.
services GetProjectIpAddressesServices
List of IP addresses in a project categorized by services.
id str
The provider-assigned unique ID for this managed resource.
project_id str
Unique 24-hexadecimal digit string that identifies your project.
services GetProjectIpAddressesServices
List of IP addresses in a project categorized by services.
id String
The provider-assigned unique ID for this managed resource.
projectId String
Unique 24-hexadecimal digit string that identifies your project.
services Property Map
List of IP addresses in a project categorized by services.

Supporting Types

GetProjectIpAddressesServices

Clusters This property is required. List<GetProjectIpAddressesServicesCluster>
IP addresses of clusters.
Clusters This property is required. []GetProjectIpAddressesServicesCluster
IP addresses of clusters.
clusters This property is required. List<GetProjectIpAddressesServicesCluster>
IP addresses of clusters.
clusters This property is required. GetProjectIpAddressesServicesCluster[]
IP addresses of clusters.
clusters This property is required. Sequence[GetProjectIpAddressesServicesCluster]
IP addresses of clusters.
clusters This property is required. List<Property Map>
IP addresses of clusters.

GetProjectIpAddressesServicesCluster

ClusterName This property is required. string
Human-readable label that identifies the cluster.
FutureInbounds This property is required. List<string>
List of future inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
FutureOutbounds This property is required. List<string>
List of future outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
Inbounds This property is required. List<string>
List of inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
Outbounds This property is required. List<string>
List of outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
ClusterName This property is required. string
Human-readable label that identifies the cluster.
FutureInbounds This property is required. []string
List of future inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
FutureOutbounds This property is required. []string
List of future outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
Inbounds This property is required. []string
List of inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
Outbounds This property is required. []string
List of outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
clusterName This property is required. String
Human-readable label that identifies the cluster.
futureInbounds This property is required. List<String>
List of future inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
futureOutbounds This property is required. List<String>
List of future outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
inbounds This property is required. List<String>
List of inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
outbounds This property is required. List<String>
List of outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
clusterName This property is required. string
Human-readable label that identifies the cluster.
futureInbounds This property is required. string[]
List of future inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
futureOutbounds This property is required. string[]
List of future outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
inbounds This property is required. string[]
List of inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
outbounds This property is required. string[]
List of outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
cluster_name This property is required. str
Human-readable label that identifies the cluster.
future_inbounds This property is required. Sequence[str]
List of future inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
future_outbounds This property is required. Sequence[str]
List of future outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
inbounds This property is required. Sequence[str]
List of inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
outbounds This property is required. Sequence[str]
List of outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
clusterName This property is required. String
Human-readable label that identifies the cluster.
futureInbounds This property is required. List<String>
List of future inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
futureOutbounds This property is required. List<String>
List of future outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.
inbounds This property is required. List<String>
List of inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.
outbounds This property is required. List<String>
List of outbound IP addresses associated with the cluster. If your network allows inbound HTTP requests only from specific IP addresses, you must allow access from the following IP addresses so that your Atlas cluster can communicate with your webhooks and KMS.

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.