1. Packages
  2. Packages
  3. Mongodbatlas Provider
  4. API Docs
  5. LogIntegration
Viewing docs for MongoDB Atlas v4.11.0
published on Wednesday, Jul 1, 2026 by Pulumi
mongodbatlas logo
Viewing docs for MongoDB Atlas v4.11.0
published on Wednesday, Jul 1, 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 at 1-minute intervals. Supported integration types include AWS S3, Google Cloud Storage, Azure Blob Storage, Datadog, Splunk, and OpenTelemetry.

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

    Example Usage

    S

    AWS S3

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    // Set up cloud provider access in Atlas for AWS
    const setup = new mongodbatlas.CloudProviderAccessSetup("setup", {
        projectId: project.id,
        providerName: "AWS",
    });
    const auth = new mongodbatlas.CloudProviderAccessAuthorization("auth", {
        projectId: project.id,
        roleId: setup.roleId,
        aws: {
            iamAssumedRoleArn: atlasRole.arn,
        },
    });
    const example = new mongodbatlas.LogIntegration("example", {
        projectId: project.id,
        type: "S3_LOG_EXPORT",
        logTypes: ["MONGOD_AUDIT"],
        bucketName: logBucket.bucket,
        iamRoleId: auth.roleId,
        prefixPath: "atlas-logs",
        useLegacyPathStructure: useLegacyPathStructure === "true",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    # Set up cloud provider access in Atlas for AWS
    setup = mongodbatlas.CloudProviderAccessSetup("setup",
        project_id=project["id"],
        provider_name="AWS")
    auth = mongodbatlas.CloudProviderAccessAuthorization("auth",
        project_id=project["id"],
        role_id=setup.role_id,
        aws={
            "iam_assumed_role_arn": atlas_role["arn"],
        })
    example = mongodbatlas.LogIntegration("example",
        project_id=project["id"],
        type="S3_LOG_EXPORT",
        log_types=["MONGOD_AUDIT"],
        bucket_name=log_bucket["bucket"],
        iam_role_id=auth.role_id,
        prefix_path="atlas-logs",
        use_legacy_path_structure=use_legacy_path_structure == "true")
    
    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 {
    		// Set up cloud provider access in Atlas for AWS
    		setup, err := mongodbatlas.NewCloudProviderAccessSetup(ctx, "setup", &mongodbatlas.CloudProviderAccessSetupArgs{
    			ProjectId:    pulumi.Any(project.Id),
    			ProviderName: pulumi.String("AWS"),
    		})
    		if err != nil {
    			return err
    		}
    		auth, err := mongodbatlas.NewCloudProviderAccessAuthorization(ctx, "auth", &mongodbatlas.CloudProviderAccessAuthorizationArgs{
    			ProjectId: pulumi.Any(project.Id),
    			RoleId:    setup.RoleId,
    			Aws: &mongodbatlas.CloudProviderAccessAuthorizationAwsArgs{
    				IamAssumedRoleArn: pulumi.Any(atlasRole.Arn),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mongodbatlas.NewLogIntegration(ctx, "example", &mongodbatlas.LogIntegrationArgs{
    			ProjectId: pulumi.Any(project.Id),
    			Type:      pulumi.String("S3_LOG_EXPORT"),
    			LogTypes: pulumi.StringArray{
    				pulumi.String("MONGOD_AUDIT"),
    			},
    			BucketName:             pulumi.Any(logBucket.Bucket),
    			IamRoleId:              auth.RoleId,
    			PrefixPath:             pulumi.String("atlas-logs"),
    			UseLegacyPathStructure: pulumi.Any(useLegacyPathStructure),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        // Set up cloud provider access in Atlas for AWS
        var setup = new Mongodbatlas.CloudProviderAccessSetup("setup", new()
        {
            ProjectId = project.Id,
            ProviderName = "AWS",
        });
    
        var auth = new Mongodbatlas.CloudProviderAccessAuthorization("auth", new()
        {
            ProjectId = project.Id,
            RoleId = setup.RoleId,
            Aws = new Mongodbatlas.Inputs.CloudProviderAccessAuthorizationAwsArgs
            {
                IamAssumedRoleArn = atlasRole.Arn,
            },
        });
    
        var example = new Mongodbatlas.LogIntegration("example", new()
        {
            ProjectId = project.Id,
            Type = "S3_LOG_EXPORT",
            LogTypes = new[]
            {
                "MONGOD_AUDIT",
            },
            BucketName = logBucket.Bucket,
            IamRoleId = auth.RoleId,
            PrefixPath = "atlas-logs",
            UseLegacyPathStructure = useLegacyPathStructure,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Set up cloud provider access in Atlas for AWS
            var setup = new CloudProviderAccessSetup("setup", CloudProviderAccessSetupArgs.builder()
                .projectId(project.id())
                .providerName("AWS")
                .build());
    
            var auth = new CloudProviderAccessAuthorization("auth", CloudProviderAccessAuthorizationArgs.builder()
                .projectId(project.id())
                .roleId(setup.roleId())
                .aws(CloudProviderAccessAuthorizationAwsArgs.builder()
                    .iamAssumedRoleArn(atlasRole.arn())
                    .build())
                .build());
    
            var example = new LogIntegration("example", LogIntegrationArgs.builder()
                .projectId(project.id())
                .type("S3_LOG_EXPORT")
                .logTypes("MONGOD_AUDIT")
                .bucketName(logBucket.bucket())
                .iamRoleId(auth.roleId())
                .prefixPath("atlas-logs")
                .useLegacyPathStructure(useLegacyPathStructure)
                .build());
    
        }
    }
    
    resources:
      # Set up cloud provider access in Atlas for AWS
      setup:
        type: mongodbatlas:CloudProviderAccessSetup
        properties:
          projectId: ${project.id}
          providerName: AWS
      auth:
        type: mongodbatlas:CloudProviderAccessAuthorization
        properties:
          projectId: ${project.id}
          roleId: ${setup.roleId}
          aws:
            iamAssumedRoleArn: ${atlasRole.arn}
      example:
        type: mongodbatlas:LogIntegration
        properties:
          projectId: ${project.id}
          type: S3_LOG_EXPORT
          logTypes:
            - MONGOD_AUDIT
          bucketName: ${logBucket.bucket}
          iamRoleId: ${auth.roleId}
          prefixPath: atlas-logs
          useLegacyPathStructure: ${useLegacyPathStructure}
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    # Set up cloud provider access in Atlas for AWS
    resource "mongodbatlas_cloudprovideraccesssetup" "setup" {
      project_id    = project.id
      provider_name = "AWS"
    }
    resource "mongodbatlas_cloudprovideraccessauthorization" "auth" {
      project_id = project.id
      role_id    = mongodbatlas_cloudprovideraccesssetup.setup.role_id
      aws = {
        iam_assumed_role_arn = atlasRole.arn
      }
    }
    resource "mongodbatlas_logintegration" "example" {
      project_id                = project.id
      type                      = "S3_LOG_EXPORT"
      log_types                 = ["MONGOD_AUDIT"]
      bucket_name               = logBucket.bucket
      iam_role_id               = mongodbatlas_cloudprovideraccessauthorization.auth.role_id
      prefix_path               = "atlas-logs"
      use_legacy_path_structure = useLegacyPathStructure
    }
    

    Google Cloud Storage (GCS)

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    // Set up cloud provider access in Atlas for GCP
    const setup = new mongodbatlas.CloudProviderAccessSetup("setup", {
        projectId: project.id,
        providerName: "GCP",
    });
    const auth = new mongodbatlas.CloudProviderAccessAuthorization("auth", {
        projectId: project.id,
        roleId: setup.roleId,
    });
    const example = new mongodbatlas.LogIntegration("example", {
        projectId: project.id,
        type: "GCS_LOG_EXPORT",
        logTypes: ["MONGOD"],
        bucketName: logBucket.name,
        roleId: auth.roleId,
        prefixPath: "atlas-logs",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    # Set up cloud provider access in Atlas for GCP
    setup = mongodbatlas.CloudProviderAccessSetup("setup",
        project_id=project["id"],
        provider_name="GCP")
    auth = mongodbatlas.CloudProviderAccessAuthorization("auth",
        project_id=project["id"],
        role_id=setup.role_id)
    example = mongodbatlas.LogIntegration("example",
        project_id=project["id"],
        type="GCS_LOG_EXPORT",
        log_types=["MONGOD"],
        bucket_name=log_bucket["name"],
        role_id=auth.role_id,
        prefix_path="atlas-logs")
    
    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 {
    		// Set up cloud provider access in Atlas for GCP
    		setup, err := mongodbatlas.NewCloudProviderAccessSetup(ctx, "setup", &mongodbatlas.CloudProviderAccessSetupArgs{
    			ProjectId:    pulumi.Any(project.Id),
    			ProviderName: pulumi.String("GCP"),
    		})
    		if err != nil {
    			return err
    		}
    		auth, err := mongodbatlas.NewCloudProviderAccessAuthorization(ctx, "auth", &mongodbatlas.CloudProviderAccessAuthorizationArgs{
    			ProjectId: pulumi.Any(project.Id),
    			RoleId:    setup.RoleId,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mongodbatlas.NewLogIntegration(ctx, "example", &mongodbatlas.LogIntegrationArgs{
    			ProjectId: pulumi.Any(project.Id),
    			Type:      pulumi.String("GCS_LOG_EXPORT"),
    			LogTypes: pulumi.StringArray{
    				pulumi.String("MONGOD"),
    			},
    			BucketName: pulumi.Any(logBucket.Name),
    			RoleId:     auth.RoleId,
    			PrefixPath: pulumi.String("atlas-logs"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        // Set up cloud provider access in Atlas for GCP
        var setup = new Mongodbatlas.CloudProviderAccessSetup("setup", new()
        {
            ProjectId = project.Id,
            ProviderName = "GCP",
        });
    
        var auth = new Mongodbatlas.CloudProviderAccessAuthorization("auth", new()
        {
            ProjectId = project.Id,
            RoleId = setup.RoleId,
        });
    
        var example = new Mongodbatlas.LogIntegration("example", new()
        {
            ProjectId = project.Id,
            Type = "GCS_LOG_EXPORT",
            LogTypes = new[]
            {
                "MONGOD",
            },
            BucketName = logBucket.Name,
            RoleId = auth.RoleId,
            PrefixPath = "atlas-logs",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.CloudProviderAccessSetup;
    import com.pulumi.mongodbatlas.CloudProviderAccessSetupArgs;
    import com.pulumi.mongodbatlas.CloudProviderAccessAuthorization;
    import com.pulumi.mongodbatlas.CloudProviderAccessAuthorizationArgs;
    import com.pulumi.mongodbatlas.LogIntegration;
    import com.pulumi.mongodbatlas.LogIntegrationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Set up cloud provider access in Atlas for GCP
            var setup = new CloudProviderAccessSetup("setup", CloudProviderAccessSetupArgs.builder()
                .projectId(project.id())
                .providerName("GCP")
                .build());
    
            var auth = new CloudProviderAccessAuthorization("auth", CloudProviderAccessAuthorizationArgs.builder()
                .projectId(project.id())
                .roleId(setup.roleId())
                .build());
    
            var example = new LogIntegration("example", LogIntegrationArgs.builder()
                .projectId(project.id())
                .type("GCS_LOG_EXPORT")
                .logTypes("MONGOD")
                .bucketName(logBucket.name())
                .roleId(auth.roleId())
                .prefixPath("atlas-logs")
                .build());
    
        }
    }
    
    resources:
      # Set up cloud provider access in Atlas for GCP
      setup:
        type: mongodbatlas:CloudProviderAccessSetup
        properties:
          projectId: ${project.id}
          providerName: GCP
      auth:
        type: mongodbatlas:CloudProviderAccessAuthorization
        properties:
          projectId: ${project.id}
          roleId: ${setup.roleId}
      example:
        type: mongodbatlas:LogIntegration
        properties:
          projectId: ${project.id}
          type: GCS_LOG_EXPORT
          logTypes:
            - MONGOD
          bucketName: ${logBucket.name}
          roleId: ${auth.roleId}
          prefixPath: atlas-logs
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    # Set up cloud provider access in Atlas for GCP
    resource "mongodbatlas_cloudprovideraccesssetup" "setup" {
      project_id    = project.id
      provider_name = "GCP"
    }
    resource "mongodbatlas_cloudprovideraccessauthorization" "auth" {
      project_id = project.id
      role_id    = mongodbatlas_cloudprovideraccesssetup.setup.role_id
    }
    resource "mongodbatlas_logintegration" "example" {
      project_id  = project.id
      type        = "GCS_LOG_EXPORT"
      log_types   = ["MONGOD"]
      bucket_name = logBucket.name
      role_id     = mongodbatlas_cloudprovideraccessauthorization.auth.role_id
      prefix_path = "atlas-logs"
    }
    

    Azure Blob Storage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    // Set up cloud provider access in Atlas for Azure
    const setup = new mongodbatlas.CloudProviderAccessSetup("setup", {
        projectId: project.id,
        providerName: "AZURE",
        azureConfigs: [{
            atlasAzureAppId: atlasAzureAppId,
            servicePrincipalId: azureServicePrincipalId,
            tenantId: azureTenantId,
        }],
    });
    const auth = new mongodbatlas.CloudProviderAccessAuthorization("auth", {
        projectId: project.id,
        roleId: setup.roleId,
        azure: {
            atlasAzureAppId: atlasAzureAppId,
            servicePrincipalId: azureServicePrincipalId,
            tenantId: azureTenantId,
        },
    });
    const example = new mongodbatlas.LogIntegration("example", {
        projectId: project.id,
        type: "AZURE_LOG_EXPORT",
        logTypes: ["MONGOD"],
        roleId: auth.roleId,
        storageAccountName: logStorage.name,
        storageContainerName: logContainer.name,
        prefixPath: "atlas-logs",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    # Set up cloud provider access in Atlas for Azure
    setup = mongodbatlas.CloudProviderAccessSetup("setup",
        project_id=project["id"],
        provider_name="AZURE",
        azure_configs=[{
            "atlas_azure_app_id": atlas_azure_app_id,
            "service_principal_id": azure_service_principal_id,
            "tenant_id": azure_tenant_id,
        }])
    auth = mongodbatlas.CloudProviderAccessAuthorization("auth",
        project_id=project["id"],
        role_id=setup.role_id,
        azure={
            "atlas_azure_app_id": atlas_azure_app_id,
            "service_principal_id": azure_service_principal_id,
            "tenant_id": azure_tenant_id,
        })
    example = mongodbatlas.LogIntegration("example",
        project_id=project["id"],
        type="AZURE_LOG_EXPORT",
        log_types=["MONGOD"],
        role_id=auth.role_id,
        storage_account_name=log_storage["name"],
        storage_container_name=log_container["name"],
        prefix_path="atlas-logs")
    
    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 {
    		// Set up cloud provider access in Atlas for Azure
    		setup, err := mongodbatlas.NewCloudProviderAccessSetup(ctx, "setup", &mongodbatlas.CloudProviderAccessSetupArgs{
    			ProjectId:    pulumi.Any(project.Id),
    			ProviderName: pulumi.String("AZURE"),
    			AzureConfigs: mongodbatlas.CloudProviderAccessSetupAzureConfigArray{
    				&mongodbatlas.CloudProviderAccessSetupAzureConfigArgs{
    					AtlasAzureAppId:    pulumi.Any(atlasAzureAppId),
    					ServicePrincipalId: pulumi.Any(azureServicePrincipalId),
    					TenantId:           pulumi.Any(azureTenantId),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		auth, err := mongodbatlas.NewCloudProviderAccessAuthorization(ctx, "auth", &mongodbatlas.CloudProviderAccessAuthorizationArgs{
    			ProjectId: pulumi.Any(project.Id),
    			RoleId:    setup.RoleId,
    			Azure: &mongodbatlas.CloudProviderAccessAuthorizationAzureArgs{
    				AtlasAzureAppId:    pulumi.Any(atlasAzureAppId),
    				ServicePrincipalId: pulumi.Any(azureServicePrincipalId),
    				TenantId:           pulumi.Any(azureTenantId),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mongodbatlas.NewLogIntegration(ctx, "example", &mongodbatlas.LogIntegrationArgs{
    			ProjectId: pulumi.Any(project.Id),
    			Type:      pulumi.String("AZURE_LOG_EXPORT"),
    			LogTypes: pulumi.StringArray{
    				pulumi.String("MONGOD"),
    			},
    			RoleId:               auth.RoleId,
    			StorageAccountName:   pulumi.Any(logStorage.Name),
    			StorageContainerName: pulumi.Any(logContainer.Name),
    			PrefixPath:           pulumi.String("atlas-logs"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        // Set up cloud provider access in Atlas for Azure
        var setup = new Mongodbatlas.CloudProviderAccessSetup("setup", new()
        {
            ProjectId = project.Id,
            ProviderName = "AZURE",
            AzureConfigs = new[]
            {
                new Mongodbatlas.Inputs.CloudProviderAccessSetupAzureConfigArgs
                {
                    AtlasAzureAppId = atlasAzureAppId,
                    ServicePrincipalId = azureServicePrincipalId,
                    TenantId = azureTenantId,
                },
            },
        });
    
        var auth = new Mongodbatlas.CloudProviderAccessAuthorization("auth", new()
        {
            ProjectId = project.Id,
            RoleId = setup.RoleId,
            Azure = new Mongodbatlas.Inputs.CloudProviderAccessAuthorizationAzureArgs
            {
                AtlasAzureAppId = atlasAzureAppId,
                ServicePrincipalId = azureServicePrincipalId,
                TenantId = azureTenantId,
            },
        });
    
        var example = new Mongodbatlas.LogIntegration("example", new()
        {
            ProjectId = project.Id,
            Type = "AZURE_LOG_EXPORT",
            LogTypes = new[]
            {
                "MONGOD",
            },
            RoleId = auth.RoleId,
            StorageAccountName = logStorage.Name,
            StorageContainerName = logContainer.Name,
            PrefixPath = "atlas-logs",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.CloudProviderAccessSetup;
    import com.pulumi.mongodbatlas.CloudProviderAccessSetupArgs;
    import com.pulumi.mongodbatlas.inputs.CloudProviderAccessSetupAzureConfigArgs;
    import com.pulumi.mongodbatlas.CloudProviderAccessAuthorization;
    import com.pulumi.mongodbatlas.CloudProviderAccessAuthorizationArgs;
    import com.pulumi.mongodbatlas.inputs.CloudProviderAccessAuthorizationAzureArgs;
    import com.pulumi.mongodbatlas.LogIntegration;
    import com.pulumi.mongodbatlas.LogIntegrationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Set up cloud provider access in Atlas for Azure
            var setup = new CloudProviderAccessSetup("setup", CloudProviderAccessSetupArgs.builder()
                .projectId(project.id())
                .providerName("AZURE")
                .azureConfigs(CloudProviderAccessSetupAzureConfigArgs.builder()
                    .atlasAzureAppId(atlasAzureAppId)
                    .servicePrincipalId(azureServicePrincipalId)
                    .tenantId(azureTenantId)
                    .build())
                .build());
    
            var auth = new CloudProviderAccessAuthorization("auth", CloudProviderAccessAuthorizationArgs.builder()
                .projectId(project.id())
                .roleId(setup.roleId())
                .azure(CloudProviderAccessAuthorizationAzureArgs.builder()
                    .atlasAzureAppId(atlasAzureAppId)
                    .servicePrincipalId(azureServicePrincipalId)
                    .tenantId(azureTenantId)
                    .build())
                .build());
    
            var example = new LogIntegration("example", LogIntegrationArgs.builder()
                .projectId(project.id())
                .type("AZURE_LOG_EXPORT")
                .logTypes("MONGOD")
                .roleId(auth.roleId())
                .storageAccountName(logStorage.name())
                .storageContainerName(logContainer.name())
                .prefixPath("atlas-logs")
                .build());
    
        }
    }
    
    resources:
      # Set up cloud provider access in Atlas for Azure
      setup:
        type: mongodbatlas:CloudProviderAccessSetup
        properties:
          projectId: ${project.id}
          providerName: AZURE
          azureConfigs:
            - atlasAzureAppId: ${atlasAzureAppId}
              servicePrincipalId: ${azureServicePrincipalId}
              tenantId: ${azureTenantId}
      auth:
        type: mongodbatlas:CloudProviderAccessAuthorization
        properties:
          projectId: ${project.id}
          roleId: ${setup.roleId}
          azure:
            atlasAzureAppId: ${atlasAzureAppId}
            servicePrincipalId: ${azureServicePrincipalId}
            tenantId: ${azureTenantId}
      example:
        type: mongodbatlas:LogIntegration
        properties:
          projectId: ${project.id}
          type: AZURE_LOG_EXPORT
          logTypes:
            - MONGOD
          roleId: ${auth.roleId}
          storageAccountName: ${logStorage.name}
          storageContainerName: ${logContainer.name}
          prefixPath: atlas-logs
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    # Set up cloud provider access in Atlas for Azure
    resource "mongodbatlas_cloudprovideraccesssetup" "setup" {
      project_id    = project.id
      provider_name = "AZURE"
      azure_configs {
        atlas_azure_app_id   = atlasAzureAppId
        service_principal_id = azureServicePrincipalId
        tenant_id            = azureTenantId
      }
    }
    resource "mongodbatlas_cloudprovideraccessauthorization" "auth" {
      project_id = project.id
      role_id    = mongodbatlas_cloudprovideraccesssetup.setup.role_id
      azure = {
        atlas_azure_app_id   = atlasAzureAppId
        service_principal_id = azureServicePrincipalId
        tenant_id            = azureTenantId
      }
    }
    resource "mongodbatlas_logintegration" "example" {
      project_id             = project.id
      type                   = "AZURE_LOG_EXPORT"
      log_types              = ["MONGOD"]
      role_id                = mongodbatlas_cloudprovideraccessauthorization.auth.role_id
      storage_account_name   = logStorage.name
      storage_container_name = logContainer.name
      prefix_path            = "atlas-logs"
    }
    

    Datadog

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const example = new mongodbatlas.LogIntegration("example", {
        projectId: project.id,
        type: "DATADOG_LOG_EXPORT",
        logTypes: ["MONGOD"],
        apiKey: datadogApiKey,
        region: datadogRegion,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    example = mongodbatlas.LogIntegration("example",
        project_id=project["id"],
        type="DATADOG_LOG_EXPORT",
        log_types=["MONGOD"],
        api_key=datadog_api_key,
        region=datadog_region)
    
    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.NewLogIntegration(ctx, "example", &mongodbatlas.LogIntegrationArgs{
    			ProjectId: pulumi.Any(project.Id),
    			Type:      pulumi.String("DATADOG_LOG_EXPORT"),
    			LogTypes: pulumi.StringArray{
    				pulumi.String("MONGOD"),
    			},
    			ApiKey: pulumi.Any(datadogApiKey),
    			Region: pulumi.Any(datadogRegion),
    		})
    		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 example = new Mongodbatlas.LogIntegration("example", new()
        {
            ProjectId = project.Id,
            Type = "DATADOG_LOG_EXPORT",
            LogTypes = new[]
            {
                "MONGOD",
            },
            ApiKey = datadogApiKey,
            Region = datadogRegion,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.LogIntegration;
    import com.pulumi.mongodbatlas.LogIntegrationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new LogIntegration("example", LogIntegrationArgs.builder()
                .projectId(project.id())
                .type("DATADOG_LOG_EXPORT")
                .logTypes("MONGOD")
                .apiKey(datadogApiKey)
                .region(datadogRegion)
                .build());
    
        }
    }
    
    resources:
      example:
        type: mongodbatlas:LogIntegration
        properties:
          projectId: ${project.id}
          type: DATADOG_LOG_EXPORT
          logTypes:
            - MONGOD
          apiKey: ${datadogApiKey}
          region: ${datadogRegion}
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    resource "mongodbatlas_logintegration" "example" {
      project_id = project.id
      type       = "DATADOG_LOG_EXPORT"
      log_types  = ["MONGOD"]
      api_key    = datadogApiKey
      region     = datadogRegion
    }
    

    Splunk

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const example = new mongodbatlas.LogIntegration("example", {
        projectId: project.id,
        type: "SPLUNK_LOG_EXPORT",
        logTypes: ["MONGOD"],
        hecToken: splunkHecToken,
        hecUrl: splunkHecUrl,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    example = mongodbatlas.LogIntegration("example",
        project_id=project["id"],
        type="SPLUNK_LOG_EXPORT",
        log_types=["MONGOD"],
        hec_token=splunk_hec_token,
        hec_url=splunk_hec_url)
    
    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.NewLogIntegration(ctx, "example", &mongodbatlas.LogIntegrationArgs{
    			ProjectId: pulumi.Any(project.Id),
    			Type:      pulumi.String("SPLUNK_LOG_EXPORT"),
    			LogTypes: pulumi.StringArray{
    				pulumi.String("MONGOD"),
    			},
    			HecToken: pulumi.Any(splunkHecToken),
    			HecUrl:   pulumi.Any(splunkHecUrl),
    		})
    		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 example = new Mongodbatlas.LogIntegration("example", new()
        {
            ProjectId = project.Id,
            Type = "SPLUNK_LOG_EXPORT",
            LogTypes = new[]
            {
                "MONGOD",
            },
            HecToken = splunkHecToken,
            HecUrl = splunkHecUrl,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.LogIntegration;
    import com.pulumi.mongodbatlas.LogIntegrationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new LogIntegration("example", LogIntegrationArgs.builder()
                .projectId(project.id())
                .type("SPLUNK_LOG_EXPORT")
                .logTypes("MONGOD")
                .hecToken(splunkHecToken)
                .hecUrl(splunkHecUrl)
                .build());
    
        }
    }
    
    resources:
      example:
        type: mongodbatlas:LogIntegration
        properties:
          projectId: ${project.id}
          type: SPLUNK_LOG_EXPORT
          logTypes:
            - MONGOD
          hecToken: ${splunkHecToken}
          hecUrl: ${splunkHecUrl}
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    resource "mongodbatlas_logintegration" "example" {
      project_id = project.id
      type       = "SPLUNK_LOG_EXPORT"
      log_types  = ["MONGOD"]
      hec_token  = splunkHecToken
      hec_url    = splunkHecUrl
    }
    

    OpenTelemetry

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const example = new mongodbatlas.LogIntegration("example", {
        projectId: project.id,
        type: "OTEL_LOG_EXPORT",
        logTypes: ["MONGOD"],
        otelEndpoint: otelEndpoint,
        otelSuppliedHeaders: otelSuppliedHeaders,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    example = mongodbatlas.LogIntegration("example",
        project_id=project["id"],
        type="OTEL_LOG_EXPORT",
        log_types=["MONGOD"],
        otel_endpoint=otel_endpoint,
        otel_supplied_headers=otel_supplied_headers)
    
    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.NewLogIntegration(ctx, "example", &mongodbatlas.LogIntegrationArgs{
    			ProjectId: pulumi.Any(project.Id),
    			Type:      pulumi.String("OTEL_LOG_EXPORT"),
    			LogTypes: pulumi.StringArray{
    				pulumi.String("MONGOD"),
    			},
    			OtelEndpoint:        pulumi.Any(otelEndpoint),
    			OtelSuppliedHeaders: pulumi.Any(otelSuppliedHeaders),
    		})
    		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 example = new Mongodbatlas.LogIntegration("example", new()
        {
            ProjectId = project.Id,
            Type = "OTEL_LOG_EXPORT",
            LogTypes = new[]
            {
                "MONGOD",
            },
            OtelEndpoint = otelEndpoint,
            OtelSuppliedHeaders = otelSuppliedHeaders,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.LogIntegration;
    import com.pulumi.mongodbatlas.LogIntegrationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new LogIntegration("example", LogIntegrationArgs.builder()
                .projectId(project.id())
                .type("OTEL_LOG_EXPORT")
                .logTypes("MONGOD")
                .otelEndpoint(otelEndpoint)
                .otelSuppliedHeaders(otelSuppliedHeaders)
                .build());
    
        }
    }
    
    resources:
      example:
        type: mongodbatlas:LogIntegration
        properties:
          projectId: ${project.id}
          type: OTEL_LOG_EXPORT
          logTypes:
            - MONGOD
          otelEndpoint: ${otelEndpoint}
          otelSuppliedHeaders: ${otelSuppliedHeaders}
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    resource "mongodbatlas_logintegration" "example" {
      project_id    = project.id
      type          = "OTEL_LOG_EXPORT"
      log_types     = ["MONGOD"]
      otel_endpoint = otelEndpoint
      otel_supplied_headers {
        content = otelSuppliedHeaders
      }
    }
    

    Further Examples

    • Log Integration Examples

    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,
                       log_types: Optional[Sequence[str]] = None,
                       type: Optional[str] = None,
                       project_id: Optional[str] = None,
                       otel_supplied_headers: Optional[Sequence[LogIntegrationOtelSuppliedHeaderArgs]] = None,
                       hec_token: Optional[str] = None,
                       kms_key: Optional[str] = None,
                       hec_url: Optional[str] = None,
                       otel_endpoint: Optional[str] = None,
                       api_key: Optional[str] = None,
                       prefix_path: Optional[str] = None,
                       iam_role_id: Optional[str] = None,
                       region: Optional[str] = None,
                       role_id: Optional[str] = None,
                       storage_account_name: Optional[str] = None,
                       storage_container_name: Optional[str] = None,
                       bucket_name: Optional[str] = None,
                       use_legacy_path_structure: Optional[bool] = 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.
    
    
    resource "mongodbatlas_logintegration" "name" {
        # resource properties
    }

    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()
    {
        LogTypes = new[]
        {
            "string",
        },
        Type = "string",
        ProjectId = "string",
        OtelSuppliedHeaders = new[]
        {
            new Mongodbatlas.Inputs.LogIntegrationOtelSuppliedHeaderArgs
            {
                Name = "string",
                Value = "string",
            },
        },
        HecToken = "string",
        KmsKey = "string",
        HecUrl = "string",
        OtelEndpoint = "string",
        ApiKey = "string",
        PrefixPath = "string",
        IamRoleId = "string",
        Region = "string",
        RoleId = "string",
        StorageAccountName = "string",
        StorageContainerName = "string",
        BucketName = "string",
        UseLegacyPathStructure = false,
    });
    
    example, err := mongodbatlas.NewLogIntegration(ctx, "logIntegrationResource", &mongodbatlas.LogIntegrationArgs{
    	LogTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type:      pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	OtelSuppliedHeaders: mongodbatlas.LogIntegrationOtelSuppliedHeaderArray{
    		&mongodbatlas.LogIntegrationOtelSuppliedHeaderArgs{
    			Name:  pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	HecToken:               pulumi.String("string"),
    	KmsKey:                 pulumi.String("string"),
    	HecUrl:                 pulumi.String("string"),
    	OtelEndpoint:           pulumi.String("string"),
    	ApiKey:                 pulumi.String("string"),
    	PrefixPath:             pulumi.String("string"),
    	IamRoleId:              pulumi.String("string"),
    	Region:                 pulumi.String("string"),
    	RoleId:                 pulumi.String("string"),
    	StorageAccountName:     pulumi.String("string"),
    	StorageContainerName:   pulumi.String("string"),
    	BucketName:             pulumi.String("string"),
    	UseLegacyPathStructure: pulumi.Bool(false),
    })
    
    resource "mongodbatlas_logintegration" "logIntegrationResource" {
      log_types  = ["string"]
      type       = "string"
      project_id = "string"
      otel_supplied_headers {
        name  = "string"
        value = "string"
      }
      hec_token                 = "string"
      kms_key                   = "string"
      hec_url                   = "string"
      otel_endpoint             = "string"
      api_key                   = "string"
      prefix_path               = "string"
      iam_role_id               = "string"
      region                    = "string"
      role_id                   = "string"
      storage_account_name      = "string"
      storage_container_name    = "string"
      bucket_name               = "string"
      use_legacy_path_structure = false
    }
    
    var logIntegrationResource = new LogIntegration("logIntegrationResource", LogIntegrationArgs.builder()
        .logTypes("string")
        .type("string")
        .projectId("string")
        .otelSuppliedHeaders(LogIntegrationOtelSuppliedHeaderArgs.builder()
            .name("string")
            .value("string")
            .build())
        .hecToken("string")
        .kmsKey("string")
        .hecUrl("string")
        .otelEndpoint("string")
        .apiKey("string")
        .prefixPath("string")
        .iamRoleId("string")
        .region("string")
        .roleId("string")
        .storageAccountName("string")
        .storageContainerName("string")
        .bucketName("string")
        .useLegacyPathStructure(false)
        .build());
    
    log_integration_resource = mongodbatlas.LogIntegration("logIntegrationResource",
        log_types=["string"],
        type="string",
        project_id="string",
        otel_supplied_headers=[{
            "name": "string",
            "value": "string",
        }],
        hec_token="string",
        kms_key="string",
        hec_url="string",
        otel_endpoint="string",
        api_key="string",
        prefix_path="string",
        iam_role_id="string",
        region="string",
        role_id="string",
        storage_account_name="string",
        storage_container_name="string",
        bucket_name="string",
        use_legacy_path_structure=False)
    
    const logIntegrationResource = new mongodbatlas.LogIntegration("logIntegrationResource", {
        logTypes: ["string"],
        type: "string",
        projectId: "string",
        otelSuppliedHeaders: [{
            name: "string",
            value: "string",
        }],
        hecToken: "string",
        kmsKey: "string",
        hecUrl: "string",
        otelEndpoint: "string",
        apiKey: "string",
        prefixPath: "string",
        iamRoleId: "string",
        region: "string",
        roleId: "string",
        storageAccountName: "string",
        storageContainerName: "string",
        bucketName: "string",
        useLegacyPathStructure: false,
    });
    
    type: mongodbatlas:LogIntegration
    properties:
        apiKey: string
        bucketName: string
        hecToken: string
        hecUrl: string
        iamRoleId: string
        kmsKey: string
        logTypes:
            - string
        otelEndpoint: string
        otelSuppliedHeaders:
            - name: string
              value: string
        prefixPath: string
        projectId: string
        region: string
        roleId: string
        storageAccountName: string
        storageContainerName: string
        type: string
        useLegacyPathStructure: false
    

    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:

    LogTypes List<string>
    Array of log types exported by this integration.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    Type string
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    ApiKey string
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    BucketName string
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    HecToken string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    HecUrl string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    IamRoleId string
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    KmsKey string
    Optional for type: S3_LOG_EXPORT. AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    OtelEndpoint string
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    OtelSuppliedHeaders List<LogIntegrationOtelSuppliedHeader>
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    PrefixPath string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    Region string
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    RoleId string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    StorageAccountName string
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    StorageContainerName string
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    UseLegacyPathStructure bool
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    LogTypes []string
    Array of log types exported by this integration.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    Type string
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    ApiKey string
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    BucketName string
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    HecToken string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    HecUrl string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    IamRoleId string
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    KmsKey string
    Optional for type: S3_LOG_EXPORT. AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    OtelEndpoint string
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    OtelSuppliedHeaders []LogIntegrationOtelSuppliedHeaderArgs
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    PrefixPath string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    Region string
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    RoleId string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    StorageAccountName string
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    StorageContainerName string
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    UseLegacyPathStructure bool
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    log_types list(string)
    Array of log types exported by this integration.
    project_id string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    type string
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    api_key string
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucket_name string
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hec_token string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hec_url string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iam_role_id string
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    kms_key string
    Optional for type: S3_LOG_EXPORT. AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    otel_endpoint string
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otel_supplied_headers list(object)
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefix_path string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    region string
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    role_id string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storage_account_name string
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storage_container_name string
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    use_legacy_path_structure bool
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    logTypes List<String>
    Array of log types exported by this integration.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    type String
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    apiKey String
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucketName String
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hecToken String
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hecUrl String
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iamRoleId String
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    kmsKey String
    Optional for type: S3_LOG_EXPORT. AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    otelEndpoint String
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otelSuppliedHeaders List<LogIntegrationOtelSuppliedHeader>
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefixPath String
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    region String
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    roleId String
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storageAccountName String
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storageContainerName String
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    useLegacyPathStructure Boolean
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    logTypes string[]
    Array of log types exported by this integration.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    type string
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    apiKey string
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucketName string
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hecToken string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hecUrl string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iamRoleId string
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    kmsKey string
    Optional for type: S3_LOG_EXPORT. AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    otelEndpoint string
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otelSuppliedHeaders LogIntegrationOtelSuppliedHeader[]
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefixPath string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    region string
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    roleId string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storageAccountName string
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storageContainerName string
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    useLegacyPathStructure boolean
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    log_types Sequence[str]
    Array of log types exported by this integration.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    type str
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    api_key str
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucket_name str
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hec_token str
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hec_url str
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iam_role_id str
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    kms_key str
    Optional for type: S3_LOG_EXPORT. AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    otel_endpoint str
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otel_supplied_headers Sequence[LogIntegrationOtelSuppliedHeaderArgs]
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefix_path str
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    region str
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    role_id str
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storage_account_name str
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storage_container_name str
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    use_legacy_path_structure bool
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    logTypes List<String>
    Array of log types exported by this integration.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    type String
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    apiKey String
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucketName String
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hecToken String
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hecUrl String
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iamRoleId String
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    kmsKey String
    Optional for type: S3_LOG_EXPORT. AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    otelEndpoint String
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otelSuppliedHeaders List<Property Map>
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefixPath String
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    region String
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    roleId String
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storageAccountName String
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storageContainerName String
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    useLegacyPathStructure Boolean
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.

    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.
    integration_id 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,
            api_key: Optional[str] = None,
            bucket_name: Optional[str] = None,
            hec_token: Optional[str] = None,
            hec_url: 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,
            otel_endpoint: Optional[str] = None,
            otel_supplied_headers: Optional[Sequence[LogIntegrationOtelSuppliedHeaderArgs]] = None,
            prefix_path: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            role_id: Optional[str] = None,
            storage_account_name: Optional[str] = None,
            storage_container_name: Optional[str] = None,
            type: Optional[str] = None,
            use_legacy_path_structure: Optional[bool] = 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}
    import {
      to = mongodbatlas_logintegration.example
      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:
    ApiKey string
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    BucketName string
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    HecToken string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    HecUrl string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    IamRoleId string
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    IntegrationId string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    KmsKey string
    Optional for type: S3_LOG_EXPORT. 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 exported by this integration.
    OtelEndpoint string
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    OtelSuppliedHeaders List<LogIntegrationOtelSuppliedHeader>
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    PrefixPath string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    Region string
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    RoleId string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    StorageAccountName string
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    StorageContainerName string
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    Type string
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    UseLegacyPathStructure bool
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    ApiKey string
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    BucketName string
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    HecToken string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    HecUrl string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    IamRoleId string
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    IntegrationId string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    KmsKey string
    Optional for type: S3_LOG_EXPORT. 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 exported by this integration.
    OtelEndpoint string
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    OtelSuppliedHeaders []LogIntegrationOtelSuppliedHeaderArgs
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    PrefixPath string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    Region string
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    RoleId string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    StorageAccountName string
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    StorageContainerName string
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    Type string
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    UseLegacyPathStructure bool
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    api_key string
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucket_name string
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hec_token string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hec_url string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iam_role_id string
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    integration_id string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    kms_key string
    Optional for type: S3_LOG_EXPORT. AWS KMS key ID or ARN for server-side encryption (optional). If not provided, uses bucket default encryption settings.
    log_types list(string)
    Array of log types exported by this integration.
    otel_endpoint string
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otel_supplied_headers list(object)
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefix_path string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    project_id string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    region string
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    role_id string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storage_account_name string
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storage_container_name string
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    type string
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    use_legacy_path_structure bool
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    apiKey String
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucketName String
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hecToken String
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hecUrl String
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iamRoleId String
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    integrationId String
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    kmsKey String
    Optional for type: S3_LOG_EXPORT. 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 exported by this integration.
    otelEndpoint String
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otelSuppliedHeaders List<LogIntegrationOtelSuppliedHeader>
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefixPath String
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    region String
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    roleId String
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storageAccountName String
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storageContainerName String
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    type String
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    useLegacyPathStructure Boolean
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    apiKey string
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucketName string
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hecToken string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hecUrl string
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iamRoleId string
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    integrationId string
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    kmsKey string
    Optional for type: S3_LOG_EXPORT. 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 exported by this integration.
    otelEndpoint string
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otelSuppliedHeaders LogIntegrationOtelSuppliedHeader[]
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefixPath string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    region string
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    roleId string
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storageAccountName string
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storageContainerName string
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    type string
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    useLegacyPathStructure boolean
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    api_key str
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucket_name str
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hec_token str
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hec_url str
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iam_role_id str
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    integration_id str
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    kms_key str
    Optional for type: S3_LOG_EXPORT. 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 exported by this integration.
    otel_endpoint str
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otel_supplied_headers Sequence[LogIntegrationOtelSuppliedHeaderArgs]
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefix_path str
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    region str
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    role_id str
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storage_account_name str
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storage_container_name str
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    type str
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    use_legacy_path_structure bool
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.
    apiKey String
    Required for type: DATADOG_LOG_EXPORT. API key for authentication.
    bucketName String
    Required for type: GCS_LOG_EXPORT, S3_LOG_EXPORT. Name of the bucket to store log files.
    hecToken String
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) token for authentication.
    hecUrl String
    Required for type: SPLUNK_LOG_EXPORT. HTTP Event Collector (HEC) endpoint URL.
    iamRoleId String
    Required for type: S3_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the AWS IAM role that Atlas uses to access the S3 bucket.
    integrationId String
    Unique 24-character hexadecimal digit string that identifies the log integration configuration.
    kmsKey String
    Optional for type: S3_LOG_EXPORT. 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 exported by this integration.
    otelEndpoint String
    Required for type: OTEL_LOG_EXPORT. OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
    otelSuppliedHeaders List<Property Map>
    Required for type: OTEL_LOG_EXPORT. HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
    prefixPath String
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT, S3_LOG_EXPORT. Path prefix where the log files will be stored. Atlas will add further sub-directories based on the log type.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    region String
    Required for type: DATADOG_LOG_EXPORT. Datadog site/region for log ingestion. Valid values: US1, US3, US5, EU, AP1, AP2, US1_FED.
    roleId String
    Required for type: AZURE_LOG_EXPORT, GCS_LOG_EXPORT. Unique 24-character hexadecimal string that identifies the Atlas Cloud Provider Access role.
    storageAccountName String
    Required for type: AZURE_LOG_EXPORT. Storage account name where logs will be stored.
    storageContainerName String
    Required for type: AZURE_LOG_EXPORT. Storage container name for log files.
    type String
    Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
    useLegacyPathStructure Boolean
    Optional for type: S3_LOG_EXPORT. When true, uses the legacy daily-folder path structure compatible with Push-Based Log Export: {prefix}/{cluster}/{hostname}/{logType}/{YYYY-MM-DD}/{timestamp}-{logType}.log. When false (default), uses the flat timestamped structure: {prefix}/{cluster}/{hostname}/{logType}/{timestamp}-{logType}.log.

    Supporting Types

    LogIntegrationOtelSuppliedHeader, LogIntegrationOtelSuppliedHeaderArgs

    Name string
    Header name.
    Value string
    Header value.
    Name string
    Header name.
    Value string
    Header value.
    name string
    Header name.
    value string
    Header value.
    name String
    Header name.
    value String
    Header value.
    name string
    Header name.
    value string
    Header value.
    name str
    Header name.
    value str
    Header value.
    name String
    Header name.
    value String
    Header value.

    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
    Viewing docs for MongoDB Atlas v4.11.0
    published on Wednesday, Jul 1, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial