1. Packages
  2. Datadog Provider
  3. API Docs
  4. CustomAllocationRule
Datadog v4.58.0 published on Thursday, Oct 16, 2025 by Pulumi

datadog.CustomAllocationRule

Deploy with Pulumi
datadog logo
Datadog v4.58.0 published on Thursday, Oct 16, 2025 by Pulumi

    Provides a Datadog Custom Allocation Rule resource. Custom allocation rules allow you to allocate cloud costs based on tags and filters.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      # Create new datadog_custom_allocation_rule resource
      myAllocationRule:
        type: datadog:CustomAllocationRule
        name: my_allocation_rule
        properties:
          costsToAllocates:
            - condition: is
              tag: aws_product
              value: ec2
          enabled: true
          providernames:
            - aws
          ruleName: my-allocation-rule
          strategy:
            - allocatedByTagKeys:
                - team
              basedOnCosts:
                - condition: is
                  tag: env
                  value: prod
              granularity: daily
              method: even
    

    Create CustomAllocationRule Resource

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

    Constructor syntax

    new CustomAllocationRule(name: string, args: CustomAllocationRuleArgs, opts?: CustomResourceOptions);
    @overload
    def CustomAllocationRule(resource_name: str,
                             args: CustomAllocationRuleArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomAllocationRule(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             enabled: Optional[bool] = None,
                             providernames: Optional[Sequence[str]] = None,
                             rule_name: Optional[str] = None,
                             costs_to_allocates: Optional[Sequence[CustomAllocationRuleCostsToAllocateArgs]] = None,
                             strategy: Optional[CustomAllocationRuleStrategyArgs] = None)
    func NewCustomAllocationRule(ctx *Context, name string, args CustomAllocationRuleArgs, opts ...ResourceOption) (*CustomAllocationRule, error)
    public CustomAllocationRule(string name, CustomAllocationRuleArgs args, CustomResourceOptions? opts = null)
    public CustomAllocationRule(String name, CustomAllocationRuleArgs args)
    public CustomAllocationRule(String name, CustomAllocationRuleArgs args, CustomResourceOptions options)
    
    type: datadog:CustomAllocationRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CustomAllocationRuleArgs
    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 CustomAllocationRuleArgs
    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 CustomAllocationRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomAllocationRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomAllocationRuleArgs
    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 customAllocationRuleResource = new Datadog.CustomAllocationRule("customAllocationRuleResource", new()
    {
        Enabled = false,
        Providernames = new[]
        {
            "string",
        },
        RuleName = "string",
        CostsToAllocates = new[]
        {
            new Datadog.Inputs.CustomAllocationRuleCostsToAllocateArgs
            {
                Condition = "string",
                Tag = "string",
                Value = "string",
                Values = new[]
                {
                    "string",
                },
            },
        },
        Strategy = new Datadog.Inputs.CustomAllocationRuleStrategyArgs
        {
            AllocatedBies = new[]
            {
                new Datadog.Inputs.CustomAllocationRuleStrategyAllocatedByArgs
                {
                    AllocatedTags = new[]
                    {
                        new Datadog.Inputs.CustomAllocationRuleStrategyAllocatedByAllocatedTagArgs
                        {
                            Key = "string",
                            Value = "string",
                        },
                    },
                    Percentage = 0,
                },
            },
            AllocatedByFilters = new[]
            {
                new Datadog.Inputs.CustomAllocationRuleStrategyAllocatedByFilterArgs
                {
                    Condition = "string",
                    Tag = "string",
                    Value = "string",
                    Values = new[]
                    {
                        "string",
                    },
                },
            },
            AllocatedByTagKeys = new[]
            {
                "string",
            },
            BasedOnCosts = new[]
            {
                new Datadog.Inputs.CustomAllocationRuleStrategyBasedOnCostArgs
                {
                    Condition = "string",
                    Tag = "string",
                    Value = "string",
                    Values = new[]
                    {
                        "string",
                    },
                },
            },
            BasedOnTimeseries = null,
            EvaluateGroupedByFilters = new[]
            {
                new Datadog.Inputs.CustomAllocationRuleStrategyEvaluateGroupedByFilterArgs
                {
                    Condition = "string",
                    Tag = "string",
                    Value = "string",
                    Values = new[]
                    {
                        "string",
                    },
                },
            },
            EvaluateGroupedByTagKeys = new[]
            {
                "string",
            },
            Granularity = "string",
            Method = "string",
        },
    });
    
    example, err := datadog.NewCustomAllocationRule(ctx, "customAllocationRuleResource", &datadog.CustomAllocationRuleArgs{
    	Enabled: pulumi.Bool(false),
    	Providernames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RuleName: pulumi.String("string"),
    	CostsToAllocates: datadog.CustomAllocationRuleCostsToAllocateArray{
    		&datadog.CustomAllocationRuleCostsToAllocateArgs{
    			Condition: pulumi.String("string"),
    			Tag:       pulumi.String("string"),
    			Value:     pulumi.String("string"),
    			Values: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Strategy: &datadog.CustomAllocationRuleStrategyArgs{
    		AllocatedBies: datadog.CustomAllocationRuleStrategyAllocatedByArray{
    			&datadog.CustomAllocationRuleStrategyAllocatedByArgs{
    				AllocatedTags: datadog.CustomAllocationRuleStrategyAllocatedByAllocatedTagArray{
    					&datadog.CustomAllocationRuleStrategyAllocatedByAllocatedTagArgs{
    						Key:   pulumi.String("string"),
    						Value: pulumi.String("string"),
    					},
    				},
    				Percentage: pulumi.Float64(0),
    			},
    		},
    		AllocatedByFilters: datadog.CustomAllocationRuleStrategyAllocatedByFilterArray{
    			&datadog.CustomAllocationRuleStrategyAllocatedByFilterArgs{
    				Condition: pulumi.String("string"),
    				Tag:       pulumi.String("string"),
    				Value:     pulumi.String("string"),
    				Values: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    		AllocatedByTagKeys: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		BasedOnCosts: datadog.CustomAllocationRuleStrategyBasedOnCostArray{
    			&datadog.CustomAllocationRuleStrategyBasedOnCostArgs{
    				Condition: pulumi.String("string"),
    				Tag:       pulumi.String("string"),
    				Value:     pulumi.String("string"),
    				Values: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    		BasedOnTimeseries: &datadog.CustomAllocationRuleStrategyBasedOnTimeseriesArgs{},
    		EvaluateGroupedByFilters: datadog.CustomAllocationRuleStrategyEvaluateGroupedByFilterArray{
    			&datadog.CustomAllocationRuleStrategyEvaluateGroupedByFilterArgs{
    				Condition: pulumi.String("string"),
    				Tag:       pulumi.String("string"),
    				Value:     pulumi.String("string"),
    				Values: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    		EvaluateGroupedByTagKeys: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Granularity: pulumi.String("string"),
    		Method:      pulumi.String("string"),
    	},
    })
    
    var customAllocationRuleResource = new CustomAllocationRule("customAllocationRuleResource", CustomAllocationRuleArgs.builder()
        .enabled(false)
        .providernames("string")
        .ruleName("string")
        .costsToAllocates(CustomAllocationRuleCostsToAllocateArgs.builder()
            .condition("string")
            .tag("string")
            .value("string")
            .values("string")
            .build())
        .strategy(CustomAllocationRuleStrategyArgs.builder()
            .allocatedBies(CustomAllocationRuleStrategyAllocatedByArgs.builder()
                .allocatedTags(CustomAllocationRuleStrategyAllocatedByAllocatedTagArgs.builder()
                    .key("string")
                    .value("string")
                    .build())
                .percentage(0.0)
                .build())
            .allocatedByFilters(CustomAllocationRuleStrategyAllocatedByFilterArgs.builder()
                .condition("string")
                .tag("string")
                .value("string")
                .values("string")
                .build())
            .allocatedByTagKeys("string")
            .basedOnCosts(CustomAllocationRuleStrategyBasedOnCostArgs.builder()
                .condition("string")
                .tag("string")
                .value("string")
                .values("string")
                .build())
            .basedOnTimeseries(CustomAllocationRuleStrategyBasedOnTimeseriesArgs.builder()
                .build())
            .evaluateGroupedByFilters(CustomAllocationRuleStrategyEvaluateGroupedByFilterArgs.builder()
                .condition("string")
                .tag("string")
                .value("string")
                .values("string")
                .build())
            .evaluateGroupedByTagKeys("string")
            .granularity("string")
            .method("string")
            .build())
        .build());
    
    custom_allocation_rule_resource = datadog.CustomAllocationRule("customAllocationRuleResource",
        enabled=False,
        providernames=["string"],
        rule_name="string",
        costs_to_allocates=[{
            "condition": "string",
            "tag": "string",
            "value": "string",
            "values": ["string"],
        }],
        strategy={
            "allocated_bies": [{
                "allocated_tags": [{
                    "key": "string",
                    "value": "string",
                }],
                "percentage": 0,
            }],
            "allocated_by_filters": [{
                "condition": "string",
                "tag": "string",
                "value": "string",
                "values": ["string"],
            }],
            "allocated_by_tag_keys": ["string"],
            "based_on_costs": [{
                "condition": "string",
                "tag": "string",
                "value": "string",
                "values": ["string"],
            }],
            "based_on_timeseries": {},
            "evaluate_grouped_by_filters": [{
                "condition": "string",
                "tag": "string",
                "value": "string",
                "values": ["string"],
            }],
            "evaluate_grouped_by_tag_keys": ["string"],
            "granularity": "string",
            "method": "string",
        })
    
    const customAllocationRuleResource = new datadog.CustomAllocationRule("customAllocationRuleResource", {
        enabled: false,
        providernames: ["string"],
        ruleName: "string",
        costsToAllocates: [{
            condition: "string",
            tag: "string",
            value: "string",
            values: ["string"],
        }],
        strategy: {
            allocatedBies: [{
                allocatedTags: [{
                    key: "string",
                    value: "string",
                }],
                percentage: 0,
            }],
            allocatedByFilters: [{
                condition: "string",
                tag: "string",
                value: "string",
                values: ["string"],
            }],
            allocatedByTagKeys: ["string"],
            basedOnCosts: [{
                condition: "string",
                tag: "string",
                value: "string",
                values: ["string"],
            }],
            basedOnTimeseries: {},
            evaluateGroupedByFilters: [{
                condition: "string",
                tag: "string",
                value: "string",
                values: ["string"],
            }],
            evaluateGroupedByTagKeys: ["string"],
            granularity: "string",
            method: "string",
        },
    });
    
    type: datadog:CustomAllocationRule
    properties:
        costsToAllocates:
            - condition: string
              tag: string
              value: string
              values:
                - string
        enabled: false
        providernames:
            - string
        ruleName: string
        strategy:
            allocatedBies:
                - allocatedTags:
                    - key: string
                      value: string
                  percentage: 0
            allocatedByFilters:
                - condition: string
                  tag: string
                  value: string
                  values:
                    - string
            allocatedByTagKeys:
                - string
            basedOnCosts:
                - condition: string
                  tag: string
                  value: string
                  values:
                    - string
            basedOnTimeseries: {}
            evaluateGroupedByFilters:
                - condition: string
                  tag: string
                  value: string
                  values:
                    - string
            evaluateGroupedByTagKeys:
                - string
            granularity: string
            method: string
    

    CustomAllocationRule 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 CustomAllocationRule resource accepts the following input properties:

    Enabled bool
    Whether the custom allocation rule is enabled.
    Providernames List<string>
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    RuleName string
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    CostsToAllocates List<CustomAllocationRuleCostsToAllocate>
    Strategy CustomAllocationRuleStrategy
    Enabled bool
    Whether the custom allocation rule is enabled.
    Providernames []string
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    RuleName string
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    CostsToAllocates []CustomAllocationRuleCostsToAllocateArgs
    Strategy CustomAllocationRuleStrategyArgs
    enabled Boolean
    Whether the custom allocation rule is enabled.
    providernames List<String>
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    ruleName String
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    costsToAllocates List<CustomAllocationRuleCostsToAllocate>
    strategy CustomAllocationRuleStrategy
    enabled boolean
    Whether the custom allocation rule is enabled.
    providernames string[]
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    ruleName string
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    costsToAllocates CustomAllocationRuleCostsToAllocate[]
    strategy CustomAllocationRuleStrategy
    enabled bool
    Whether the custom allocation rule is enabled.
    providernames Sequence[str]
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    rule_name str
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    costs_to_allocates Sequence[CustomAllocationRuleCostsToAllocateArgs]
    strategy CustomAllocationRuleStrategyArgs
    enabled Boolean
    Whether the custom allocation rule is enabled.
    providernames List<String>
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    ruleName String
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    costsToAllocates List<Property Map>
    strategy Property Map

    Outputs

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

    Created string
    The timestamp (in ISO 8601 format) when the rule was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedUserUuid string
    The UUID of the user who last modified the rule.
    OrderId int
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    Rejected bool
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    Updated string
    The timestamp (in ISO 8601 format) when the rule was last updated.
    Version int
    The version number of the rule. This increments each time the rule is updated.
    Created string
    The timestamp (in ISO 8601 format) when the rule was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedUserUuid string
    The UUID of the user who last modified the rule.
    OrderId int
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    Rejected bool
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    Updated string
    The timestamp (in ISO 8601 format) when the rule was last updated.
    Version int
    The version number of the rule. This increments each time the rule is updated.
    created String
    The timestamp (in ISO 8601 format) when the rule was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedUserUuid String
    The UUID of the user who last modified the rule.
    orderId Integer
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    rejected Boolean
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    updated String
    The timestamp (in ISO 8601 format) when the rule was last updated.
    version Integer
    The version number of the rule. This increments each time the rule is updated.
    created string
    The timestamp (in ISO 8601 format) when the rule was created.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModifiedUserUuid string
    The UUID of the user who last modified the rule.
    orderId number
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    rejected boolean
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    updated string
    The timestamp (in ISO 8601 format) when the rule was last updated.
    version number
    The version number of the rule. This increments each time the rule is updated.
    created str
    The timestamp (in ISO 8601 format) when the rule was created.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified_user_uuid str
    The UUID of the user who last modified the rule.
    order_id int
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    rejected bool
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    updated str
    The timestamp (in ISO 8601 format) when the rule was last updated.
    version int
    The version number of the rule. This increments each time the rule is updated.
    created String
    The timestamp (in ISO 8601 format) when the rule was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedUserUuid String
    The UUID of the user who last modified the rule.
    orderId Number
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    rejected Boolean
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    updated String
    The timestamp (in ISO 8601 format) when the rule was last updated.
    version Number
    The version number of the rule. This increments each time the rule is updated.

    Look up Existing CustomAllocationRule Resource

    Get an existing CustomAllocationRule 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?: CustomAllocationRuleState, opts?: CustomResourceOptions): CustomAllocationRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            costs_to_allocates: Optional[Sequence[CustomAllocationRuleCostsToAllocateArgs]] = None,
            created: Optional[str] = None,
            enabled: Optional[bool] = None,
            last_modified_user_uuid: Optional[str] = None,
            order_id: Optional[int] = None,
            providernames: Optional[Sequence[str]] = None,
            rejected: Optional[bool] = None,
            rule_name: Optional[str] = None,
            strategy: Optional[CustomAllocationRuleStrategyArgs] = None,
            updated: Optional[str] = None,
            version: Optional[int] = None) -> CustomAllocationRule
    func GetCustomAllocationRule(ctx *Context, name string, id IDInput, state *CustomAllocationRuleState, opts ...ResourceOption) (*CustomAllocationRule, error)
    public static CustomAllocationRule Get(string name, Input<string> id, CustomAllocationRuleState? state, CustomResourceOptions? opts = null)
    public static CustomAllocationRule get(String name, Output<String> id, CustomAllocationRuleState state, CustomResourceOptions options)
    resources:  _:    type: datadog:CustomAllocationRule    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CostsToAllocates List<CustomAllocationRuleCostsToAllocate>
    Created string
    The timestamp (in ISO 8601 format) when the rule was created.
    Enabled bool
    Whether the custom allocation rule is enabled.
    LastModifiedUserUuid string
    The UUID of the user who last modified the rule.
    OrderId int
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    Providernames List<string>
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    Rejected bool
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    RuleName string
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    Strategy CustomAllocationRuleStrategy
    Updated string
    The timestamp (in ISO 8601 format) when the rule was last updated.
    Version int
    The version number of the rule. This increments each time the rule is updated.
    CostsToAllocates []CustomAllocationRuleCostsToAllocateArgs
    Created string
    The timestamp (in ISO 8601 format) when the rule was created.
    Enabled bool
    Whether the custom allocation rule is enabled.
    LastModifiedUserUuid string
    The UUID of the user who last modified the rule.
    OrderId int
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    Providernames []string
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    Rejected bool
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    RuleName string
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    Strategy CustomAllocationRuleStrategyArgs
    Updated string
    The timestamp (in ISO 8601 format) when the rule was last updated.
    Version int
    The version number of the rule. This increments each time the rule is updated.
    costsToAllocates List<CustomAllocationRuleCostsToAllocate>
    created String
    The timestamp (in ISO 8601 format) when the rule was created.
    enabled Boolean
    Whether the custom allocation rule is enabled.
    lastModifiedUserUuid String
    The UUID of the user who last modified the rule.
    orderId Integer
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    providernames List<String>
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    rejected Boolean
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    ruleName String
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    strategy CustomAllocationRuleStrategy
    updated String
    The timestamp (in ISO 8601 format) when the rule was last updated.
    version Integer
    The version number of the rule. This increments each time the rule is updated.
    costsToAllocates CustomAllocationRuleCostsToAllocate[]
    created string
    The timestamp (in ISO 8601 format) when the rule was created.
    enabled boolean
    Whether the custom allocation rule is enabled.
    lastModifiedUserUuid string
    The UUID of the user who last modified the rule.
    orderId number
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    providernames string[]
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    rejected boolean
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    ruleName string
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    strategy CustomAllocationRuleStrategy
    updated string
    The timestamp (in ISO 8601 format) when the rule was last updated.
    version number
    The version number of the rule. This increments each time the rule is updated.
    costs_to_allocates Sequence[CustomAllocationRuleCostsToAllocateArgs]
    created str
    The timestamp (in ISO 8601 format) when the rule was created.
    enabled bool
    Whether the custom allocation rule is enabled.
    last_modified_user_uuid str
    The UUID of the user who last modified the rule.
    order_id int
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    providernames Sequence[str]
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    rejected bool
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    rule_name str
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    strategy CustomAllocationRuleStrategyArgs
    updated str
    The timestamp (in ISO 8601 format) when the rule was last updated.
    version int
    The version number of the rule. This increments each time the rule is updated.
    costsToAllocates List<Property Map>
    created String
    The timestamp (in ISO 8601 format) when the rule was created.
    enabled Boolean
    Whether the custom allocation rule is enabled.
    lastModifiedUserUuid String
    The UUID of the user who last modified the rule.
    orderId Number
    The order of the rule in the list of custom allocation rules. This field is read-only. Use the datadog.CustomAllocationRules resource to manage rule order.
    providernames List<String>
    List of cloud providers the rule applies to. Valid values include aws, azure, and gcp.
    rejected Boolean
    Whether the rule was rejected by the API during creation due to validation errors. This field is read-only.
    ruleName String
    The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource.
    strategy Property Map
    updated String
    The timestamp (in ISO 8601 format) when the rule was last updated.
    version Number
    The version number of the rule. This increments each time the rule is updated.

    Supporting Types

    CustomAllocationRuleCostsToAllocate, CustomAllocationRuleCostsToAllocateArgs

    Condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    Tag string
    The tag key to filter on (e.g., aws_product, team, environment).
    Value string
    The single tag value to match. Use this field for conditions like =, !=, is, is not, like. Do not use with in or not in conditions.
    Values List<string>
    A list of tag values to match. Use this field for in or not in conditions only. Do not use with single-value conditions.
    Condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    Tag string
    The tag key to filter on (e.g., aws_product, team, environment).
    Value string
    The single tag value to match. Use this field for conditions like =, !=, is, is not, like. Do not use with in or not in conditions.
    Values []string
    A list of tag values to match. Use this field for in or not in conditions only. Do not use with single-value conditions.
    condition String
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag String
    The tag key to filter on (e.g., aws_product, team, environment).
    value String
    The single tag value to match. Use this field for conditions like =, !=, is, is not, like. Do not use with in or not in conditions.
    values List<String>
    A list of tag values to match. Use this field for in or not in conditions only. Do not use with single-value conditions.
    condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag string
    The tag key to filter on (e.g., aws_product, team, environment).
    value string
    The single tag value to match. Use this field for conditions like =, !=, is, is not, like. Do not use with in or not in conditions.
    values string[]
    A list of tag values to match. Use this field for in or not in conditions only. Do not use with single-value conditions.
    condition str
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag str
    The tag key to filter on (e.g., aws_product, team, environment).
    value str
    The single tag value to match. Use this field for conditions like =, !=, is, is not, like. Do not use with in or not in conditions.
    values Sequence[str]
    A list of tag values to match. Use this field for in or not in conditions only. Do not use with single-value conditions.
    condition String
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag String
    The tag key to filter on (e.g., aws_product, team, environment).
    value String
    The single tag value to match. Use this field for conditions like =, !=, is, is not, like. Do not use with in or not in conditions.
    values List<String>
    A list of tag values to match. Use this field for in or not in conditions only. Do not use with single-value conditions.

    CustomAllocationRuleStrategy, CustomAllocationRuleStrategyArgs

    AllocatedBies List<CustomAllocationRuleStrategyAllocatedBy>
    AllocatedByFilters List<CustomAllocationRuleStrategyAllocatedByFilter>
    AllocatedByTagKeys List<string>
    List of tag keys used to allocate costs (e.g., ["team", "project"]). Costs will be distributed across unique values of these tags.
    BasedOnCosts List<CustomAllocationRuleStrategyBasedOnCost>
    BasedOnTimeseries CustomAllocationRuleStrategyBasedOnTimeseries
    EvaluateGroupedByFilters List<CustomAllocationRuleStrategyEvaluateGroupedByFilter>
    EvaluateGroupedByTagKeys List<string>
    List of tag keys used to group costs before allocation. Costs are grouped by these tag values before applying the allocation strategy.
    Granularity string
    The granularity level for cost allocation. Valid values are daily or monthly.
    Method string
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    AllocatedBies []CustomAllocationRuleStrategyAllocatedBy
    AllocatedByFilters []CustomAllocationRuleStrategyAllocatedByFilter
    AllocatedByTagKeys []string
    List of tag keys used to allocate costs (e.g., ["team", "project"]). Costs will be distributed across unique values of these tags.
    BasedOnCosts []CustomAllocationRuleStrategyBasedOnCost
    BasedOnTimeseries CustomAllocationRuleStrategyBasedOnTimeseries
    EvaluateGroupedByFilters []CustomAllocationRuleStrategyEvaluateGroupedByFilter
    EvaluateGroupedByTagKeys []string
    List of tag keys used to group costs before allocation. Costs are grouped by these tag values before applying the allocation strategy.
    Granularity string
    The granularity level for cost allocation. Valid values are daily or monthly.
    Method string
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    allocatedBies List<CustomAllocationRuleStrategyAllocatedBy>
    allocatedByFilters List<CustomAllocationRuleStrategyAllocatedByFilter>
    allocatedByTagKeys List<String>
    List of tag keys used to allocate costs (e.g., ["team", "project"]). Costs will be distributed across unique values of these tags.
    basedOnCosts List<CustomAllocationRuleStrategyBasedOnCost>
    basedOnTimeseries CustomAllocationRuleStrategyBasedOnTimeseries
    evaluateGroupedByFilters List<CustomAllocationRuleStrategyEvaluateGroupedByFilter>
    evaluateGroupedByTagKeys List<String>
    List of tag keys used to group costs before allocation. Costs are grouped by these tag values before applying the allocation strategy.
    granularity String
    The granularity level for cost allocation. Valid values are daily or monthly.
    method String
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    allocatedBies CustomAllocationRuleStrategyAllocatedBy[]
    allocatedByFilters CustomAllocationRuleStrategyAllocatedByFilter[]
    allocatedByTagKeys string[]
    List of tag keys used to allocate costs (e.g., ["team", "project"]). Costs will be distributed across unique values of these tags.
    basedOnCosts CustomAllocationRuleStrategyBasedOnCost[]
    basedOnTimeseries CustomAllocationRuleStrategyBasedOnTimeseries
    evaluateGroupedByFilters CustomAllocationRuleStrategyEvaluateGroupedByFilter[]
    evaluateGroupedByTagKeys string[]
    List of tag keys used to group costs before allocation. Costs are grouped by these tag values before applying the allocation strategy.
    granularity string
    The granularity level for cost allocation. Valid values are daily or monthly.
    method string
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    allocated_bies Sequence[CustomAllocationRuleStrategyAllocatedBy]
    allocated_by_filters Sequence[CustomAllocationRuleStrategyAllocatedByFilter]
    allocated_by_tag_keys Sequence[str]
    List of tag keys used to allocate costs (e.g., ["team", "project"]). Costs will be distributed across unique values of these tags.
    based_on_costs Sequence[CustomAllocationRuleStrategyBasedOnCost]
    based_on_timeseries CustomAllocationRuleStrategyBasedOnTimeseries
    evaluate_grouped_by_filters Sequence[CustomAllocationRuleStrategyEvaluateGroupedByFilter]
    evaluate_grouped_by_tag_keys Sequence[str]
    List of tag keys used to group costs before allocation. Costs are grouped by these tag values before applying the allocation strategy.
    granularity str
    The granularity level for cost allocation. Valid values are daily or monthly.
    method str
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    allocatedBies List<Property Map>
    allocatedByFilters List<Property Map>
    allocatedByTagKeys List<String>
    List of tag keys used to allocate costs (e.g., ["team", "project"]). Costs will be distributed across unique values of these tags.
    basedOnCosts List<Property Map>
    basedOnTimeseries Property Map
    evaluateGroupedByFilters List<Property Map>
    evaluateGroupedByTagKeys List<String>
    List of tag keys used to group costs before allocation. Costs are grouped by these tag values before applying the allocation strategy.
    granularity String
    The granularity level for cost allocation. Valid values are daily or monthly.
    method String
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.

    CustomAllocationRuleStrategyAllocatedBy, CustomAllocationRuleStrategyAllocatedByArgs

    AllocatedTags List<CustomAllocationRuleStrategyAllocatedByAllocatedTag>
    Percentage double
    The percentage of costs to allocate to this target as a decimal (e.g., 0.33 for 33%). Used when method is percent.
    AllocatedTags []CustomAllocationRuleStrategyAllocatedByAllocatedTag
    Percentage float64
    The percentage of costs to allocate to this target as a decimal (e.g., 0.33 for 33%). Used when method is percent.
    allocatedTags List<CustomAllocationRuleStrategyAllocatedByAllocatedTag>
    percentage Double
    The percentage of costs to allocate to this target as a decimal (e.g., 0.33 for 33%). Used when method is percent.
    allocatedTags CustomAllocationRuleStrategyAllocatedByAllocatedTag[]
    percentage number
    The percentage of costs to allocate to this target as a decimal (e.g., 0.33 for 33%). Used when method is percent.
    allocated_tags Sequence[CustomAllocationRuleStrategyAllocatedByAllocatedTag]
    percentage float
    The percentage of costs to allocate to this target as a decimal (e.g., 0.33 for 33%). Used when method is percent.
    allocatedTags List<Property Map>
    percentage Number
    The percentage of costs to allocate to this target as a decimal (e.g., 0.33 for 33%). Used when method is percent.

    CustomAllocationRuleStrategyAllocatedByAllocatedTag, CustomAllocationRuleStrategyAllocatedByAllocatedTagArgs

    Key string
    The tag key to allocate costs to (e.g., team, environment).
    Value string
    The tag value to allocate costs to (e.g., backend, production).
    Key string
    The tag key to allocate costs to (e.g., team, environment).
    Value string
    The tag value to allocate costs to (e.g., backend, production).
    key String
    The tag key to allocate costs to (e.g., team, environment).
    value String
    The tag value to allocate costs to (e.g., backend, production).
    key string
    The tag key to allocate costs to (e.g., team, environment).
    value string
    The tag value to allocate costs to (e.g., backend, production).
    key str
    The tag key to allocate costs to (e.g., team, environment).
    value str
    The tag value to allocate costs to (e.g., backend, production).
    key String
    The tag key to allocate costs to (e.g., team, environment).
    value String
    The tag value to allocate costs to (e.g., backend, production).

    CustomAllocationRuleStrategyAllocatedByFilter, CustomAllocationRuleStrategyAllocatedByFilterArgs

    Condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    Tag string
    The tag key to filter on for allocation targets.
    Value string
    The single tag value to match for allocation. Use with conditions like =, !=, is, is not, like.
    Values List<string>
    A list of tag values to match for allocation. Use with in or not in conditions.
    Condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    Tag string
    The tag key to filter on for allocation targets.
    Value string
    The single tag value to match for allocation. Use with conditions like =, !=, is, is not, like.
    Values []string
    A list of tag values to match for allocation. Use with in or not in conditions.
    condition String
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag String
    The tag key to filter on for allocation targets.
    value String
    The single tag value to match for allocation. Use with conditions like =, !=, is, is not, like.
    values List<String>
    A list of tag values to match for allocation. Use with in or not in conditions.
    condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag string
    The tag key to filter on for allocation targets.
    value string
    The single tag value to match for allocation. Use with conditions like =, !=, is, is not, like.
    values string[]
    A list of tag values to match for allocation. Use with in or not in conditions.
    condition str
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag str
    The tag key to filter on for allocation targets.
    value str
    The single tag value to match for allocation. Use with conditions like =, !=, is, is not, like.
    values Sequence[str]
    A list of tag values to match for allocation. Use with in or not in conditions.
    condition String
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag String
    The tag key to filter on for allocation targets.
    value String
    The single tag value to match for allocation. Use with conditions like =, !=, is, is not, like.
    values List<String>
    A list of tag values to match for allocation. Use with in or not in conditions.

    CustomAllocationRuleStrategyBasedOnCost, CustomAllocationRuleStrategyBasedOnCostArgs

    Condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    Tag string
    The tag key to use as the basis for cost allocation calculations.
    Value string
    The single tag value to use for cost calculations. Use with conditions like =, !=, is, is not, like.
    Values List<string>
    A list of tag values to use for cost calculations. Use with in or not in conditions.
    Condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    Tag string
    The tag key to use as the basis for cost allocation calculations.
    Value string
    The single tag value to use for cost calculations. Use with conditions like =, !=, is, is not, like.
    Values []string
    A list of tag values to use for cost calculations. Use with in or not in conditions.
    condition String
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag String
    The tag key to use as the basis for cost allocation calculations.
    value String
    The single tag value to use for cost calculations. Use with conditions like =, !=, is, is not, like.
    values List<String>
    A list of tag values to use for cost calculations. Use with in or not in conditions.
    condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag string
    The tag key to use as the basis for cost allocation calculations.
    value string
    The single tag value to use for cost calculations. Use with conditions like =, !=, is, is not, like.
    values string[]
    A list of tag values to use for cost calculations. Use with in or not in conditions.
    condition str
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag str
    The tag key to use as the basis for cost allocation calculations.
    value str
    The single tag value to use for cost calculations. Use with conditions like =, !=, is, is not, like.
    values Sequence[str]
    A list of tag values to use for cost calculations. Use with in or not in conditions.
    condition String
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag String
    The tag key to use as the basis for cost allocation calculations.
    value String
    The single tag value to use for cost calculations. Use with conditions like =, !=, is, is not, like.
    values List<String>
    A list of tag values to use for cost calculations. Use with in or not in conditions.

    CustomAllocationRuleStrategyEvaluateGroupedByFilter, CustomAllocationRuleStrategyEvaluateGroupedByFilterArgs

    Condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    Tag string
    The tag key to filter on when grouping costs for evaluation.
    Value string
    The single tag value to match when grouping. Use with conditions like =, !=, is, is not, like.
    Values List<string>
    A list of tag values to match when grouping. Use with in or not in conditions.
    Condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    Tag string
    The tag key to filter on when grouping costs for evaluation.
    Value string
    The single tag value to match when grouping. Use with conditions like =, !=, is, is not, like.
    Values []string
    A list of tag values to match when grouping. Use with in or not in conditions.
    condition String
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag String
    The tag key to filter on when grouping costs for evaluation.
    value String
    The single tag value to match when grouping. Use with conditions like =, !=, is, is not, like.
    values List<String>
    A list of tag values to match when grouping. Use with in or not in conditions.
    condition string
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag string
    The tag key to filter on when grouping costs for evaluation.
    value string
    The single tag value to match when grouping. Use with conditions like =, !=, is, is not, like.
    values string[]
    A list of tag values to match when grouping. Use with in or not in conditions.
    condition str
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag str
    The tag key to filter on when grouping costs for evaluation.
    value str
    The single tag value to match when grouping. Use with conditions like =, !=, is, is not, like.
    values Sequence[str]
    A list of tag values to match when grouping. Use with in or not in conditions.
    condition String
    The condition to match. Valid values are =, !=, is, is not, like, in, not in.
    tag String
    The tag key to filter on when grouping costs for evaluation.
    value String
    The single tag value to match when grouping. Use with conditions like =, !=, is, is not, like.
    values List<String>
    A list of tag values to match when grouping. Use with in or not in conditions.

    Import

    The pulumi import command can be used, for example:

    $ pulumi import datadog:index/customAllocationRule:CustomAllocationRule new_list <rule_id>
    

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

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.58.0 published on Thursday, Oct 16, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate