sylve_vm_guest_agent (Data Source)

Live guest OS info and network interfaces, reported by the QEMU guest agent channel inside a running sylve_vm. This is a data source, not a resource, because it’s read-only telemetry Sylve itself doesn’t persist or manage – see sylve_vm’s qemu_guest_agent attribute to enable the channel in the first place. Requires: qemu_guest_agent enabled on the VM, the guest-agent package actually installed and running inside the guest (nothing installs it automatically – see sylve_vm’s cloud_init attributes for one way to get it there), and the VM running. Errors with a timeout if the agent isn’t there to answer.

Example Usage

# Requires: qemu_guest_agent enabled on the VM, the guest-agent package
# actually installed and running inside the guest (nothing installs it
# automatically -- see sylve_vm's cloud_init attributes for one way to
# get it there), and the VM running. Errors with a timeout if the agent
# isn't there to answer.
data "sylve_vm_guest_agent" "example" {
  rid = sylve_vm.example.rid
}

output "guest_os" {
  value = data.sylve_vm_guest_agent.example.os_pretty_name
}

output "guest_interfaces" {
  value = data.sylve_vm_guest_agent.example.interfaces
}

Schema

Required

  • rid (Number) RID of the sylve_vm to query.

Read-Only

  • id (String) Terraform resource identity – the VM’s RID as a string.
  • interfaces (Attributes List) Every network interface the guest OS itself reports, including loopback. (see below for nested schema)
  • os_id (String)
  • os_kernel_release (String)
  • os_kernel_version (String)
  • os_machine (String)
  • os_name (String)
  • os_pretty_name (String)
  • os_version (String)
  • os_version_id (String)

Nested Schema for interfaces

Read-Only:

Nested Schema for interfaces.ip_addresses

Read-Only:

  • address (String)
  • prefix (Number)
  • type (String) “ipv4” or “ipv6”.

Not published on the Terraform Registry yet -- see the repo's README for local dev_overrides usage in the meantime.

This site uses Just the Docs, a documentation theme for Jekyll.