1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getLogIntegration
Viewing docs for MongoDB Atlas v4.5.0
published on Thursday, Mar 12, 2026 by Pulumi
mongodbatlas logo
Viewing docs for MongoDB Atlas v4.5.0
published on Thursday, Mar 12, 2026 by Pulumi

    mongodbatlas.LogIntegration describes the configuration of a log integration at the project level. Supported integration types include AWS S3, Google Cloud Storage, Azure Blob Storage, Datadog, Splunk, and OpenTelemetry.

    To use this data source, 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 example = mongodbatlas.getLogIntegration({
        projectId: exampleMongodbatlasLogIntegration.projectId,
        integrationId: exampleMongodbatlasLogIntegration.integrationId,
    });
    export const logIntegrationType = example.then(example => example.type);
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    example = mongodbatlas.get_log_integration(project_id=example_mongodbatlas_log_integration["projectId"],
        integration_id=example_mongodbatlas_log_integration["integrationId"])
    pulumi.export("logIntegrationType", example.type)
    
    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 {
    		example, err := mongodbatlas.LookupLogIntegration(ctx, &mongodbatlas.LookupLogIntegrationArgs{
    			ProjectId:     exampleMongodbatlasLogIntegration.ProjectId,
    			IntegrationId: exampleMongodbatlasLogIntegration.IntegrationId,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("logIntegrationType", example.Type)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Mongodbatlas.GetLogIntegration.Invoke(new()
        {
            ProjectId = exampleMongodbatlasLogIntegration.ProjectId,
            IntegrationId = exampleMongodbatlasLogIntegration.IntegrationId,
        });
    
        return new Dictionary<string, object?>
        {
            ["logIntegrationType"] = example.Apply(getLogIntegrationResult => getLogIntegrationResult.Type),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetLogIntegrationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = MongodbatlasFunctions.getLogIntegration(GetLogIntegrationArgs.builder()
                .projectId(exampleMongodbatlasLogIntegration.projectId())
                .integrationId(exampleMongodbatlasLogIntegration.integrationId())
                .build());
    
            ctx.export("logIntegrationType", example.type());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: mongodbatlas:getLogIntegration
          arguments:
            projectId: ${exampleMongodbatlasLogIntegration.projectId}
            integrationId: ${exampleMongodbatlasLogIntegration.integrationId}
    outputs:
      logIntegrationType: ${example.type}
    

    Further Examples

    • Log Integration Examples

    Using getLogIntegration

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getLogIntegration(args: GetLogIntegrationArgs, opts?: InvokeOptions): Promise<GetLogIntegrationResult>
    function getLogIntegrationOutput(args: GetLogIntegrationOutputArgs, opts?: InvokeOptions): Output<GetLogIntegrationResult>
    def get_log_integration(integration_id: Optional[str] = None,
                            project_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetLogIntegrationResult
    def get_log_integration_output(integration_id: Optional[pulumi.Input[str]] = None,
                            project_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetLogIntegrationResult]
    func LookupLogIntegration(ctx *Context, args *LookupLogIntegrationArgs, opts ...InvokeOption) (*LookupLogIntegrationResult, error)
    func LookupLogIntegrationOutput(ctx *Context, args *LookupLogIntegrationOutputArgs, opts ...InvokeOption) LookupLogIntegrationResultOutput

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

    public static class GetLogIntegration 
    {
        public static Task<GetLogIntegrationResult> InvokeAsync(GetLogIntegrationArgs args, InvokeOptions? opts = null)
        public static Output<GetLogIntegrationResult> Invoke(GetLogIntegrationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLogIntegrationResult> getLogIntegration(GetLogIntegrationArgs args, InvokeOptions options)
    public static Output<GetLogIntegrationResult> getLogIntegration(GetLogIntegrationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: mongodbatlas:index/getLogIntegration:getLogIntegration
      arguments:
        # arguments dictionary

    The following arguments are supported:

    IntegrationId string
    Unique identifier of the log integration configuration.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    IntegrationId string
    Unique identifier of the log integration configuration.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    integrationId String
    Unique identifier of the log integration configuration.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    integrationId string
    Unique identifier of the log integration configuration.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project.
    integration_id str
    Unique identifier of the log integration configuration.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project.
    integrationId String
    Unique identifier of the log integration configuration.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.

    getLogIntegration Result

    The following output properties are available:

    ApiKey string
    BucketName string
    HecToken string
    HecUrl string
    IamRoleId string
    Id string
    The provider-assigned unique ID for this managed resource.
    IntegrationId string
    Unique identifier of the log integration configuration.
    KmsKey string
    LogTypes List<string>
    Array of log types exported by this integration.
    OtelEndpoint string
    OtelSuppliedHeaders List<GetLogIntegrationOtelSuppliedHeader>
    PrefixPath string
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Region string
    RoleId string
    StorageAccountName string
    StorageContainerName string
    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
    BucketName string
    HecToken string
    HecUrl string
    IamRoleId string
    Id string
    The provider-assigned unique ID for this managed resource.
    IntegrationId string
    Unique identifier of the log integration configuration.
    KmsKey string
    LogTypes []string
    Array of log types exported by this integration.
    OtelEndpoint string
    OtelSuppliedHeaders []GetLogIntegrationOtelSuppliedHeader
    PrefixPath string
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Region string
    RoleId string
    StorageAccountName string
    StorageContainerName string
    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
    bucketName String
    hecToken String
    hecUrl String
    iamRoleId String
    id String
    The provider-assigned unique ID for this managed resource.
    integrationId String
    Unique identifier of the log integration configuration.
    kmsKey String
    logTypes List<String>
    Array of log types exported by this integration.
    otelEndpoint String
    otelSuppliedHeaders List<GetLogIntegrationOtelSuppliedHeader>
    prefixPath String
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    region String
    roleId String
    storageAccountName String
    storageContainerName String
    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
    bucketName string
    hecToken string
    hecUrl string
    iamRoleId string
    id string
    The provider-assigned unique ID for this managed resource.
    integrationId string
    Unique identifier of the log integration configuration.
    kmsKey string
    logTypes string[]
    Array of log types exported by this integration.
    otelEndpoint string
    otelSuppliedHeaders GetLogIntegrationOtelSuppliedHeader[]
    prefixPath string
    projectId string
    Unique 24-hexadecimal digit string that identifies your project.
    region string
    roleId string
    storageAccountName string
    storageContainerName string
    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 str
    bucket_name str
    hec_token str
    hec_url str
    iam_role_id str
    id str
    The provider-assigned unique ID for this managed resource.
    integration_id str
    Unique identifier of the log integration configuration.
    kms_key str
    log_types Sequence[str]
    Array of log types exported by this integration.
    otel_endpoint str
    otel_supplied_headers Sequence[GetLogIntegrationOtelSuppliedHeader]
    prefix_path str
    project_id str
    Unique 24-hexadecimal digit string that identifies your project.
    region str
    role_id str
    storage_account_name str
    storage_container_name str
    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.
    apiKey String
    bucketName String
    hecToken String
    hecUrl String
    iamRoleId String
    id String
    The provider-assigned unique ID for this managed resource.
    integrationId String
    Unique identifier of the log integration configuration.
    kmsKey String
    logTypes List<String>
    Array of log types exported by this integration.
    otelEndpoint String
    otelSuppliedHeaders List<Property Map>
    prefixPath String
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    region String
    roleId String
    storageAccountName String
    storageContainerName String
    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.

    Supporting Types

    GetLogIntegrationOtelSuppliedHeader

    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.

    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.5.0
    published on Thursday, Mar 12, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.