published on Friday, Aug 28, 2026 by Pulumi
published on Friday, Aug 28, 2026 by Pulumi
mongodbatlas.getMetricIntegrations describes all metric integrations configured at the project level.
To use this data source, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.
Note:
integrationTypeandproviderTypeare optional filters that must be specified together. If one is set, the other must also be set.
Example Usage
The following example creates a mongodbatlas.MetricIntegration resource that exports Atlas metrics to an OpenTelemetry-compatible endpoint, then uses this data source to retrieve all metric integrations configured in the project and output their metricIntegrationId values.
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const atlasMetrics = new datadog.index.ApiKey("atlas_metrics", {name: "mongodb-atlas-metrics"});
const exampleMetricIntegration = new mongodbatlas.MetricIntegration("example", {
projectId: project.id,
integrationType: "OTEL",
providerType: "CUSTOM",
authType: "HEADER",
aggregationTemporality: "DELTA",
endpoint: datadogEndpoint,
metricSelections: ["ATLAS_STREAM_PROCESSING"],
headers: [{
name: "dd-api-key",
value: atlasMetrics.key,
}],
});
const example = mongodbatlas.getMetricIntegrationOutput({
projectId: exampleMetricIntegration.projectId,
metricIntegrationId: exampleMetricIntegration.metricIntegrationId,
});
export const metricIntegrationType = example.integrationType;
const exampleGetMetricIntegrations = mongodbatlas.getMetricIntegrationsOutput({
projectId: exampleMetricIntegration.projectId,
});
export const metricIntegrationIds = exampleGetMetricIntegrations.apply(exampleGetMetricIntegrations => .map(r => (r.metricIntegrationId)));
import pulumi
import pulumi_datadog as datadog
import pulumi_mongodbatlas as mongodbatlas
atlas_metrics = datadog.ApiKey("atlas_metrics", name=mongodb-atlas-metrics)
example_metric_integration = mongodbatlas.MetricIntegration("example",
project_id=project["id"],
integration_type="OTEL",
provider_type="CUSTOM",
auth_type="HEADER",
aggregation_temporality="DELTA",
endpoint=datadog_endpoint,
metric_selections=["ATLAS_STREAM_PROCESSING"],
headers=[{
"name": "dd-api-key",
"value": atlas_metrics["key"],
}])
example = mongodbatlas.get_metric_integration_output(project_id=example_metric_integration.project_id,
metric_integration_id=example_metric_integration.metric_integration_id)
pulumi.export("metricIntegrationType", example.integration_type)
example_get_metric_integrations = mongodbatlas.get_metric_integrations_output(project_id=example_metric_integration.project_id)
pulumi.export("metricIntegrationIds", example_get_metric_integrations.apply(lambda example_get_metric_integrations: [r.metric_integration_id for r in example_get_metric_integrations.results]))
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var atlasMetrics = new Datadog.ApiKey("atlas_metrics", new()
{
Name = "mongodb-atlas-metrics",
});
var exampleMetricIntegration = new Mongodbatlas.MetricIntegration("example", new()
{
ProjectId = project.Id,
IntegrationType = "OTEL",
ProviderType = "CUSTOM",
AuthType = "HEADER",
AggregationTemporality = "DELTA",
Endpoint = datadogEndpoint,
MetricSelections = new[]
{
"ATLAS_STREAM_PROCESSING",
},
Headers = new[]
{
new Mongodbatlas.Inputs.MetricIntegrationHeaderArgs
{
Name = "dd-api-key",
Value = atlasMetrics.Key,
},
},
});
var example = Mongodbatlas.GetMetricIntegration.Invoke(new()
{
ProjectId = exampleMetricIntegration.ProjectId,
MetricIntegrationId = exampleMetricIntegration.MetricIntegrationId,
});
var exampleGetMetricIntegrations = Mongodbatlas.GetMetricIntegrations.Invoke(new()
{
ProjectId = exampleMetricIntegration.ProjectId,
});
return new Dictionary<string, object?>
{
["metricIntegrationType"] = example.Apply(getMetricIntegrationResult => getMetricIntegrationResult.IntegrationType),
["metricIntegrationIds"] = .Select(r =>
{
return r.MetricIntegrationId;
}).ToList(),
};
});
Example coming soon!
Example coming soon!
pulumi {
required_providers {
mongodbatlas = {
source = "pulumi/mongodbatlas"
}
}
}
data "mongodbatlas_getmetricintegration" "example" {
project_id = mongodbatlas_metricintegration.example.project_id
metric_integration_id = mongodbatlas_metricintegration.example.metric_integration_id
}
data "mongodbatlas_getmetricintegrations" "exampleGetMetricIntegrations" {
project_id = mongodbatlas_metricintegration.example.project_id
}
resource "datadog_apikey" "atlas_metrics" {
name = "mongodb-atlas-metrics"
}
resource "mongodbatlas_metricintegration" "example" {
project_id = project.id
integration_type = "OTEL"
provider_type = "CUSTOM"
auth_type = "HEADER"
aggregation_temporality = "DELTA"
endpoint = datadogEndpoint
metric_selections = ["ATLAS_STREAM_PROCESSING"]
headers {
name = "dd-api-key"
value = datadog_apikey.atlas_metrics.key
}
}
output "metricIntegrationType" {
value = data.mongodbatlas_getmetricintegration.example.integration_type
}
output "metricIntegrationIds" {
value = [for r in data.mongodbatlas_getmetricintegrations.exampleGetMetricIntegrations.results : r.metricIntegrationId]
}
Further Examples
- Metric Integration Examples
Using getMetricIntegrations
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 getMetricIntegrations(args: GetMetricIntegrationsArgs, opts?: InvokeOptions): Promise<GetMetricIntegrationsResult>
function getMetricIntegrationsOutput(args: GetMetricIntegrationsOutputArgs, opts?: InvokeOutputOptions): Output<GetMetricIntegrationsResult>def get_metric_integrations(integration_type: Optional[str] = None,
project_id: Optional[str] = None,
provider_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMetricIntegrationsResult
def get_metric_integrations_output(integration_type: pulumi.Input[Optional[str]] = None,
project_id: pulumi.Input[Optional[str]] = None,
provider_type: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetMetricIntegrationsResult]func LookupMetricIntegrations(ctx *Context, args *LookupMetricIntegrationsArgs, opts ...InvokeOption) (*LookupMetricIntegrationsResult, error)
func LookupMetricIntegrationsOutput(ctx *Context, args *LookupMetricIntegrationsOutputArgs, opts ...InvokeOption) LookupMetricIntegrationsResultOutput> Note: This function is named LookupMetricIntegrations in the Go SDK.
public static class GetMetricIntegrations
{
public static Task<GetMetricIntegrationsResult> InvokeAsync(GetMetricIntegrationsArgs args, InvokeOptions? opts = null)
public static Output<GetMetricIntegrationsResult> Invoke(GetMetricIntegrationsInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetMetricIntegrationsResult> Invoke(GetMetricIntegrationsInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetMetricIntegrationsResult> getMetricIntegrations(GetMetricIntegrationsArgs args, InvokeOptions options)
public static Output<GetMetricIntegrationsResult> getMetricIntegrations(GetMetricIntegrationsArgs args, InvokeOptions options)
public static Output<GetMetricIntegrationsResult> getMetricIntegrations(GetMetricIntegrationsArgs args, InvokeOutputOptions options)
fn::invoke:
function: mongodbatlas:index/getMetricIntegrations:getMetricIntegrations
arguments:
# arguments dictionarydata "mongodbatlas_get_metric_integrations" "name" {
# arguments
}The following arguments are supported:
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Integration
Type string - Optional filter by integration type (e.g.,
OTEL). - Provider
Type string - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Integration
Type string - Optional filter by integration type (e.g.,
OTEL). - Provider
Type string - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project_
id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - integration_
type string - Optional filter by integration type (e.g.,
OTEL). - provider_
type string - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - integration
Type String - Optional filter by integration type (e.g.,
OTEL). - provider
Type String - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - integration
Type string - Optional filter by integration type (e.g.,
OTEL). - provider
Type string - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project_
id str - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - integration_
type str - Optional filter by integration type (e.g.,
OTEL). - provider_
type str - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - integration
Type String - Optional filter by integration type (e.g.,
OTEL). - provider
Type String - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
getMetricIntegrations Result
The following output properties are available:
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Results
List<Get
Metric Integrations Result> - List of returned documents that MongoDB Cloud provides when completing this request.
- Integration
Type string - Optional filter by integration type (e.g.,
OTEL). - Provider
Type string - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Results
[]Get
Metric Integrations Result - List of returned documents that MongoDB Cloud provides when completing this request.
- Integration
Type string - Optional filter by integration type (e.g.,
OTEL). - Provider
Type string - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project_
id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - results list(object)
- List of returned documents that MongoDB Cloud provides when completing this request.
- integration_
type string - Optional filter by integration type (e.g.,
OTEL). - provider_
type string - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - results
List<Get
Metric Integrations Result> - List of returned documents that MongoDB Cloud provides when completing this request.
- integration
Type String - Optional filter by integration type (e.g.,
OTEL). - provider
Type String - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - results
Get
Metric Integrations Result[] - List of returned documents that MongoDB Cloud provides when completing this request.
- integration
Type string - Optional filter by integration type (e.g.,
OTEL). - provider
Type string - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project_
id str - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - results
Sequence[Get
Metric Integrations Result] - List of returned documents that MongoDB Cloud provides when completing this request.
- integration_
type str - Optional filter by integration type (e.g.,
OTEL). - provider_
type str - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - results List<Property Map>
- List of returned documents that MongoDB Cloud provides when completing this request.
- integration
Type String - Optional filter by integration type (e.g.,
OTEL). - provider
Type String - Optional filter by provider type (e.g.,
CUSTOM). When specified,integrationTypemust also be specified.
Supporting Types
GetMetricIntegrationsResult
- Aggregation
Temporality string - The temporality to send to the metric integration.
- Auth
Type string - Authentication method the integration uses when exporting metrics to the endpoint.
- Endpoint string
- OpenTelemetry collector endpoint URL.
- Headers
Redacteds List<GetMetric Integrations Result Headers Redacted> - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- Integration
Type string - Type of metric integration. Identifies which protocol will be used for the integration.
- Metric
Integration stringId - Unique identifier of the metric integration configuration.
- Metric
Selections List<string> - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- Provider
Type string - The provider type for the metric integration. Identifies the third-party service provider.
- Aggregation
Temporality string - The temporality to send to the metric integration.
- Auth
Type string - Authentication method the integration uses when exporting metrics to the endpoint.
- Endpoint string
- OpenTelemetry collector endpoint URL.
- Headers
Redacteds []GetMetric Integrations Result Headers Redacted - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- Integration
Type string - Type of metric integration. Identifies which protocol will be used for the integration.
- Metric
Integration stringId - Unique identifier of the metric integration configuration.
- Metric
Selections []string - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- Provider
Type string - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation_
temporality string - The temporality to send to the metric integration.
- auth_
type string - Authentication method the integration uses when exporting metrics to the endpoint.
- endpoint string
- OpenTelemetry collector endpoint URL.
- headers_
redacteds list(object) - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration_
type string - Type of metric integration. Identifies which protocol will be used for the integration.
- metric_
integration_ stringid - Unique identifier of the metric integration configuration.
- metric_
selections list(string) - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- provider_
type string - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation
Temporality String - The temporality to send to the metric integration.
- auth
Type String - Authentication method the integration uses when exporting metrics to the endpoint.
- endpoint String
- OpenTelemetry collector endpoint URL.
- headers
Redacteds List<GetMetric Integrations Result Headers Redacted> - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration
Type String - Type of metric integration. Identifies which protocol will be used for the integration.
- metric
Integration StringId - Unique identifier of the metric integration configuration.
- metric
Selections List<String> - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- provider
Type String - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation
Temporality string - The temporality to send to the metric integration.
- auth
Type string - Authentication method the integration uses when exporting metrics to the endpoint.
- endpoint string
- OpenTelemetry collector endpoint URL.
- headers
Redacteds GetMetric Integrations Result Headers Redacted[] - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration
Type string - Type of metric integration. Identifies which protocol will be used for the integration.
- metric
Integration stringId - Unique identifier of the metric integration configuration.
- metric
Selections string[] - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- provider
Type string - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation_
temporality str - The temporality to send to the metric integration.
- auth_
type str - Authentication method the integration uses when exporting metrics to the endpoint.
- endpoint str
- OpenTelemetry collector endpoint URL.
- headers_
redacteds Sequence[GetMetric Integrations Result Headers Redacted] - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration_
type str - Type of metric integration. Identifies which protocol will be used for the integration.
- metric_
integration_ strid - Unique identifier of the metric integration configuration.
- metric_
selections Sequence[str] - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- provider_
type str - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation
Temporality String - The temporality to send to the metric integration.
- auth
Type String - Authentication method the integration uses when exporting metrics to the endpoint.
- endpoint String
- OpenTelemetry collector endpoint URL.
- headers
Redacteds List<Property Map> - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration
Type String - Type of metric integration. Identifies which protocol will be used for the integration.
- metric
Integration StringId - Unique identifier of the metric integration configuration.
- metric
Selections List<String> - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- provider
Type String - The provider type for the metric integration. Identifies the third-party service provider.
GetMetricIntegrationsResultHeadersRedacted
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.
published on Friday, Aug 28, 2026 by Pulumi