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

1.4 KiB

layout title parent subcategory description
page proxmox_virtual_environment_haresource Data Sources Virtual Environment Retrieves the list of High Availability resources.

Data Source: proxmox_virtual_environment_haresource

Retrieves the list of High Availability resources.

Example Usage

// 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

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).