published on Monday, May 25, 2026 by Pulumi
published on Monday, May 25, 2026 by Pulumi
Use this resource to manage cardinality limit overrides for a New Relic account.
Dimensional metrics in New Relic are subject to a per-metric cardinality limit — the maximum number of unique attribute-value combinations a single metric name may produce per day. This resource lets you raise or lower that limit, either account-wide (for all metrics at once) or for individual named metrics.
Two modes are available, selected via the required mode argument.
Note: Cardinality limit overrides are managed via reset rather than removal. Running
terraform destroyresets the affected limit(s) back to the platform default of 100,000. The behaviour for each mode is described in the sections below.
DEFAULT Mode
Sets a single account-wide limit that applies to every dimensional metric in the account that does not have its own per-metric override.
Example
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const accountDefault = new newrelic.CardinalityManagement("account_default", {
mode: "DEFAULT",
cardinalityLimit: 150000,
});
import pulumi
import pulumi_newrelic as newrelic
account_default = newrelic.CardinalityManagement("account_default",
mode="DEFAULT",
cardinality_limit=150000)
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewCardinalityManagement(ctx, "account_default", &newrelic.CardinalityManagementArgs{
Mode: pulumi.String("DEFAULT"),
CardinalityLimit: pulumi.Int(150000),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var accountDefault = new NewRelic.CardinalityManagement("account_default", new()
{
Mode = "DEFAULT",
CardinalityLimit = 150000,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.CardinalityManagement;
import com.pulumi.newrelic.CardinalityManagementArgs;
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 accountDefault = new CardinalityManagement("accountDefault", CardinalityManagementArgs.builder()
.mode("DEFAULT")
.cardinalityLimit(150000)
.build());
}
}
resources:
accountDefault:
type: newrelic:CardinalityManagement
name: account_default
properties:
mode: DEFAULT
cardinalityLimit: 150000
pulumi {
required_providers {
newrelic = {
source = "pulumi/newrelic"
}
}
}
resource "newrelic_cardinalitymanagement" "account_default" {
mode = "DEFAULT"
cardinality_limit = 150000
}
Behaviour
pulumi up— submits the new default value. The change takes effect in the enforcement layer straight away.pulumi preview/terraform refreshon an existing resource — reads the current account-wide default and reconciles state. Any drift is surfaced before the next apply.terraform destroy— resets the account-wide default to the platform default of 100,000 and displays a confirmation warning.
Note: Changes may take a few minutes to be visible in the New Relic UI, particularly if affected metrics have not sent data recently.
PER_METRIC Mode
Sets individual cardinality limits for one or more named metrics. Each metric is configured in its own metric block and can have a different limit.
Example — single metric
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const perMetric = new newrelic.CardinalityManagement("per_metric", {
mode: "PER_METRIC",
metrics: [{
name: "http.server.duration",
cardinalityLimit: 200000,
}],
});
import pulumi
import pulumi_newrelic as newrelic
per_metric = newrelic.CardinalityManagement("per_metric",
mode="PER_METRIC",
metrics=[{
"name": "http.server.duration",
"cardinality_limit": 200000,
}])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewCardinalityManagement(ctx, "per_metric", &newrelic.CardinalityManagementArgs{
Mode: pulumi.String("PER_METRIC"),
Metrics: newrelic.CardinalityManagementMetricArray{
&newrelic.CardinalityManagementMetricArgs{
Name: pulumi.String("http.server.duration"),
CardinalityLimit: pulumi.Int(200000),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var perMetric = new NewRelic.CardinalityManagement("per_metric", new()
{
Mode = "PER_METRIC",
Metrics = new[]
{
new NewRelic.Inputs.CardinalityManagementMetricArgs
{
Name = "http.server.duration",
CardinalityLimit = 200000,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.CardinalityManagement;
import com.pulumi.newrelic.CardinalityManagementArgs;
import com.pulumi.newrelic.inputs.CardinalityManagementMetricArgs;
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 perMetric = new CardinalityManagement("perMetric", CardinalityManagementArgs.builder()
.mode("PER_METRIC")
.metrics(CardinalityManagementMetricArgs.builder()
.name("http.server.duration")
.cardinalityLimit(200000)
.build())
.build());
}
}
resources:
perMetric:
type: newrelic:CardinalityManagement
name: per_metric
properties:
mode: PER_METRIC
metrics:
- name: http.server.duration
cardinalityLimit: 200000
pulumi {
required_providers {
newrelic = {
source = "pulumi/newrelic"
}
}
}
resource "newrelic_cardinalitymanagement" "per_metric" {
mode = "PER_METRIC"
metrics {
name = "http.server.duration"
cardinality_limit = 200000
}
}
Example — multiple metrics in one resource
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const highCardinalityMetrics = new newrelic.CardinalityManagement("high_cardinality_metrics", {
mode: "PER_METRIC",
metrics: [
{
name: "http.server.duration",
cardinalityLimit: 200000,
},
{
name: "otelcol_nrreceiver_incoming_request_proxy",
cardinalityLimit: 300000,
},
{
name: "k8s.pod.cpu.usage",
cardinalityLimit: 150000,
},
],
});
import pulumi
import pulumi_newrelic as newrelic
high_cardinality_metrics = newrelic.CardinalityManagement("high_cardinality_metrics",
mode="PER_METRIC",
metrics=[
{
"name": "http.server.duration",
"cardinality_limit": 200000,
},
{
"name": "otelcol_nrreceiver_incoming_request_proxy",
"cardinality_limit": 300000,
},
{
"name": "k8s.pod.cpu.usage",
"cardinality_limit": 150000,
},
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewCardinalityManagement(ctx, "high_cardinality_metrics", &newrelic.CardinalityManagementArgs{
Mode: pulumi.String("PER_METRIC"),
Metrics: newrelic.CardinalityManagementMetricArray{
&newrelic.CardinalityManagementMetricArgs{
Name: pulumi.String("http.server.duration"),
CardinalityLimit: pulumi.Int(200000),
},
&newrelic.CardinalityManagementMetricArgs{
Name: pulumi.String("otelcol_nrreceiver_incoming_request_proxy"),
CardinalityLimit: pulumi.Int(300000),
},
&newrelic.CardinalityManagementMetricArgs{
Name: pulumi.String("k8s.pod.cpu.usage"),
CardinalityLimit: pulumi.Int(150000),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var highCardinalityMetrics = new NewRelic.CardinalityManagement("high_cardinality_metrics", new()
{
Mode = "PER_METRIC",
Metrics = new[]
{
new NewRelic.Inputs.CardinalityManagementMetricArgs
{
Name = "http.server.duration",
CardinalityLimit = 200000,
},
new NewRelic.Inputs.CardinalityManagementMetricArgs
{
Name = "otelcol_nrreceiver_incoming_request_proxy",
CardinalityLimit = 300000,
},
new NewRelic.Inputs.CardinalityManagementMetricArgs
{
Name = "k8s.pod.cpu.usage",
CardinalityLimit = 150000,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.CardinalityManagement;
import com.pulumi.newrelic.CardinalityManagementArgs;
import com.pulumi.newrelic.inputs.CardinalityManagementMetricArgs;
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 highCardinalityMetrics = new CardinalityManagement("highCardinalityMetrics", CardinalityManagementArgs.builder()
.mode("PER_METRIC")
.metrics(
CardinalityManagementMetricArgs.builder()
.name("http.server.duration")
.cardinalityLimit(200000)
.build(),
CardinalityManagementMetricArgs.builder()
.name("otelcol_nrreceiver_incoming_request_proxy")
.cardinalityLimit(300000)
.build(),
CardinalityManagementMetricArgs.builder()
.name("k8s.pod.cpu.usage")
.cardinalityLimit(150000)
.build())
.build());
}
}
resources:
highCardinalityMetrics:
type: newrelic:CardinalityManagement
name: high_cardinality_metrics
properties:
mode: PER_METRIC
metrics:
- name: http.server.duration
cardinalityLimit: 200000
- name: otelcol_nrreceiver_incoming_request_proxy
cardinalityLimit: 300000
- name: k8s.pod.cpu.usage
cardinalityLimit: 150000
pulumi {
required_providers {
newrelic = {
source = "pulumi/newrelic"
}
}
}
resource "newrelic_cardinalitymanagement" "high_cardinality_metrics" {
mode = "PER_METRIC"
metrics {
name = "http.server.duration"
cardinality_limit = 200000
}
metrics {
name = "otelcol_nrreceiver_incoming_request_proxy"
cardinality_limit = 300000
}
metrics {
name = "k8s.pod.cpu.usage"
cardinality_limit = 150000
}
}
Behaviour
pulumi up— submits one override permetricblock. A warning is displayed as a reminder that updates may take a few minutes to be reflected in the UI.pulumi preview/terraform refreshon an existing resource — inPER_METRICmode,cardinalityLimitvalues in state reflect the last configuration applied via terraform — this is the expected behaviour for this mode. A note is displayed as a reminder.terraform destroy— resets each managed metric’s limit to the platform default of 100,000 and displays a confirmation warning.
Note: In
PER_METRICmode, thecardinalityLimitvalues withinmetricblocks reflect the last configuration applied via terraform. If any of these limits have been adjusted outside of terraform, runpulumi upto re-apply the desired values.
Using Both Modes Together
You can manage both the account-wide default and individual metric overrides at the same time:
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const accountDefault = new newrelic.CardinalityManagement("account_default", {
mode: "DEFAULT",
cardinalityLimit: 150000,
});
const perMetric = new newrelic.CardinalityManagement("per_metric", {
mode: "PER_METRIC",
metrics: [
{
name: "http.server.duration",
cardinalityLimit: 250000,
},
{
name: "otelcol_nrreceiver_incoming_request_proxy",
cardinalityLimit: 300000,
},
],
});
import pulumi
import pulumi_newrelic as newrelic
account_default = newrelic.CardinalityManagement("account_default",
mode="DEFAULT",
cardinality_limit=150000)
per_metric = newrelic.CardinalityManagement("per_metric",
mode="PER_METRIC",
metrics=[
{
"name": "http.server.duration",
"cardinality_limit": 250000,
},
{
"name": "otelcol_nrreceiver_incoming_request_proxy",
"cardinality_limit": 300000,
},
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewCardinalityManagement(ctx, "account_default", &newrelic.CardinalityManagementArgs{
Mode: pulumi.String("DEFAULT"),
CardinalityLimit: pulumi.Int(150000),
})
if err != nil {
return err
}
_, err = newrelic.NewCardinalityManagement(ctx, "per_metric", &newrelic.CardinalityManagementArgs{
Mode: pulumi.String("PER_METRIC"),
Metrics: newrelic.CardinalityManagementMetricArray{
&newrelic.CardinalityManagementMetricArgs{
Name: pulumi.String("http.server.duration"),
CardinalityLimit: pulumi.Int(250000),
},
&newrelic.CardinalityManagementMetricArgs{
Name: pulumi.String("otelcol_nrreceiver_incoming_request_proxy"),
CardinalityLimit: pulumi.Int(300000),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var accountDefault = new NewRelic.CardinalityManagement("account_default", new()
{
Mode = "DEFAULT",
CardinalityLimit = 150000,
});
var perMetric = new NewRelic.CardinalityManagement("per_metric", new()
{
Mode = "PER_METRIC",
Metrics = new[]
{
new NewRelic.Inputs.CardinalityManagementMetricArgs
{
Name = "http.server.duration",
CardinalityLimit = 250000,
},
new NewRelic.Inputs.CardinalityManagementMetricArgs
{
Name = "otelcol_nrreceiver_incoming_request_proxy",
CardinalityLimit = 300000,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.CardinalityManagement;
import com.pulumi.newrelic.CardinalityManagementArgs;
import com.pulumi.newrelic.inputs.CardinalityManagementMetricArgs;
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 accountDefault = new CardinalityManagement("accountDefault", CardinalityManagementArgs.builder()
.mode("DEFAULT")
.cardinalityLimit(150000)
.build());
var perMetric = new CardinalityManagement("perMetric", CardinalityManagementArgs.builder()
.mode("PER_METRIC")
.metrics(
CardinalityManagementMetricArgs.builder()
.name("http.server.duration")
.cardinalityLimit(250000)
.build(),
CardinalityManagementMetricArgs.builder()
.name("otelcol_nrreceiver_incoming_request_proxy")
.cardinalityLimit(300000)
.build())
.build());
}
}
resources:
accountDefault:
type: newrelic:CardinalityManagement
name: account_default
properties:
mode: DEFAULT
cardinalityLimit: 150000
perMetric:
type: newrelic:CardinalityManagement
name: per_metric
properties:
mode: PER_METRIC
metrics:
- name: http.server.duration
cardinalityLimit: 250000
- name: otelcol_nrreceiver_incoming_request_proxy
cardinalityLimit: 300000
pulumi {
required_providers {
newrelic = {
source = "pulumi/newrelic"
}
}
}
resource "newrelic_cardinalitymanagement" "account_default" {
mode = "DEFAULT"
cardinality_limit = 150000
}
resource "newrelic_cardinalitymanagement" "per_metric" {
mode = "PER_METRIC"
metrics {
name = "http.server.duration"
cardinality_limit = 250000
}
metrics {
name = "otelcol_nrreceiver_incoming_request_proxy"
cardinality_limit = 300000
}
}
Create CardinalityManagement Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CardinalityManagement(name: string, args: CardinalityManagementArgs, opts?: CustomResourceOptions);@overload
def CardinalityManagement(resource_name: str,
args: CardinalityManagementArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CardinalityManagement(resource_name: str,
opts: Optional[ResourceOptions] = None,
mode: Optional[str] = None,
cardinality_limit: Optional[int] = None,
metrics: Optional[Sequence[CardinalityManagementMetricArgs]] = None)func NewCardinalityManagement(ctx *Context, name string, args CardinalityManagementArgs, opts ...ResourceOption) (*CardinalityManagement, error)public CardinalityManagement(string name, CardinalityManagementArgs args, CustomResourceOptions? opts = null)
public CardinalityManagement(String name, CardinalityManagementArgs args)
public CardinalityManagement(String name, CardinalityManagementArgs args, CustomResourceOptions options)
type: newrelic:CardinalityManagement
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "newrelic_cardinalitymanagement" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args CardinalityManagementArgs
- 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 CardinalityManagementArgs
- 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 CardinalityManagementArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CardinalityManagementArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CardinalityManagementArgs
- 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 cardinalityManagementResource = new NewRelic.CardinalityManagement("cardinalityManagementResource", new()
{
Mode = "string",
CardinalityLimit = 0,
Metrics = new[]
{
new NewRelic.Inputs.CardinalityManagementMetricArgs
{
CardinalityLimit = 0,
Name = "string",
},
},
});
example, err := newrelic.NewCardinalityManagement(ctx, "cardinalityManagementResource", &newrelic.CardinalityManagementArgs{
Mode: pulumi.String("string"),
CardinalityLimit: pulumi.Int(0),
Metrics: newrelic.CardinalityManagementMetricArray{
&newrelic.CardinalityManagementMetricArgs{
CardinalityLimit: pulumi.Int(0),
Name: pulumi.String("string"),
},
},
})
resource "newrelic_cardinalitymanagement" "cardinalityManagementResource" {
mode = "string"
cardinality_limit = 0
metrics {
cardinality_limit = 0
name = "string"
}
}
var cardinalityManagementResource = new CardinalityManagement("cardinalityManagementResource", CardinalityManagementArgs.builder()
.mode("string")
.cardinalityLimit(0)
.metrics(CardinalityManagementMetricArgs.builder()
.cardinalityLimit(0)
.name("string")
.build())
.build());
cardinality_management_resource = newrelic.CardinalityManagement("cardinalityManagementResource",
mode="string",
cardinality_limit=0,
metrics=[{
"cardinality_limit": 0,
"name": "string",
}])
const cardinalityManagementResource = new newrelic.CardinalityManagement("cardinalityManagementResource", {
mode: "string",
cardinalityLimit: 0,
metrics: [{
cardinalityLimit: 0,
name: "string",
}],
});
type: newrelic:CardinalityManagement
properties:
cardinalityLimit: 0
metrics:
- cardinalityLimit: 0
name: string
mode: string
CardinalityManagement 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 CardinalityManagement resource accepts the following input properties:
- Mode string
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- Cardinality
Limit int - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - Metrics
List<Pulumi.
New Relic. Inputs. Cardinality Management Metric> - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports:
- Mode string
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- Cardinality
Limit int - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - Metrics
[]Cardinality
Management Metric Args - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports:
- mode string
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality_
limit number - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics list(object)
- One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports:
- mode String
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality
Limit Integer - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics
List<Cardinality
Management Metric> - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports:
- mode string
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality
Limit number - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics
Cardinality
Management Metric[] - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports:
- mode str
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality_
limit int - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics
Sequence[Cardinality
Management Metric Args] - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports:
- mode String
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality
Limit Number - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics List<Property Map>
- One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports:
Outputs
All input properties are implicitly available as output properties. Additionally, the CardinalityManagement resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CardinalityManagement Resource
Get an existing CardinalityManagement 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?: CardinalityManagementState, opts?: CustomResourceOptions): CardinalityManagement@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cardinality_limit: Optional[int] = None,
metrics: Optional[Sequence[CardinalityManagementMetricArgs]] = None,
mode: Optional[str] = None) -> CardinalityManagementfunc GetCardinalityManagement(ctx *Context, name string, id IDInput, state *CardinalityManagementState, opts ...ResourceOption) (*CardinalityManagement, error)public static CardinalityManagement Get(string name, Input<string> id, CardinalityManagementState? state, CustomResourceOptions? opts = null)public static CardinalityManagement get(String name, Output<String> id, CardinalityManagementState state, CustomResourceOptions options)resources: _: type: newrelic:CardinalityManagement get: id: ${id}import {
to = newrelic_cardinalitymanagement.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.
- Cardinality
Limit int - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - Metrics
List<Pulumi.
New Relic. Inputs. Cardinality Management Metric> - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports: - Mode string
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- Cardinality
Limit int - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - Metrics
[]Cardinality
Management Metric Args - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports: - Mode string
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality_
limit number - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics list(object)
- One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports: - mode string
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality
Limit Integer - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics
List<Cardinality
Management Metric> - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports: - mode String
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality
Limit number - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics
Cardinality
Management Metric[] - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports: - mode string
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality_
limit int - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics
Sequence[Cardinality
Management Metric Args] - One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports: - mode str
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
- cardinality
Limit Number - The account-wide cardinality limit — the maximum number of unique dimension-value combinations allowed per metric per day. Required when
modeis"DEFAULT"; must not be set whenmodeis"PER_METRIC". - metrics List<Property Map>
- One or more metric override blocks. Required when
modeis"PER_METRIC"; must not be set whenmodeis"DEFAULT". Each block supports: - mode String
- The override mode. Accepted values:
"DEFAULT"or"PER_METRIC". Forces re-creation when changed.DEFAULT— sets an account-wide limit for all metrics.cardinalityLimitis required;metricblocks must not be set.PER_METRIC— sets individual limits for named metrics. At least onemetricblock is required;cardinalityLimitmust not be set at the top level.
Supporting Types
CardinalityManagementMetric, CardinalityManagementMetricArgs
- Cardinality
Limit int - The maximum number of unique dimension-value combinations allowed per day for this metric.
- Name string
- The full name of the metric (e.g.
"http.server.duration").
- Cardinality
Limit int - The maximum number of unique dimension-value combinations allowed per day for this metric.
- Name string
- The full name of the metric (e.g.
"http.server.duration").
- cardinality_
limit number - The maximum number of unique dimension-value combinations allowed per day for this metric.
- name string
- The full name of the metric (e.g.
"http.server.duration").
- cardinality
Limit Integer - The maximum number of unique dimension-value combinations allowed per day for this metric.
- name String
- The full name of the metric (e.g.
"http.server.duration").
- cardinality
Limit number - The maximum number of unique dimension-value combinations allowed per day for this metric.
- name string
- The full name of the metric (e.g.
"http.server.duration").
- cardinality_
limit int - The maximum number of unique dimension-value combinations allowed per day for this metric.
- name str
- The full name of the metric (e.g.
"http.server.duration").
- cardinality
Limit Number - The maximum number of unique dimension-value combinations allowed per day for this metric.
- name String
- The full name of the metric (e.g.
"http.server.duration").
Import
Cardinality management resources can be imported using the composite ID format <account_id>:<mode>.
For a DEFAULT override:
$ pulumi import newrelic:index/cardinalityManagement:CardinalityManagement account_default 12345678:DEFAULT
For a PER_METRIC override:
$ pulumi import newrelic:index/cardinalityManagement:CardinalityManagement per_metric 12345678:PER_METRIC
Note: When importing a
PER_METRICresource,metricblocks cannot be auto-populated on import and must be defined manually in your configuration. Runpulumi upafter import to re-apply the desired limits.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.
published on Monday, May 25, 2026 by Pulumi