0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 02:31:10 +00:00
terraform-provider-proxmox/docs/data-sources/virtual_environment_haresource.md

47 lines
1.4 KiB
Markdown

---
layout: page
title: proxmox_virtual_environment_haresource
parent: Data Sources
subcategory: Virtual Environment
description: |-
Retrieves the list of High Availability resources.
---
# Data Source: proxmox_virtual_environment_haresource
Retrieves the list of High Availability resources.
## Example Usage
```terraform
// This will fetch the set of all HA resource identifiers...
data "proxmox_virtual_environment_haresources" "all" {}
// ...which we will go through in order to fetch the whole record for each resource.
data "proxmox_virtual_environment_haresource" "example" {
for_each = data.proxmox_virtual_environment_haresources.all.resource_ids
resource_id = each.value
}
output "proxmox_virtual_environment_haresources_full" {
value = data.proxmox_virtual_environment_haresource.example
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `resource_id` (String) The identifier of the Proxmox HA resource to read.
### Read-Only
- `comment` (String) The comment associated with this resource.
- `group` (String) The identifier of the High Availability group this resource is a member of.
- `id` (String) The unique identifier of this resource.
- `max_relocate` (Number) The maximal number of relocation attempts.
- `max_restart` (Number) The maximal number of restart attempts.
- `state` (String) The desired state of the resource.
- `type` (String) The type of High Availability resource (`vm` or `ct`).