You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# generated by https://github.com/hashicorp/terraform-plugin-docs
3
+
page_title: "pcd_cluster Resource - PCD"
4
+
subcategory: "Cluster Blueprint"
5
+
description: |-
6
+
Manages a PCD cluster (host cluster / host group): the unit hypervisors join. Assigning a host the hypervisor cluster role requires one — pcd_host_cluster_role.host_cluster names it. Carries the cluster-scoped VM high-availability, auto-rebalancing, GPU, and CPU-model settings.
7
+
---
8
+
9
+
# pcd_cluster (Resource)
10
+
11
+
Manages a PCD **cluster** (host cluster / host group): the unit hypervisors join. Assigning a host the `hypervisor` cluster role requires one — `pcd_host_cluster_role.host_cluster` names it. Carries the cluster-scoped VM high-availability, auto-rebalancing, GPU, and CPU-model settings.
12
+
13
+
## Example Usage
14
+
15
+
```terraform
16
+
# A cluster (host cluster / host group) is the unit hypervisors join. VM HA
17
+
# and auto-rebalancing are cluster-scoped settings.
# Hypervisors join the cluster through their cluster role.
33
+
resource "pcd_host_cluster_role" "hypervisor" {
34
+
host_id = "04575315-80ce-4617-9b96-6611d00c9942"
35
+
role = "hypervisor"
36
+
host_cluster = pcd_cluster.main.name
37
+
}
38
+
```
39
+
40
+
<!-- schema generated by tfplugindocs -->
41
+
## Schema
42
+
43
+
### Required
44
+
45
+
-`name` (String) The cluster name. Changing this forces a new resource.
46
+
47
+
### Optional
48
+
49
+
-`auto_resource_rebalancing` (Attributes) Automatic workload-rebalancing settings. (see [below for nested schema](#nestedatt--auto_resource_rebalancing))
50
+
-`cpu` (Attributes) Cluster CPU-model settings. Omit for PCD's default. (see [below for nested schema](#nestedatt--cpu))
51
+
-`gpu` (Attributes) GPU passthrough/virtualization settings. (see [below for nested schema](#nestedatt--gpu))
52
+
-`vm_high_availability` (Attributes) VM high-availability settings. (see [below for nested schema](#nestedatt--vm_high_availability))
53
+
54
+
<aid="nestedatt--auto_resource_rebalancing"></a>
55
+
### Nested Schema for `auto_resource_rebalancing`
56
+
57
+
Optional:
58
+
59
+
-`enabled` (Boolean) Whether auto-rebalancing is enabled.
60
+
-`rebalancing_frequency_mins` (Number) Rebalancing frequency in minutes.
61
+
-`rebalancing_strategy` (String) `vm_workload_consolidation` or `node_resource_consolidation`.
62
+
63
+
64
+
<aid="nestedatt--cpu"></a>
65
+
### Nested Schema for `cpu`
66
+
67
+
Optional:
68
+
69
+
-`mode` (String) The CPU mode (e.g. `custom`); null means default.
70
+
-`model` (String) The CPU model when `mode = "custom"`.
71
+
72
+
73
+
<aid="nestedatt--gpu"></a>
74
+
### Nested Schema for `gpu`
75
+
76
+
Optional:
77
+
78
+
-`enabled` (Boolean) Whether GPU support is enabled.
79
+
-`mode` (String) The GPU mode.
80
+
81
+
82
+
<aid="nestedatt--vm_high_availability"></a>
83
+
### Nested Schema for `vm_high_availability`
84
+
85
+
Optional:
86
+
87
+
-`enabled` (Boolean) Auto-detect host failure and recover VMs.
Assigns a PCD cluster role (resmgr v2 uber-role) to an onboarded host: hypervisor, image-library, persistent-storage, or dns. The PCD control plane expands the cluster role into its granular pf9-* roles and computes their settings from the cluster blueprint and the host's host configuration, so the host converges without hand-written role settings. This is the resource to onboard hosts with; pcd_host_role is the low-level granular API underneath it.
7
+
---
8
+
9
+
# pcd_host_cluster_role (Resource)
10
+
11
+
Assigns a PCD **cluster role** (resmgr v2 uber-role) to an onboarded host: `hypervisor`, `image-library`, `persistent-storage`, or `dns`. The PCD control plane expands the cluster role into its granular `pf9-*` roles and computes their settings from the cluster blueprint and the host's host configuration, so the host converges without hand-written role settings. This is the resource to onboard hosts with; `pcd_host_role` is the low-level granular API underneath it.
12
+
13
+
## Example Usage
14
+
15
+
```terraform
16
+
# Cluster roles are how hosts are onboarded: PCD expands each one into its
17
+
# granular pf9-* roles, with settings computed from the cluster blueprint and
18
+
# the host's host configuration.
19
+
20
+
# A compute host. host_cluster is required for the hypervisor role (create the
21
+
# cluster with pcd_cluster). wait_until_converged blocks until the host reports
22
+
# role_status = ok, so instances can be scheduled by resources later in the
# Block storage: `backends` names entries from the blueprint's
38
+
# storage_backends_json (its top-level keys).
39
+
resource "pcd_host_cluster_role" "storage" {
40
+
host_id = "04575315-80ce-4617-9b96-6611d00c9942"
41
+
role = "persistent-storage"
42
+
backends = ["synology"]
43
+
}
44
+
```
45
+
46
+
<!-- schema generated by tfplugindocs -->
47
+
## Schema
48
+
49
+
### Required
50
+
51
+
-`host_id` (String) The resmgr host UUID. Changing this forces a new resource.
52
+
-`role` (String) The cluster role: `hypervisor`, `image-library`, `persistent-storage`, or `dns`. Changing this forces a new resource.
53
+
54
+
### Optional
55
+
56
+
-`backends` (List of String) For `persistent-storage` only: the storage backend names to enable on this host, as named in the cluster blueprint's `storage_backends_json` (its top-level keys).
57
+
-`host_cluster` (String) For `hypervisor` only: the host cluster (host aggregate) to join.
58
+
-`wait_until_converged` (Boolean) Wait until the host reports `role_status = ok` before completing. Role convergence installs and configures services on the host and typically takes several minutes. Enable this when later resources in the same configuration need the host operational (e.g. booting an instance on a freshly onboarded hypervisor).
59
+
60
+
### Read-Only
61
+
62
+
-`id` (String) The composite `<host_id>/<role>` ID.
Copy file name to clipboardExpand all lines: docs/resources/host_role.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,15 @@
3
3
page_title: "pcd_host_role Resource - PCD"
4
4
subcategory: "Cluster Blueprint"
5
5
description: |-
6
-
Assigns a PCD role (e.g. pf9-ostackhost-neutron) to a host. Use one resource per host↔role pair. Role-specific settings are applied with their defaults.
6
+
Assigns a granular PCD role (e.g. pf9-ostackhost-neutron) to a host via the low-level resmgr v1 API. Use one resource per host↔role pair. Role settings are applied with their defaults.
7
+
~> Onboard hosts with pcd_host_cluster_role instead. Cluster roles (hypervisor, image-library, persistent-storage, dns) make the control plane compute each granular role's settings from the cluster blueprint and host configuration. This resource applies a role's default settings, and for roles whose settings are required — notably pf9-cindervolume-config, whose default backends is empty — that produces a convergence failure that blocks every role on the host and cannot be repaired while the host is converging (resmgr answers 409). Reserve this resource for roles that genuinely take no settings.
7
8
---
8
9
9
10
# pcd_host_role (Resource)
10
11
11
-
Assigns a PCD role (e.g. `pf9-ostackhost-neutron`) to a host. Use one resource per host↔role pair. Role-specific settings are applied with their defaults.
12
+
Assigns a granular PCD role (e.g. `pf9-ostackhost-neutron`) to a host via the low-level resmgr v1 API. Use one resource per host↔role pair. Role settings are applied with their defaults.
13
+
14
+
~> **Onboard hosts with `pcd_host_cluster_role` instead.** Cluster roles (`hypervisor`, `image-library`, `persistent-storage`, `dns`) make the control plane compute each granular role's settings from the cluster blueprint and host configuration. This resource applies a role's *default* settings, and for roles whose settings are required — notably `pf9-cindervolume-config`, whose default `backends` is empty — that produces a convergence failure that blocks every role on the host and cannot be repaired while the host is converging (resmgr answers 409). Reserve this resource for roles that genuinely take no settings.
-`external` (Boolean) Whether the network has an external routing facility.
34
45
-`name` (String) The name of the network.
35
46
-`region` (String) The region. Defaults to the provider's region.
47
+
-`segments` (Attributes List) Provider-network segments (admin only). One segment creates a physical network (e.g. `network_type = "flat"` / `"vlan"` on a `physical_network` label from the host config); multiple segments create a multi-provider network. Create-only: segments are not refreshed from the API and cannot be imported. Changing this forces a new resource. (see [below for nested schema](#nestedatt--segments))
36
48
-`shared` (Boolean) Whether the network is shared across projects.
37
49
-`tags` (Set of String) Tags applied to the network.
38
50
-`tenant_id` (String) The owning project. Changing this forces a new resource.
0 commit comments