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

# coreweave_object_storage_bucket_inventory (Resource)

Manages a Coreweave AI Object Storage bucket inventory configuration. [Learn more about inventory reporting](/products/storage/object-storage)

## Example usage

```terraform theme={"system"}
resource "coreweave_object_storage_bucket" "source" {
  name = "inventory-source-example"
  zone = "US-EAST-04A"
}

resource "coreweave_object_storage_bucket" "destination" {
  name = "inventory-destination-example"
  zone = "US-EAST-04A"
}

resource "coreweave_object_storage_bucket_inventory" "default" {
  bucket                   = coreweave_object_storage_bucket.source.name
  name                     = "daily-inventory"
  enabled                  = true
  included_object_versions = "All"

  # Optional: omit entirely to include no extra fields. An empty set is invalid.
  optional_fields = ["Size", "LastModifiedDate", "StorageClass", "ETag"]

  # Optional: limit the report to objects under a prefix.
  filter {
    prefix = "logs/"
  }

  schedule {
    frequency = "Daily"
  }

  destination {
    bucket {
      bucket_arn = "arn:aws:s3:::${coreweave_object_storage_bucket.destination.name}"
      format     = "CSV"
      prefix     = "inventory-reports/"
    }
  }
}
```

## Schema

### Required

* `bucket` (String) Name of source bucket to which the inventory configuration applies
* `included_object_versions` (String) Specifies which object versions are included in the inventory results. Valid values are `All` and `Current`.
* `name` (String) Name of the inventory configuration. Must be unique within the bucket.

### Optional

* `destination` (Block, Optional) Where the inventory report is written. May be the same bucket as the source. (see [below for nested schema](#nestedblock--destination))
* `enabled` (Boolean) Whether the inventory configuration is enabled. Defaults to `true`.
* `filter` (Block, Optional) Limits the inventory report to objects matching a prefix. (see [below for nested schema](#nestedblock--filter))
* `optional_fields` (Set of String) List of optional fields to include in the inventory results
* `schedule` (Block, Optional) Schedule for generating the inventory report. (see [below for nested schema](#nestedblock--schedule))

### Nested Schema for `destination`

Optional:

* `bucket` (Block, Optional) Destination bucket for the report (may equal the source bucket). (see [below for nested schema](#nestedblock--destination--bucket))

### Nested Schema for `destination.bucket`

Required:

* `bucket_arn` (String) ARN of the destination bucket.
* `format` (String) Output format: `CSV`, `TSV`, `JSON`, `ORC`, or `Parquet`.

Optional:

* `account_id` (String) Account ID of the destination bucket owner.
* `prefix` (String) Prefix prepended to the report output path.

### Nested Schema for `filter`

Optional:

* `prefix` (String) Source-object prefix to filter on.

### Nested Schema for `schedule`

Required:

* `frequency` (String) How frequently the report is generated: `Daily` or `Weekly`.

## Import

Import is supported using the following syntax:

```bash theme={"system"}
terraform import coreweave_object_storage_bucket_inventory.default {{bucket_name}}:{{inventory_name}}
```

```terraform theme={"system"}
import {
  to = coreweave_object_storage_bucket_inventory.default
  id = "{{bucket_name}}:{{inventory_name}}"
}
```
