1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. LogIntegration
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.LogIntegration provides a resource for managing log integration configurations at the project level. This resource allows you to continually export mongod, mongos, and audit logs to an AWS S3 bucket with 1-minute log export intervals.

    To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const project = new mongodbatlas.Project("project", {
        name: atlasProjectName,
        orgId: atlasOrgId,
    });
    // Set up cloud provider access in Atlas using the created IAM role
    const setupOnly = new mongodbatlas.CloudProviderAccessSetup("setup_only", {
        projectId: project.id,
        providerName: "AWS",
    });
    const authRole = new mongodbatlas.CloudProviderAccessAuthorization("auth_role", {
        projectId: project.id,
        roleId: setupOnly.roleId,
        aws: {
            iamAssumedRoleArn: atlasRole.arn,
        },
    });
    // Set up log integration with authorized IAM role
    const exampleLogIntegration = new mongodbatlas.LogIntegration("example", {
        projectId: project.id,
        bucketName: logBucket.bucket,
        iamRoleId: authRole.roleId,
        prefixPath: "atlas-logs",
        type: "S3_LOG_EXPORT",
        logTypes: ["MONGOD_AUDIT"],
    });
    const example = mongodbatlas.getLogIntegrationOutput({
        projectId: exampleLogIntegration.projectId,
        integrationId: exampleLogIntegration.integrationId,
    });
    const exampleGetLogIntegrations = mongodbatlas.getLogIntegrationsOutput({
        projectId: exampleLogIntegration.projectId,
    });
    export const logIntegrationBucketName = example.apply(example => example.bucketName);
    export const logIntegrationsResults = exampleGetLogIntegrations.apply(exampleGetLogIntegrations => exampleGetLogIntegrations.results);
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    project = mongodbatlas.Project("project",
        name=atlas_project_name,
        org_id=atlas_org_id)
    # Set up cloud provider access in Atlas using the created IAM role
    setup_only = mongodbatlas.CloudProviderAccessSetup("setup_only",
        project_id=project.id,
        provider_name="AWS")
    auth_role = mongodbatlas.CloudProviderAccessAuthorization("auth_role",
        project_id=project.id,
        role_id=setup_only.role_id,
        aws={
            "iam_assumed_role_arn": atlas_role["arn"],
        })
    # Set up log integration with authorized IAM role
    example_log_integration = mongodbatlas.LogIntegration("example",
        project_id=project.id,
        bucket_name=log_bucket["bucket"],
        iam_role_id=auth_role.role_id,
        prefix_path="atlas-logs",
        type="S3_LOG_EXPORT",
        log_types=["MONGOD_AUDIT"])
    example = mongodbatlas.get_log_integration_output(project_id=example_log_integration.project_id,
        integration_id=example_log_integration.integration_id)
    example_get_log_integrations = mongodbatlas.get_log_integrations_output(project_id=example_log_integration.project_id)
    pulumi.export("logIntegrationBucketName", example.bucket_name)
    pulumi.export("logIntegrationsResults", example_get_log_integrations.results)
    
    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 {
    		project, err := mongodbatlas.NewProject(ctx, "project", &mongodbatlas.ProjectArgs{
    			Name:  pulumi.Any(atlasProjectName),
    			OrgId: pulumi.Any(atlasOrgId),
    		})
    		if err != nil {
    			return err
    		}
    		// Set up cloud provider access in Atlas using the created IAM role
    		setupOnly, err := mongodbatlas.NewCloudProviderAccessSetup(ctx, "setup_only", &mongodbatlas.CloudProviderAccessSetupArgs{
    			ProjectId:    project.ID(),
    			ProviderName: pulumi.String("AWS"),
    		})
    		if err != nil {
    			return err
    		}
    		authRole, err := mongodbatlas.NewCloudProviderAccessAuthorization(ctx, "auth_role", &mongodbatlas.CloudProviderAccessAuthorizationArgs{
    			ProjectId: project.ID(),
    			RoleId:    setupOnly.RoleId,
    			Aws: &mongodbatlas.CloudProviderAccessAuthorizationAwsArgs{
    				IamAssumedRoleArn: pulumi.Any(atlasRole.Arn),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Set up log integration with authorized IAM role
    		exampleLogIntegration, err := mongodbatlas.NewLogIntegration(ctx, "example", &mongodbatlas.LogIntegrationArgs{
    			ProjectId:  project.ID(),
    			BucketName: pulumi.Any(logBucket.Bucket),
    			IamRoleId:  authRole.RoleId,
    			PrefixPath: pulumi.String("atlas-logs"),
    			Type:       pulumi.String("S3_LOG_EXPORT"),
    			LogTypes: pulumi.StringArray{
    				pulumi.String("MONGOD_AUDIT"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		example := mongodbatlas.LookupLogIntegrationOutput(ctx, mongodbatlas.GetLogIntegrationOutputArgs{
    			ProjectId:     exampleLogIntegration.ProjectId,
    			IntegrationId: exampleLogIntegration.IntegrationId,
    		}, nil)
    		exampleGetLogIntegrations := mongodbatlas.LookupLogIntegrationsOutput(ctx, mongodbatlas.GetLogIntegrationsOutputArgs{
    			ProjectId: exampleLogIntegration.ProjectId,
    		}, nil)
    		ctx.Export("logIntegrationBucketName", example.ApplyT(func(example mongodbatlas.GetLogIntegrationResult) (*string, error) {
    			return &example.BucketName, nil
    		}).(pulumi.StringPtrOutput))
    		ctx.Export("logIntegrationsResults", exampleGetLogIntegrations.ApplyT(func(exampleGetLogIntegrations mongodbatlas.GetLogIntegrationsResult) ([]mongodbatlas.GetLogIntegrationsResult, error) {
    			return []mongodbatlas.GetLogIntegrationsResult(exampleGetLogIntegrations.Results), nil
    		}).([]mongodbatlas.GetLogIntegrationsResultOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var project = new Mongodbatlas.Project("project", new()
        {
            Name = atlasProjectName,
            OrgId = atlasOrgId,
        });
    
        // Set up cloud provider access in Atlas using the created IAM role
        var setupOnly = new Mongodbatlas.CloudProviderAccessSetup("setup_only", new()
        {
            ProjectId = project.Id,
            ProviderName = "AWS",
        });
    
        var authRole = new Mongodbatlas.CloudProviderAccessAuthorization("auth_role", new()
        {
            ProjectId = project.Id,
            RoleId = setupOnly.RoleId,
            Aws = new Mongodbatlas.Inputs.CloudProviderAccessAuthorizationAwsArgs
            {
                IamAssumedRoleArn = atlasRole.Arn,
            },
        });
    
        // Set up log integration with authorized IAM role
        var exampleLogIntegration = new Mongodbatlas.LogIntegration("example", new()
        {
            ProjectId = project.Id,
            BucketName = logBucket.Bucket,
            IamRoleId = authRole.RoleId,
            PrefixPath = "atlas-logs",
            Type = "S3_LOG_EXPORT",
            LogTypes = new[]
            {
                "MONGOD_AUDIT",
            },
        });
    
        var example = Mongodbatlas.GetLogIntegration.Invoke(new()
        {
            ProjectId = exampleLogIntegration.ProjectId,
            IntegrationId = exampleLogIntegration.IntegrationId,
        });
    
        var exampleGetLogIntegrations = Mongodbatlas.GetLogIntegrations.Invoke(new()
        {
            ProjectId = exampleLogIntegration.ProjectId,
        });
    
        return new Dictionary<string, object?>
        {
            ["logIntegrationBucketName"] = example.Apply(getLogIntegrationResult => getLogIntegrationResult.BucketName),
            ["logIntegrationsResults"] = exampleGetLogIntegrations.Apply(getLogIntegrationsResult => getLogIntegrationsResult.Results),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.Project;
    import com.pulumi.mongodbatlas.ProjectArgs;
    import com.pulumi.mongodbatlas.CloudProviderAccessSetup;
    import com.pulumi.mongodbatlas.CloudProviderAccessSetupArgs;
    import com.pulumi.mongodbatlas.CloudProviderAccessAuthorization;
    import com.pulumi.mongodbatlas.CloudProviderAccessAuthorizationArgs;
    import com.pulumi.mongodbatlas.inputs.CloudProviderAccessAuthorizationAwsArgs;
    import com.pulumi.mongodbatlas.LogIntegration;
    import com.pulumi.mongodbatlas.LogIntegrationArgs;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetLogIntegrationArgs;
    import com.pulumi.mongodbatlas.inputs.GetLogIntegrationsArgs;
    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 project = new Project("project", ProjectArgs.builder()
                .name(atlasProjectName)
                .orgId(atlasOrgId)
                .build());
    
            // Set up cloud provider access in Atlas using the created IAM role
            var setupOnly = new CloudProviderAccessSetup("setupOnly", CloudProviderAccessSetupArgs.builder()
                .projectId(project.id())
                .providerName("AWS")
                .build());
    
            var authRole = new CloudProviderAccessAuthorization("authRole", CloudProviderAccessAuthorizationArgs.builder()
                .projectId(project.id())
                .roleId(setupOnly.roleId())
                .aws(CloudProviderAccessAuthorizationAwsArgs.builder()
                    .iamAssumedRoleArn(atlasRole.arn())
                    .build())
                .build());
    
            // Set up log integration with authorized IAM role
            var exampleLogIntegration = new LogIntegration("exampleLogIntegration", LogIntegrationArgs.builder()
                .projectId(project.id())
                .bucketName(logBucket.bucket())
                .iamRoleId(authRole.roleId())
                .prefixPath("atlas-logs")
                .type("S3_LOG_EXPORT")
                .logTypes("MONGOD_AUDIT")
                .build());
    
            final var example = MongodbatlasFunctions.getLogIntegration(GetLogIntegrationArgs.builder()
                .projectId(exampleLogIntegration.projectId())
                .integrationId(exampleLogIntegration.integrationId())
                .build());
    
            final var exampleGetLogIntegrations = MongodbatlasFunctions.getLogIntegrations(GetLogIntegrationsArgs.builder()
                .projectId(exampleLogIntegration.projectId())
                .build());
    
            ctx.export("logIntegrationBucketName", example.applyValue(_example -> _example.bucketName()));
            ctx.export("logIntegrationsResults", exampleGetLogIntegrations.applyValue(_exampleGetLogIntegrations -> _exampleGetLogIntegrations.results()));
        }
    }
    
    resources:
      project:
        type: mongodbatlas:Project
        properties:
          name: ${atlasProjectName}
          orgId: ${atlasOrgId}
      # Set up cloud provider access in Atlas using the created IAM role
      setupOnly:
        type: mongodbatlas:CloudProviderAccessSetup
        name: setup_only
        properties:
          projectId: ${project.id}
          providerName: AWS
      authRole:
        type: mongodbatlas:CloudProviderAccessAuthorization
        name: auth_role
        properties:
          projectId: ${project.id}
          roleId: ${setupOnly.roleId}
          aws:
            iamAssumedRoleArn: ${atlasRole.arn}
      # Set up log integration with authorized IAM role
      exampleLogIntegration:
        type: mongodbatlas:LogIntegration
        name: example
        properties:
          projectId: ${project.id}
          bucketName: ${logBucket.bucket}
          iamRoleId: ${authRole.roleId}
          prefixPath: atlas-logs
          type: S3_LOG_EXPORT
          logTypes:
            - MONGOD_AUDIT
    variables:
      example:
        fn::invoke:
          function: mongodbatlas:getLogIntegration
          arguments:
            projectId: ${exampleLogIntegration.projectId}
            integrationId: ${exampleLogIntegration.integrationId}
      exampleGetLogIntegrations:
        fn::invoke:
          function: mongodbatlas:getLogIntegrations
          arguments:
            projectId: ${exampleLogIntegration.projectId}
    outputs:
      logIntegrationBucketName: ${example.bucketName}
      logIntegrationsResults: ${exampleGetLogIntegrations.results}
    

    Create LogIntegration Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new LogIntegration(name: string, args: LogIntegrationArgs, opts?: CustomResourceOptions);
    @overload
    def LogIntegration(resource_name: str,
                       args: LogIntegrationArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def LogIntegration(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       bucket_name: Optional[str] = None,
                       iam_role_id: Optional[str] = None,
                       log_types: Optional[Sequence[str]] = None,
                       prefix_path: Optional[str] = None,
                       project_id: Optional[str] = None,
                       type: Optional[str] = None,
                       kms_key: Optional[str] = None)
    func NewLogIntegration(ctx *Context, name string, args LogIntegrationArgs, opts ...ResourceOption) (*LogIntegration, error)
    public LogIntegration(string name, LogIntegrationArgs args, CustomResourceOptions? opts = null)
    public LogIntegration(String name, LogIntegrationArgs args)
    public LogIntegration(String name, LogIntegrationArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:LogIntegration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var logIntegrationResource = new Mongodbatlas.LogIntegration("logIntegrationResource", new()
    {
        BucketName = "string",
        IamRoleId = "string",
        LogTypes = new[]
        {
            "string",
        },
        PrefixPath = "string",
        ProjectId = "string",
        Type = "string",
        KmsKey = "string",
    });
    
    example, err := mongodbatlas.NewLogIntegration(ctx, "logIntegrationResource", &mongodbatlas.LogIntegrationArgs{
    	BucketName: pulumi.String("string"),
    	IamRoleId:  pulumi.String("string"),
    	LogTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PrefixPath: pulumi.String("string"),
    	ProjectId:  pulumi.String("string"),
    	Type:       pulumi.String("string"),
    	KmsKey:     pulumi.String("string"),
    })
    
    var logIntegrationResource = new LogIntegration("logIntegrationResource", LogIntegrationArgs.builder()
        .bucketName("string")
        .iamRoleId("string")
        .logTypes("string")
        .prefixPath("string")
        .projectId("string")
        .type("string")
        .kmsKey("string")
        .build());
    
    log_integration_resource = mongodbatlas.LogIntegration("logIntegrationResource",
        bucket_name="string",
        iam_role_id="string",
        log_types=["string"],
        prefix_path="string",
        project_id="string",
        type="string",
        kms_key="string")
    
    const logIntegrationResource = new mongodbatlas.LogIntegration("logIntegrationResource", {
        bucketName: "string",
        iamRoleId: "string",
        logTypes: ["string"],
        prefixPath: "string",
        projectId: "string",
        type: "string",
        kmsKey: "string",
    });
    
    type: mongodbatlas:LogIntegration
    properties:
        bucketName: string
        iamRoleId: string
        kmsKey: string
        logTypes:
            - string
        prefixPath: string
        projectId: string
        type: string
    

    LogIntegration Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The LogIntegration resource accepts the following input properties:

    BucketName string
    Human-readable label that identifies the S3 bucket name for storing log files.
    IamRoleId string
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    LogTypes List<string>
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    PrefixPath string
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Type string
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    KmsKey string
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    BucketName string
    Human-readable label that identifies the S3 bucket name for storing log files.
    IamRoleId string
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    LogTypes []string
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    PrefixPath string
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Type string
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    KmsKey string
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    bucketName String
    Human-readable label that identifies the S3 bucket name for storing log files.
    iamRoleId String
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    logTypes List<String>
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    prefixPath String
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    type String
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    kmsKey String
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    bucketName string
    Human-readable label that identifies the S3 bucket name for storing log files.
    iamRoleId string
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    logTypes string[]
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    prefixPath string
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project.
    type string
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    kmsKey string
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    bucket_name str
    Human-readable label that identifies the S3 bucket name for storing log files.
    iam_role_id str
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    log_types Sequence[str]
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    prefix_path str
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project.
    type str
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    kms_key str
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    bucketName String
    Human-readable label that identifies the S3 bucket name for storing log files.
    iamRoleId String
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    logTypes List<String>
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    prefixPath String
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    type String
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    kmsKey String
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    IntegrationId string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    IntegrationId string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    integrationId String
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    id string
    The provider-assigned unique ID for this managed resource.
    integrationId string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    id str
    The provider-assigned unique ID for this managed resource.
    integration_id str
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    integrationId String
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.

    Look up Existing LogIntegration Resource

    Get an existing LogIntegration 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?: LogIntegrationState, opts?: CustomResourceOptions): LogIntegration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket_name: Optional[str] = None,
            iam_role_id: Optional[str] = None,
            integration_id: Optional[str] = None,
            kms_key: Optional[str] = None,
            log_types: Optional[Sequence[str]] = None,
            prefix_path: Optional[str] = None,
            project_id: Optional[str] = None,
            type: Optional[str] = None) -> LogIntegration
    func GetLogIntegration(ctx *Context, name string, id IDInput, state *LogIntegrationState, opts ...ResourceOption) (*LogIntegration, error)
    public static LogIntegration Get(string name, Input<string> id, LogIntegrationState? state, CustomResourceOptions? opts = null)
    public static LogIntegration get(String name, Output<String> id, LogIntegrationState state, CustomResourceOptions options)
    resources:  _:    type: mongodbatlas:LogIntegration    get:      id: ${id}
    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:
    BucketName string
    Human-readable label that identifies the S3 bucket name for storing log files.
    IamRoleId string
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    IntegrationId string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    KmsKey string
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    LogTypes List<string>
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    PrefixPath string
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Type string
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    BucketName string
    Human-readable label that identifies the S3 bucket name for storing log files.
    IamRoleId string
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    IntegrationId string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    KmsKey string
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    LogTypes []string
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    PrefixPath string
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Type string
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    bucketName String
    Human-readable label that identifies the S3 bucket name for storing log files.
    iamRoleId String
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    integrationId String
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    kmsKey String
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    logTypes List<String>
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    prefixPath String
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    type String
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    bucketName string
    Human-readable label that identifies the S3 bucket name for storing log files.
    iamRoleId string
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    integrationId string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    kmsKey string
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    logTypes string[]
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    prefixPath string
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project.
    type string
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    bucket_name str
    Human-readable label that identifies the S3 bucket name for storing log files.
    iam_role_id str
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    integration_id str
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    kms_key str
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    log_types Sequence[str]
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    prefix_path str
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project.
    type str
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.
    bucketName String
    Human-readable label that identifies the S3 bucket name for storing log files.
    iamRoleId String
    Unique 24-hexadecimal digit string that identifies the AWS IAM role that MongoDB Cloud uses to access your S3 bucket.
    integrationId String
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    kmsKey String
    AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    logTypes List<String>
    Array of log types to export to S3. Valid values: MONGOD, MONGOS, MONGODAUDIT, MONGOSAUDIT.
    prefixPath String
    S3 directory path prefix where the log files will be stored. MongoDB Cloud will add further sub-directories based on the log type.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    type String
    Human-readable label that identifies the service to which you want to integrate with MongoDB Cloud. The value must match the log integration type.

    Import

    Log integration resource can be imported using the project ID and log integration ID, separated by a slash, e.g.

    $ terraform import mongodbatlas_log_integration.test 650972848269185c55f40ca1/6789abcd1234ef5678901234
    

    For more information see: MongoDB Atlas API - Log Integration Documentation.

    To learn more about importing existing cloud resources, see Importing resources.

    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