> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vantage.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# vantage_segment (Resource)

> Terraform resource reference for vantage_segment (Resource). Auto-generated from the vantage-sh/terraform-provider-vantage repository.

<Note>
  This page is auto-generated based on the official [Terraform documentation](https://registry.terraform.io/providers/vantage-sh/vantage/latest/docs).
</Note>

## Overview

Use this resource with the [Vantage Terraform provider](/terraform). For installation and authentication, see the [Terraform provider quickstart](/terraform#quickstart). The schema below is generated directly from the provider source.

Manages a Segment.

## Example Usage

```terraform theme={null}
resource "vantage_segment" "demo_segment" {
  title = "Demo Segment"
  description = "This is still a demo segment"
  priority = 50
  track_unallocated = false
  filter = "(costs.provider = 'aws' AND tags.name = NULL)"

  # either provide workspace_token or parent_segment_token
  workspace_token = "wrkspc_47c3254c790e9351"
  # parent_segment_token = "fltr_sgmt_1e866feb74f0b1b4"
}
```

## Schema

### Required

* `title` (String) The title of the Segment.

### Optional

* `description` (String) The description of the Segment.
* `filter` (String) The filter query language to apply to the Segment. Additional documentation available at [https://docs.vantage.sh/vql](https://docs.vantage.sh/vql).
* `parent_segment_token` (String) The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
* `priority` (Number) The priority of the Segment.
* `track_unallocated` (Boolean) Whether or not to track unallocated resources in this Segment.
* `workspace_token` (String) Workspace token to add the segment to.

### Read-Only

* `report_token` (String) Token of the report for this segment.
* `token` (String) Unique segment identifier
