1. Packages
  2. Libvirt Provider
  3. API Docs
  4. getDomainInterfaceAddresses
libvirt 0.9.0 published on Saturday, Nov 8, 2025 by dmacvicar
libvirt logo
libvirt 0.9.0 published on Saturday, Nov 8, 2025 by dmacvicar

    Queries IP addresses for a libvirt domain’s network interfaces.

    This data source uses libvirt’s virDomainInterfaceAddresses API to retrieve IP address information from DHCP leases or the QEMU guest agent.

    Using getDomainInterfaceAddresses

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDomainInterfaceAddresses(args: GetDomainInterfaceAddressesArgs, opts?: InvokeOptions): Promise<GetDomainInterfaceAddressesResult>
    function getDomainInterfaceAddressesOutput(args: GetDomainInterfaceAddressesOutputArgs, opts?: InvokeOptions): Output<GetDomainInterfaceAddressesResult>
    def get_domain_interface_addresses(domain: Optional[str] = None,
                                       source: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetDomainInterfaceAddressesResult
    def get_domain_interface_addresses_output(domain: Optional[pulumi.Input[str]] = None,
                                       source: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetDomainInterfaceAddressesResult]
    func GetDomainInterfaceAddresses(ctx *Context, args *GetDomainInterfaceAddressesArgs, opts ...InvokeOption) (*GetDomainInterfaceAddressesResult, error)
    func GetDomainInterfaceAddressesOutput(ctx *Context, args *GetDomainInterfaceAddressesOutputArgs, opts ...InvokeOption) GetDomainInterfaceAddressesResultOutput

    > Note: This function is named GetDomainInterfaceAddresses in the Go SDK.

    public static class GetDomainInterfaceAddresses 
    {
        public static Task<GetDomainInterfaceAddressesResult> InvokeAsync(GetDomainInterfaceAddressesArgs args, InvokeOptions? opts = null)
        public static Output<GetDomainInterfaceAddressesResult> Invoke(GetDomainInterfaceAddressesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDomainInterfaceAddressesResult> getDomainInterfaceAddresses(GetDomainInterfaceAddressesArgs args, InvokeOptions options)
    public static Output<GetDomainInterfaceAddressesResult> getDomainInterfaceAddresses(GetDomainInterfaceAddressesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: libvirt:index/getDomainInterfaceAddresses:getDomainInterfaceAddresses
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Domain string
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    Source string
    Source to query for IP addresses:
    Domain string
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    Source string
    Source to query for IP addresses:
    domain String
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    source String
    Source to query for IP addresses:
    domain string
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    source string
    Source to query for IP addresses:
    domain str
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    source str
    Source to query for IP addresses:
    domain String
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    source String
    Source to query for IP addresses:

    getDomainInterfaceAddresses Result

    The following output properties are available:

    Domain string
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    Id string
    Interfaces List<GetDomainInterfaceAddressesInterface>
    Source string
    Source to query for IP addresses:
    Domain string
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    Id string
    Interfaces []GetDomainInterfaceAddressesInterface
    Source string
    Source to query for IP addresses:
    domain String
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    id String
    interfaces List<GetDomainInterfaceAddressesInterface>
    source String
    Source to query for IP addresses:
    domain string
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    id string
    interfaces GetDomainInterfaceAddressesInterface[]
    source string
    Source to query for IP addresses:
    domain str
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    id str
    interfaces Sequence[GetDomainInterfaceAddressesInterface]
    source str
    Source to query for IP addresses:
    domain String
    Domain UUID or name to query. Use libvirt_domain.example.id or libvirt_domain.example.name to reference a managed domain.
    id String
    interfaces List<Property Map>
    source String
    Source to query for IP addresses:

    Supporting Types

    GetDomainInterfaceAddressesInterface

    Addrs List<GetDomainInterfaceAddressesInterfaceAddr>
    List of IP addresses assigned to this interface.
    Hwaddr string
    MAC address of the interface.
    Name string
    Interface name on the host (e.g., vnet0).
    Addrs []GetDomainInterfaceAddressesInterfaceAddr
    List of IP addresses assigned to this interface.
    Hwaddr string
    MAC address of the interface.
    Name string
    Interface name on the host (e.g., vnet0).
    addrs List<GetDomainInterfaceAddressesInterfaceAddr>
    List of IP addresses assigned to this interface.
    hwaddr String
    MAC address of the interface.
    name String
    Interface name on the host (e.g., vnet0).
    addrs GetDomainInterfaceAddressesInterfaceAddr[]
    List of IP addresses assigned to this interface.
    hwaddr string
    MAC address of the interface.
    name string
    Interface name on the host (e.g., vnet0).
    addrs Sequence[GetDomainInterfaceAddressesInterfaceAddr]
    List of IP addresses assigned to this interface.
    hwaddr str
    MAC address of the interface.
    name str
    Interface name on the host (e.g., vnet0).
    addrs List<Property Map>
    List of IP addresses assigned to this interface.
    hwaddr String
    MAC address of the interface.
    name String
    Interface name on the host (e.g., vnet0).

    GetDomainInterfaceAddressesInterfaceAddr

    Addr string
    IP address.
    Prefix double
    Network prefix length (e.g., 24 for 255.255.255.0).
    Type string
    Address type: ipv4 or ipv6.
    Addr string
    IP address.
    Prefix float64
    Network prefix length (e.g., 24 for 255.255.255.0).
    Type string
    Address type: ipv4 or ipv6.
    addr String
    IP address.
    prefix Double
    Network prefix length (e.g., 24 for 255.255.255.0).
    type String
    Address type: ipv4 or ipv6.
    addr string
    IP address.
    prefix number
    Network prefix length (e.g., 24 for 255.255.255.0).
    type string
    Address type: ipv4 or ipv6.
    addr str
    IP address.
    prefix float
    Network prefix length (e.g., 24 for 255.255.255.0).
    type str
    Address type: ipv4 or ipv6.
    addr String
    IP address.
    prefix Number
    Network prefix length (e.g., 24 for 255.255.255.0).
    type String
    Address type: ipv4 or ipv6.

    Package Details

    Repository
    libvirt dmacvicar/terraform-provider-libvirt
    License
    Notes
    This Pulumi package is based on the libvirt Terraform Provider.
    libvirt logo
    libvirt 0.9.0 published on Saturday, Nov 8, 2025 by dmacvicar
      Meet Neo: Your AI Platform Teammate