Skip to content

Resource: proxmox_ceph_pool

Warning

Experimental. Schema and behavior may change in future releases. Pin the provider version if stability matters.

Manages a Ceph pool on a Proxmox VE cluster.

Example Usage

resource "proxmox_ceph_pool" "example" {
  node_name = "pve"
  name      = "tank"

  application       = "rbd"
  size              = 3
  min_size          = 2
  pg_num            = 128
  pg_autoscale_mode = "warn"
}

Schema

Required

  • name (String) The pool name. Must be unique within the Ceph cluster.
  • node_name (String) The cluster node used to dispatch the API call. Any node running Ceph is acceptable; the pool itself is cluster-wide.

Optional

  • add_storages (Boolean) Configure VM and CT storage entries using the new pool. Applied at create time only; changing this value forces replacement.
  • application (String) The application using the pool. One of rbd, cephfs, rgw. Defaults to rbd server-side.
  • crush_rule (String) The CRUSH rule name used for object placement.
  • erasure_coding (String) Create an erasure coded pool. Specified as k=<int>,m=<int>[,profile=name][,device-class=class][,failure-domain=domain] (e.g. k=4,m=2). Cannot be changed after creation.
  • force_destroy (Boolean) If true, destroy the pool even when in use. Passed as force=1 on delete.
  • min_size (Number) Minimum number of replicas per object.
  • pg_autoscale_mode (String) PG autoscaler mode. One of on, off, warn.
  • pg_num (Number) Number of placement groups.
  • pg_num_min (Number) Minimum number of placement groups (used by the autoscaler).
  • remove_ecprofile (Boolean) If true, remove the erasure code profile on destroy. Defaults to true. Only relevant for EC pools.
  • remove_storages (Boolean) If true, remove all pveceph-managed storages configured for this pool on destroy.
  • size (Number) Number of replicas per object.
  • target_size (String) Estimated target size for the PG autoscaler (e.g. 100G). Write-only: PVE returns this as a bytes integer (e.g. 1073741824) while the input accepts a unit-suffixed string, so the configured spec is not round-tripped from the server.
  • target_size_ratio (Number) Estimated target ratio for the PG autoscaler. Write-only: kept symmetric with target_size (which cannot be round-tripped), so the configured value is not refreshed from the server.

Read-Only

  • id (String) The unique identifier of the Ceph pool, in the form <node_name>/<name>.

Import

Import is supported using the following syntax:

#!/usr/bin/env sh
# Ceph pools can be imported using the format `node_name/pool_name`, e.g.:
terraform import proxmox_ceph_pool.example pve/tank