1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getProjectIpAccessLists
MongoDB Atlas v4.3.0 published on Thursday, Feb 5, 2026 by Pulumi
mongodbatlas logo
MongoDB Atlas v4.3.0 published on Thursday, Feb 5, 2026 by Pulumi

    mongodbatlas.getProjectIpAccessLists returns all IP Access List entries for a project. The access list grants access from IPs, CIDRs or AWS Security Groups (if VPC Peering is enabled) to clusters within the Project.

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const ip = new mongodbatlas.ProjectIpAccessList("ip", {
        projectId: projectId,
        ipAddress: "2.3.4.5",
        comment: "ip address test",
    });
    const cidr = new mongodbatlas.ProjectIpAccessList("cidr", {
        projectId: projectId,
        cidrBlock: "1.2.3.4/32",
        comment: "cidr block test",
    });
    const _this = mongodbatlas.getProjectIpAccessLists({
        projectId: projectId,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    ip = mongodbatlas.ProjectIpAccessList("ip",
        project_id=project_id,
        ip_address="2.3.4.5",
        comment="ip address test")
    cidr = mongodbatlas.ProjectIpAccessList("cidr",
        project_id=project_id,
        cidr_block="1.2.3.4/32",
        comment="cidr block test")
    this = mongodbatlas.get_project_ip_access_lists(project_id=project_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewProjectIpAccessList(ctx, "ip", &mongodbatlas.ProjectIpAccessListArgs{
    			ProjectId: pulumi.Any(projectId),
    			IpAddress: pulumi.String("2.3.4.5"),
    			Comment:   pulumi.String("ip address test"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mongodbatlas.NewProjectIpAccessList(ctx, "cidr", &mongodbatlas.ProjectIpAccessListArgs{
    			ProjectId: pulumi.Any(projectId),
    			CidrBlock: pulumi.String("1.2.3.4/32"),
    			Comment:   pulumi.String("cidr block test"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mongodbatlas.LookupProjectIpAccessLists(ctx, &mongodbatlas.LookupProjectIpAccessListsArgs{
    			ProjectId: projectId,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var ip = new Mongodbatlas.ProjectIpAccessList("ip", new()
        {
            ProjectId = projectId,
            IpAddress = "2.3.4.5",
            Comment = "ip address test",
        });
    
        var cidr = new Mongodbatlas.ProjectIpAccessList("cidr", new()
        {
            ProjectId = projectId,
            CidrBlock = "1.2.3.4/32",
            Comment = "cidr block test",
        });
    
        var @this = Mongodbatlas.GetProjectIpAccessLists.Invoke(new()
        {
            ProjectId = projectId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.ProjectIpAccessList;
    import com.pulumi.mongodbatlas.ProjectIpAccessListArgs;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetProjectIpAccessListsArgs;
    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 ip = new ProjectIpAccessList("ip", ProjectIpAccessListArgs.builder()
                .projectId(projectId)
                .ipAddress("2.3.4.5")
                .comment("ip address test")
                .build());
    
            var cidr = new ProjectIpAccessList("cidr", ProjectIpAccessListArgs.builder()
                .projectId(projectId)
                .cidrBlock("1.2.3.4/32")
                .comment("cidr block test")
                .build());
    
            final var this = MongodbatlasFunctions.getProjectIpAccessLists(GetProjectIpAccessListsArgs.builder()
                .projectId(projectId)
                .build());
    
        }
    }
    
    resources:
      ip:
        type: mongodbatlas:ProjectIpAccessList
        properties:
          projectId: ${projectId}
          ipAddress: 2.3.4.5
          comment: ip address test
      cidr:
        type: mongodbatlas:ProjectIpAccessList
        properties:
          projectId: ${projectId}
          cidrBlock: 1.2.3.4/32
          comment: cidr block test
    variables:
      this:
        fn::invoke:
          function: mongodbatlas:getProjectIpAccessLists
          arguments:
            projectId: ${projectId}
    

    Using getProjectIpAccessLists

    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 getProjectIpAccessLists(args: GetProjectIpAccessListsArgs, opts?: InvokeOptions): Promise<GetProjectIpAccessListsResult>
    function getProjectIpAccessListsOutput(args: GetProjectIpAccessListsOutputArgs, opts?: InvokeOptions): Output<GetProjectIpAccessListsResult>
    def get_project_ip_access_lists(project_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetProjectIpAccessListsResult
    def get_project_ip_access_lists_output(project_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetProjectIpAccessListsResult]
    func LookupProjectIpAccessLists(ctx *Context, args *LookupProjectIpAccessListsArgs, opts ...InvokeOption) (*LookupProjectIpAccessListsResult, error)
    func LookupProjectIpAccessListsOutput(ctx *Context, args *LookupProjectIpAccessListsOutputArgs, opts ...InvokeOption) LookupProjectIpAccessListsResultOutput

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

    public static class GetProjectIpAccessLists 
    {
        public static Task<GetProjectIpAccessListsResult> InvokeAsync(GetProjectIpAccessListsArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectIpAccessListsResult> Invoke(GetProjectIpAccessListsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectIpAccessListsResult> getProjectIpAccessLists(GetProjectIpAccessListsArgs args, InvokeOptions options)
    public static Output<GetProjectIpAccessListsResult> getProjectIpAccessLists(GetProjectIpAccessListsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: mongodbatlas:index/getProjectIpAccessLists:getProjectIpAccessLists
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getProjectIpAccessLists 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.
    Results List<GetProjectIpAccessListsResult>
    List of returned documents that MongoDB Cloud provides when completing this request.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Results []GetProjectIpAccessListsResult
    List of returned documents that MongoDB Cloud provides when completing this request.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    results List<GetProjectIpAccessListsResult>
    List of returned documents that MongoDB Cloud provides when completing this request.
    id string
    The provider-assigned unique ID for this managed resource.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project.
    results GetProjectIpAccessListsResult[]
    List of returned documents that MongoDB Cloud provides when completing this request.
    id str
    The provider-assigned unique ID for this managed resource.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project.
    results Sequence[GetProjectIpAccessListsResult]
    List of returned documents that MongoDB Cloud provides when completing this request.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    results List<Property Map>
    List of returned documents that MongoDB Cloud provides when completing this request.

    Supporting Types

    GetProjectIpAccessListsResult

    AwsSecurityGroup string
    Unique identifier of the AWS security group to add to the access list. Mutually exclusive with cidr_block and ip_address.
    CidrBlock string
    Range of IP addresses in CIDR notation to be added to the access list. Mutually exclusive with aws_security_group and ip_address.
    Comment string
    Remark that explains the purpose or scope of this IP access list entry.
    IpAddress string
    Single IP address to be added to the access list. Mutually exclusive with cidr_block and aws_security_group.
    AwsSecurityGroup string
    Unique identifier of the AWS security group to add to the access list. Mutually exclusive with cidr_block and ip_address.
    CidrBlock string
    Range of IP addresses in CIDR notation to be added to the access list. Mutually exclusive with aws_security_group and ip_address.
    Comment string
    Remark that explains the purpose or scope of this IP access list entry.
    IpAddress string
    Single IP address to be added to the access list. Mutually exclusive with cidr_block and aws_security_group.
    awsSecurityGroup String
    Unique identifier of the AWS security group to add to the access list. Mutually exclusive with cidr_block and ip_address.
    cidrBlock String
    Range of IP addresses in CIDR notation to be added to the access list. Mutually exclusive with aws_security_group and ip_address.
    comment String
    Remark that explains the purpose or scope of this IP access list entry.
    ipAddress String
    Single IP address to be added to the access list. Mutually exclusive with cidr_block and aws_security_group.
    awsSecurityGroup string
    Unique identifier of the AWS security group to add to the access list. Mutually exclusive with cidr_block and ip_address.
    cidrBlock string
    Range of IP addresses in CIDR notation to be added to the access list. Mutually exclusive with aws_security_group and ip_address.
    comment string
    Remark that explains the purpose or scope of this IP access list entry.
    ipAddress string
    Single IP address to be added to the access list. Mutually exclusive with cidr_block and aws_security_group.
    aws_security_group str
    Unique identifier of the AWS security group to add to the access list. Mutually exclusive with cidr_block and ip_address.
    cidr_block str
    Range of IP addresses in CIDR notation to be added to the access list. Mutually exclusive with aws_security_group and ip_address.
    comment str
    Remark that explains the purpose or scope of this IP access list entry.
    ip_address str
    Single IP address to be added to the access list. Mutually exclusive with cidr_block and aws_security_group.
    awsSecurityGroup String
    Unique identifier of the AWS security group to add to the access list. Mutually exclusive with cidr_block and ip_address.
    cidrBlock String
    Range of IP addresses in CIDR notation to be added to the access list. Mutually exclusive with aws_security_group and ip_address.
    comment String
    Remark that explains the purpose or scope of this IP access list entry.
    ipAddress String
    Single IP address to be added to the access list. Mutually exclusive with cidr_block and aws_security_group.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v4.3.0 published on Thursday, Feb 5, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate