Viewing docs for xenorchestra v2.4.0
published on Thursday, Feb 26, 2026 by Vates
published on Thursday, Feb 26, 2026 by Vates
Viewing docs for xenorchestra v2.4.0
published on Thursday, Feb 26, 2026 by Vates
published on Thursday, Feb 26, 2026 by Vates
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as xenorchestra from "@vates/pulumi-xenorchestra";
const net = xenorchestra.getXoaNetwork({
nameLabel: "Pool-wide network associated with eth0",
});
const demo_vm = new xenorchestra.Vm("demo-vm", {networks: [{
networkId: net.then(net => net.id),
}]});
import pulumi
import pulumi_xenorchestra as xenorchestra
net = xenorchestra.get_xoa_network(name_label="Pool-wide network associated with eth0")
demo_vm = xenorchestra.Vm("demo-vm", networks=[{
"network_id": net.id,
}])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/vatesfr/pulumi-xenorchestra/sdk/v2/go/xenorchestra"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
net, err := xenorchestra.LookupXoaNetwork(ctx, &xenorchestra.LookupXoaNetworkArgs{
NameLabel: "Pool-wide network associated with eth0",
}, nil)
if err != nil {
return err
}
_, err = xenorchestra.NewVm(ctx, "demo-vm", &xenorchestra.VmArgs{
Networks: xenorchestra.VmNetworkArray{
&xenorchestra.VmNetworkArgs{
NetworkId: pulumi.String(net.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Xenorchestra = Pulumi.Xenorchestra;
return await Deployment.RunAsync(() =>
{
var net = Xenorchestra.GetXoaNetwork.Invoke(new()
{
NameLabel = "Pool-wide network associated with eth0",
});
var demo_vm = new Xenorchestra.Vm("demo-vm", new()
{
Networks = new[]
{
new Xenorchestra.Inputs.VmNetworkArgs
{
NetworkId = net.Apply(getXoaNetworkResult => getXoaNetworkResult.Id),
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.xenorchestra.XenorchestraFunctions;
import com.pulumi.xenorchestra.inputs.GetXoaNetworkArgs;
import com.pulumi.xenorchestra.Vm;
import com.pulumi.xenorchestra.VmArgs;
import com.pulumi.xenorchestra.inputs.VmNetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var net = XenorchestraFunctions.getXoaNetwork(GetXoaNetworkArgs.builder()
.nameLabel("Pool-wide network associated with eth0")
.build());
var demo_vm = new Vm("demo-vm", VmArgs.builder()
.networks(VmNetworkArgs.builder()
.networkId(net.id())
.build())
.build());
}
}
resources:
demo-vm:
type: xenorchestra:Vm
properties:
# ...
networks:
- networkId: ${net.id}
variables:
net:
fn::invoke:
function: xenorchestra:getXoaNetwork
arguments:
nameLabel: Pool-wide network associated with eth0
Using getXoaNetwork
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 getXoaNetwork(args: GetXoaNetworkArgs, opts?: InvokeOptions): Promise<GetXoaNetworkResult>
function getXoaNetworkOutput(args: GetXoaNetworkOutputArgs, opts?: InvokeOptions): Output<GetXoaNetworkResult>def get_xoa_network(bridge: Optional[str] = None,
name_label: Optional[str] = None,
pool_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetXoaNetworkResult
def get_xoa_network_output(bridge: Optional[pulumi.Input[str]] = None,
name_label: Optional[pulumi.Input[str]] = None,
pool_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetXoaNetworkResult]func LookupXoaNetwork(ctx *Context, args *LookupXoaNetworkArgs, opts ...InvokeOption) (*LookupXoaNetworkResult, error)
func LookupXoaNetworkOutput(ctx *Context, args *LookupXoaNetworkOutputArgs, opts ...InvokeOption) LookupXoaNetworkResultOutput> Note: This function is named LookupXoaNetwork in the Go SDK.
public static class GetXoaNetwork
{
public static Task<GetXoaNetworkResult> InvokeAsync(GetXoaNetworkArgs args, InvokeOptions? opts = null)
public static Output<GetXoaNetworkResult> Invoke(GetXoaNetworkInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetXoaNetworkResult> getXoaNetwork(GetXoaNetworkArgs args, InvokeOptions options)
public static Output<GetXoaNetworkResult> getXoaNetwork(GetXoaNetworkArgs args, InvokeOptions options)
fn::invoke:
function: xenorchestra:index/getXoaNetwork:getXoaNetwork
arguments:
# arguments dictionaryThe following arguments are supported:
- name_
label str - The name of the network.
- bridge str
- The name of the bridge network interface.
- pool_
id str - The pool the network is associated with.
getXoaNetwork Result
The following output properties are available:
- bridge str
- The name of the bridge network interface.
- id str
- The provider-assigned unique ID for this managed resource.
- name_
label str - The name of the network.
- pool_
id str - The pool the network is associated with.
Package Details
- Repository
- xenorchestra vatesfr/pulumi-xenorchestra
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
xenorchestraTerraform Provider.
Viewing docs for xenorchestra v2.4.0
published on Thursday, Feb 26, 2026 by Vates
published on Thursday, Feb 26, 2026 by Vates
