Skip to content

pruneops_allocation_group (Resource)

A cost allocation group: a business-level bucket (team, project, client) that unifies cost from any provider under one name, shown by Cost Explorer's Allocation Group dimension and usable as a pruneops_budget scope. A cost row belongs to the group when any rule matches.

Example Usage

resource "pruneops_allocation_group" "platform" {
  name = "Platform team"
  rules = [
    { provider_id = "aws", tag_key = "team", tag_value = "platform" },
    { provider_id = "do", tag_key = "project_name (estimated)", tag_value = "platform" },
  ]
}

# Claims the untagged AWS cost: tag_key and tag_value left out.
resource "pruneops_allocation_group" "unallocated_aws" {
  name  = "Untagged AWS"
  rules = [{ provider_id = "aws" }]
}

Schema

Required

Read-Only

  • id (String) Group id, generated by PruneOps.

Nested Schema for rules

Required:

  • provider_id (String) Provider with cost data: aws, cloudflare, do, newrelic, oci, ovh, posthog.

Optional:

  • tag_key (String) Tag key (case-insensitive). Leave tag_key and tag_value empty to claim the provider's untagged rows.
  • tag_value (String) Tag value (case-insensitive).

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import pruneops_allocation_group.platform a235d870