# Resource Management Guide

Manage and optimize infrastructure resources across environments.

## Resource Tagging

Tag resources for organization and cost allocation:

```nickel
{
  resources = [
    {
      name = "web-server",
      type = "compute",
      tags = {
        environment = "production",
        team = "platform",
        cost_center = "engineering"
      }
    }
  ]
}
```

## Resource Quotas

Set usage limits per workspace:

```bash
provisioning quota set \
  --workspace production \
  --cpu-cores 100 \
  --memory-gb 500 \
  --storage-gb 5000
```

## Resource Cleanup

Remove unused resources:

```bash
#!/usr/bin/env nu

def cleanup-unused-resources [] {
  let unused = provisioning resource list --filter "last_accessed > 30d"
  print $"Found ($unused | length) unused resources"

  $unused | each { | resource |
    provisioning resource delete $resource.id --confirm
  }
}
```

## Related Documentation

- [Operations Overview](./README.md)
- [Cost Optimization](../examples/cost-optimization-examples.md)
- [Capacity Planning](./capacity-planning.md)
