1. Packages
  2. Lxd Provider
  3. API Docs
  4. Instance
lxd 2.5.0 published on Thursday, Mar 13, 2025 by terraform-lxd

lxd.Instance

Explore with Pulumi AI

Create Instance Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Instance(name: string, args?: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
             args: Optional[InstanceArgs] = None,
             opts: Optional[ResourceOptions] = None)

@overload
def Instance(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             allow_restart: Optional[bool] = None,
             config: Optional[Mapping[str, str]] = None,
             description: Optional[str] = None,
             devices: Optional[Sequence[InstanceDeviceArgs]] = None,
             ephemeral: Optional[bool] = None,
             execs: Optional[Mapping[str, InstanceExecsArgs]] = None,
             files: Optional[Sequence[InstanceFileArgs]] = None,
             image: Optional[str] = None,
             limits: Optional[Mapping[str, str]] = None,
             name: Optional[str] = None,
             profiles: Optional[Sequence[str]] = None,
             project: Optional[str] = None,
             remote: Optional[str] = None,
             running: Optional[bool] = None,
             target: Optional[str] = None,
             timeouts: Optional[InstanceTimeoutsArgs] = None,
             type: Optional[str] = None,
             wait_for_network: Optional[bool] = None)
func NewInstance(ctx *Context, name string, args *InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs? args = null, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: lxd:Instance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. InstanceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var instanceResource = new Lxd.Instance("instanceResource", new()
{
    AllowRestart = false,
    Config = 
    {
        { "string", "string" },
    },
    Description = "string",
    Devices = new[]
    {
        new Lxd.Inputs.InstanceDeviceArgs
        {
            Name = "string",
            Properties = 
            {
                { "string", "string" },
            },
            Type = "string",
        },
    },
    Ephemeral = false,
    Execs = 
    {
        { "string", new Lxd.Inputs.InstanceExecsArgs
        {
            Commands = new[]
            {
                "string",
            },
            Enabled = false,
            Environment = 
            {
                { "string", "string" },
            },
            ExitCode = 0,
            FailOnError = false,
            Gid = 0,
            RecordOutput = false,
            RunCount = 0,
            Stderr = "string",
            Stdout = "string",
            Trigger = "string",
            Uid = 0,
            WorkingDir = "string",
        } },
    },
    Files = new[]
    {
        new Lxd.Inputs.InstanceFileArgs
        {
            TargetPath = "string",
            Append = false,
            Content = "string",
            CreateDirectories = false,
            Gid = 0,
            Mode = "string",
            SourcePath = "string",
            Uid = 0,
        },
    },
    Image = "string",
    Limits = 
    {
        { "string", "string" },
    },
    Name = "string",
    Profiles = new[]
    {
        "string",
    },
    Project = "string",
    Remote = "string",
    Running = false,
    Target = "string",
    Timeouts = new Lxd.Inputs.InstanceTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Read = "string",
        Update = "string",
    },
    Type = "string",
    WaitForNetwork = false,
});
Copy
example, err := lxd.NewInstance(ctx, "instanceResource", &lxd.InstanceArgs{
AllowRestart: pulumi.Bool(false),
Config: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Devices: .InstanceDeviceArray{
&.InstanceDeviceArgs{
Name: pulumi.String("string"),
Properties: pulumi.StringMap{
"string": pulumi.String("string"),
},
Type: pulumi.String("string"),
},
},
Ephemeral: pulumi.Bool(false),
Execs: .InstanceExecsMap{
"string": &.InstanceExecsArgs{
Commands: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
Environment: pulumi.StringMap{
"string": pulumi.String("string"),
},
ExitCode: pulumi.Float64(0),
FailOnError: pulumi.Bool(false),
Gid: pulumi.Float64(0),
RecordOutput: pulumi.Bool(false),
RunCount: pulumi.Float64(0),
Stderr: pulumi.String("string"),
Stdout: pulumi.String("string"),
Trigger: pulumi.String("string"),
Uid: pulumi.Float64(0),
WorkingDir: pulumi.String("string"),
},
},
Files: .InstanceFileTypeArray{
&.InstanceFileTypeArgs{
TargetPath: pulumi.String("string"),
Append: pulumi.Bool(false),
Content: pulumi.String("string"),
CreateDirectories: pulumi.Bool(false),
Gid: pulumi.Float64(0),
Mode: pulumi.String("string"),
SourcePath: pulumi.String("string"),
Uid: pulumi.Float64(0),
},
},
Image: pulumi.String("string"),
Limits: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Profiles: pulumi.StringArray{
pulumi.String("string"),
},
Project: pulumi.String("string"),
Remote: pulumi.String("string"),
Running: pulumi.Bool(false),
Target: pulumi.String("string"),
Timeouts: &.InstanceTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
Type: pulumi.String("string"),
WaitForNetwork: pulumi.Bool(false),
})
Copy
var instanceResource = new Instance("instanceResource", InstanceArgs.builder()
    .allowRestart(false)
    .config(Map.of("string", "string"))
    .description("string")
    .devices(InstanceDeviceArgs.builder()
        .name("string")
        .properties(Map.of("string", "string"))
        .type("string")
        .build())
    .ephemeral(false)
    .execs(Map.of("string", Map.ofEntries(
        Map.entry("commands", "string"),
        Map.entry("enabled", false),
        Map.entry("environment", Map.of("string", "string")),
        Map.entry("exitCode", 0),
        Map.entry("failOnError", false),
        Map.entry("gid", 0),
        Map.entry("recordOutput", false),
        Map.entry("runCount", 0),
        Map.entry("stderr", "string"),
        Map.entry("stdout", "string"),
        Map.entry("trigger", "string"),
        Map.entry("uid", 0),
        Map.entry("workingDir", "string")
    )))
    .files(InstanceFileArgs.builder()
        .targetPath("string")
        .append(false)
        .content("string")
        .createDirectories(false)
        .gid(0)
        .mode("string")
        .sourcePath("string")
        .uid(0)
        .build())
    .image("string")
    .limits(Map.of("string", "string"))
    .name("string")
    .profiles("string")
    .project("string")
    .remote("string")
    .running(false)
    .target("string")
    .timeouts(InstanceTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .read("string")
        .update("string")
        .build())
    .type("string")
    .waitForNetwork(false)
    .build());
Copy
instance_resource = lxd.Instance("instanceResource",
    allow_restart=False,
    config={
        "string": "string",
    },
    description="string",
    devices=[{
        "name": "string",
        "properties": {
            "string": "string",
        },
        "type": "string",
    }],
    ephemeral=False,
    execs={
        "string": {
            "commands": ["string"],
            "enabled": False,
            "environment": {
                "string": "string",
            },
            "exit_code": 0,
            "fail_on_error": False,
            "gid": 0,
            "record_output": False,
            "run_count": 0,
            "stderr": "string",
            "stdout": "string",
            "trigger": "string",
            "uid": 0,
            "working_dir": "string",
        },
    },
    files=[{
        "target_path": "string",
        "append": False,
        "content": "string",
        "create_directories": False,
        "gid": 0,
        "mode": "string",
        "source_path": "string",
        "uid": 0,
    }],
    image="string",
    limits={
        "string": "string",
    },
    name="string",
    profiles=["string"],
    project="string",
    remote="string",
    running=False,
    target="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "read": "string",
        "update": "string",
    },
    type="string",
    wait_for_network=False)
Copy
const instanceResource = new lxd.Instance("instanceResource", {
    allowRestart: false,
    config: {
        string: "string",
    },
    description: "string",
    devices: [{
        name: "string",
        properties: {
            string: "string",
        },
        type: "string",
    }],
    ephemeral: false,
    execs: {
        string: {
            commands: ["string"],
            enabled: false,
            environment: {
                string: "string",
            },
            exitCode: 0,
            failOnError: false,
            gid: 0,
            recordOutput: false,
            runCount: 0,
            stderr: "string",
            stdout: "string",
            trigger: "string",
            uid: 0,
            workingDir: "string",
        },
    },
    files: [{
        targetPath: "string",
        append: false,
        content: "string",
        createDirectories: false,
        gid: 0,
        mode: "string",
        sourcePath: "string",
        uid: 0,
    }],
    image: "string",
    limits: {
        string: "string",
    },
    name: "string",
    profiles: ["string"],
    project: "string",
    remote: "string",
    running: false,
    target: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        read: "string",
        update: "string",
    },
    type: "string",
    waitForNetwork: false,
});
Copy
type: lxd:Instance
properties:
    allowRestart: false
    config:
        string: string
    description: string
    devices:
        - name: string
          properties:
            string: string
          type: string
    ephemeral: false
    execs:
        string:
            commands:
                - string
            enabled: false
            environment:
                string: string
            exitCode: 0
            failOnError: false
            gid: 0
            recordOutput: false
            runCount: 0
            stderr: string
            stdout: string
            trigger: string
            uid: 0
            workingDir: string
    files:
        - append: false
          content: string
          createDirectories: false
          gid: 0
          mode: string
          sourcePath: string
          targetPath: string
          uid: 0
    image: string
    limits:
        string: string
    name: string
    profiles:
        - string
    project: string
    remote: string
    running: false
    target: string
    timeouts:
        create: string
        delete: string
        read: string
        update: string
    type: string
    waitForNetwork: false
Copy

Instance Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Instance resource accepts the following input properties:

AllowRestart bool
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
Config Dictionary<string, string>
Optional - Map of key/value pairs of instance config settings.
Description string
Optional - Description of the instance.
Devices List<InstanceDevice>
Optional - Device definition. See reference below.
Ephemeral bool
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
Execs Dictionary<string, InstanceExecsArgs>
Optional - Map of exec commands to run within the instance. See reference below.
Files List<InstanceFile>
Optional - File to upload to the instance. See reference below.
Image string
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
Limits Dictionary<string, string>
Optional - Map of key/value pairs that define the instance resources limits.
Name string
Required - Name of the instance.
Profiles List<string>
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
Project string
Optional - Name of the project where the instance will be spawned.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Running bool
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
Target string
Optional - Specify a target cluster member or cluster member group.
Timeouts InstanceTimeouts
Type string
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
WaitForNetwork bool
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
AllowRestart bool
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
Config map[string]string
Optional - Map of key/value pairs of instance config settings.
Description string
Optional - Description of the instance.
Devices []InstanceDeviceArgs
Optional - Device definition. See reference below.
Ephemeral bool
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
Execs map[string]InstanceExecsArgs
Optional - Map of exec commands to run within the instance. See reference below.
Files []InstanceFileTypeArgs
Optional - File to upload to the instance. See reference below.
Image string
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
Limits map[string]string
Optional - Map of key/value pairs that define the instance resources limits.
Name string
Required - Name of the instance.
Profiles []string
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
Project string
Optional - Name of the project where the instance will be spawned.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Running bool
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
Target string
Optional - Specify a target cluster member or cluster member group.
Timeouts InstanceTimeoutsArgs
Type string
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
WaitForNetwork bool
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
allowRestart Boolean
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
config Map<String,String>
Optional - Map of key/value pairs of instance config settings.
description String
Optional - Description of the instance.
devices List<InstanceDevice>
Optional - Device definition. See reference below.
ephemeral Boolean
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
execs Map<String,InstanceExecsArgs>
Optional - Map of exec commands to run within the instance. See reference below.
files List<InstanceFile>
Optional - File to upload to the instance. See reference below.
image String
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
limits Map<String,String>
Optional - Map of key/value pairs that define the instance resources limits.
name String
Required - Name of the instance.
profiles List<String>
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
project String
Optional - Name of the project where the instance will be spawned.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
running Boolean
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
target String
Optional - Specify a target cluster member or cluster member group.
timeouts InstanceTimeouts
type String
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
waitForNetwork Boolean
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
allowRestart boolean
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
config {[key: string]: string}
Optional - Map of key/value pairs of instance config settings.
description string
Optional - Description of the instance.
devices InstanceDevice[]
Optional - Device definition. See reference below.
ephemeral boolean
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
execs {[key: string]: InstanceExecsArgs}
Optional - Map of exec commands to run within the instance. See reference below.
files InstanceFile[]
Optional - File to upload to the instance. See reference below.
image string
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
limits {[key: string]: string}
Optional - Map of key/value pairs that define the instance resources limits.
name string
Required - Name of the instance.
profiles string[]
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
project string
Optional - Name of the project where the instance will be spawned.
remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
running boolean
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
target string
Optional - Specify a target cluster member or cluster member group.
timeouts InstanceTimeouts
type string
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
waitForNetwork boolean
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
allow_restart bool
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
config Mapping[str, str]
Optional - Map of key/value pairs of instance config settings.
description str
Optional - Description of the instance.
devices Sequence[InstanceDeviceArgs]
Optional - Device definition. See reference below.
ephemeral bool
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
execs Mapping[str, InstanceExecsArgs]
Optional - Map of exec commands to run within the instance. See reference below.
files Sequence[InstanceFileArgs]
Optional - File to upload to the instance. See reference below.
image str
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
limits Mapping[str, str]
Optional - Map of key/value pairs that define the instance resources limits.
name str
Required - Name of the instance.
profiles Sequence[str]
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
project str
Optional - Name of the project where the instance will be spawned.
remote str
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
running bool
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
target str
Optional - Specify a target cluster member or cluster member group.
timeouts InstanceTimeoutsArgs
type str
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
wait_for_network bool
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
allowRestart Boolean
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
config Map<String>
Optional - Map of key/value pairs of instance config settings.
description String
Optional - Description of the instance.
devices List<Property Map>
Optional - Device definition. See reference below.
ephemeral Boolean
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
execs Map<Property Map>
Optional - Map of exec commands to run within the instance. See reference below.
files List<Property Map>
Optional - File to upload to the instance. See reference below.
image String
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
limits Map<String>
Optional - Map of key/value pairs that define the instance resources limits.
name String
Required - Name of the instance.
profiles List<String>
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
project String
Optional - Name of the project where the instance will be spawned.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
running Boolean
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
target String
Optional - Specify a target cluster member or cluster member group.
timeouts Property Map
type String
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
waitForNetwork Boolean
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.

Outputs

All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Interfaces Dictionary<string, InstanceInterfaces>
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
Ipv4Address string
The instance's global IPv4 address. See Instance Network Access for more details.
Ipv6Address string
The instance's global IPv6 address. See Instance Network Access for more details.
Location string
Name of the cluster member where instance is located.
MacAddress string
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
Status string
The status of the instance.
Id string
The provider-assigned unique ID for this managed resource.
Interfaces map[string]InstanceInterfaces
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
Ipv4Address string
The instance's global IPv4 address. See Instance Network Access for more details.
Ipv6Address string
The instance's global IPv6 address. See Instance Network Access for more details.
Location string
Name of the cluster member where instance is located.
MacAddress string
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
Status string
The status of the instance.
id String
The provider-assigned unique ID for this managed resource.
interfaces Map<String,InstanceInterfaces>
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
ipv4Address String
The instance's global IPv4 address. See Instance Network Access for more details.
ipv6Address String
The instance's global IPv6 address. See Instance Network Access for more details.
location String
Name of the cluster member where instance is located.
macAddress String
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
status String
The status of the instance.
id string
The provider-assigned unique ID for this managed resource.
interfaces {[key: string]: InstanceInterfaces}
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
ipv4Address string
The instance's global IPv4 address. See Instance Network Access for more details.
ipv6Address string
The instance's global IPv6 address. See Instance Network Access for more details.
location string
Name of the cluster member where instance is located.
macAddress string
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
status string
The status of the instance.
id str
The provider-assigned unique ID for this managed resource.
interfaces Mapping[str, InstanceInterfaces]
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
ipv4_address str
The instance's global IPv4 address. See Instance Network Access for more details.
ipv6_address str
The instance's global IPv6 address. See Instance Network Access for more details.
location str
Name of the cluster member where instance is located.
mac_address str
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
status str
The status of the instance.
id String
The provider-assigned unique ID for this managed resource.
interfaces Map<Property Map>
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
ipv4Address String
The instance's global IPv4 address. See Instance Network Access for more details.
ipv6Address String
The instance's global IPv6 address. See Instance Network Access for more details.
location String
Name of the cluster member where instance is located.
macAddress String
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
status String
The status of the instance.

Look up Existing Instance Resource

Get an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_restart: Optional[bool] = None,
        config: Optional[Mapping[str, str]] = None,
        description: Optional[str] = None,
        devices: Optional[Sequence[InstanceDeviceArgs]] = None,
        ephemeral: Optional[bool] = None,
        execs: Optional[Mapping[str, InstanceExecsArgs]] = None,
        files: Optional[Sequence[InstanceFileArgs]] = None,
        image: Optional[str] = None,
        interfaces: Optional[Mapping[str, InstanceInterfacesArgs]] = None,
        ipv4_address: Optional[str] = None,
        ipv6_address: Optional[str] = None,
        limits: Optional[Mapping[str, str]] = None,
        location: Optional[str] = None,
        mac_address: Optional[str] = None,
        name: Optional[str] = None,
        profiles: Optional[Sequence[str]] = None,
        project: Optional[str] = None,
        remote: Optional[str] = None,
        running: Optional[bool] = None,
        status: Optional[str] = None,
        target: Optional[str] = None,
        timeouts: Optional[InstanceTimeoutsArgs] = None,
        type: Optional[str] = None,
        wait_for_network: Optional[bool] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
resources:  _:    type: lxd:Instance    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AllowRestart bool
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
Config Dictionary<string, string>
Optional - Map of key/value pairs of instance config settings.
Description string
Optional - Description of the instance.
Devices List<InstanceDevice>
Optional - Device definition. See reference below.
Ephemeral bool
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
Execs Dictionary<string, InstanceExecsArgs>
Optional - Map of exec commands to run within the instance. See reference below.
Files List<InstanceFile>
Optional - File to upload to the instance. See reference below.
Image string
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
Interfaces Dictionary<string, InstanceInterfacesArgs>
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
Ipv4Address string
The instance's global IPv4 address. See Instance Network Access for more details.
Ipv6Address string
The instance's global IPv6 address. See Instance Network Access for more details.
Limits Dictionary<string, string>
Optional - Map of key/value pairs that define the instance resources limits.
Location string
Name of the cluster member where instance is located.
MacAddress string
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
Name string
Required - Name of the instance.
Profiles List<string>
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
Project string
Optional - Name of the project where the instance will be spawned.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Running bool
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
Status string
The status of the instance.
Target string
Optional - Specify a target cluster member or cluster member group.
Timeouts InstanceTimeouts
Type string
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
WaitForNetwork bool
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
AllowRestart bool
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
Config map[string]string
Optional - Map of key/value pairs of instance config settings.
Description string
Optional - Description of the instance.
Devices []InstanceDeviceArgs
Optional - Device definition. See reference below.
Ephemeral bool
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
Execs map[string]InstanceExecsArgs
Optional - Map of exec commands to run within the instance. See reference below.
Files []InstanceFileTypeArgs
Optional - File to upload to the instance. See reference below.
Image string
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
Interfaces map[string]InstanceInterfacesArgs
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
Ipv4Address string
The instance's global IPv4 address. See Instance Network Access for more details.
Ipv6Address string
The instance's global IPv6 address. See Instance Network Access for more details.
Limits map[string]string
Optional - Map of key/value pairs that define the instance resources limits.
Location string
Name of the cluster member where instance is located.
MacAddress string
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
Name string
Required - Name of the instance.
Profiles []string
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
Project string
Optional - Name of the project where the instance will be spawned.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Running bool
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
Status string
The status of the instance.
Target string
Optional - Specify a target cluster member or cluster member group.
Timeouts InstanceTimeoutsArgs
Type string
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
WaitForNetwork bool
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
allowRestart Boolean
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
config Map<String,String>
Optional - Map of key/value pairs of instance config settings.
description String
Optional - Description of the instance.
devices List<InstanceDevice>
Optional - Device definition. See reference below.
ephemeral Boolean
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
execs Map<String,InstanceExecsArgs>
Optional - Map of exec commands to run within the instance. See reference below.
files List<InstanceFile>
Optional - File to upload to the instance. See reference below.
image String
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
interfaces Map<String,InstanceInterfacesArgs>
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
ipv4Address String
The instance's global IPv4 address. See Instance Network Access for more details.
ipv6Address String
The instance's global IPv6 address. See Instance Network Access for more details.
limits Map<String,String>
Optional - Map of key/value pairs that define the instance resources limits.
location String
Name of the cluster member where instance is located.
macAddress String
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
name String
Required - Name of the instance.
profiles List<String>
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
project String
Optional - Name of the project where the instance will be spawned.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
running Boolean
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
status String
The status of the instance.
target String
Optional - Specify a target cluster member or cluster member group.
timeouts InstanceTimeouts
type String
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
waitForNetwork Boolean
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
allowRestart boolean
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
config {[key: string]: string}
Optional - Map of key/value pairs of instance config settings.
description string
Optional - Description of the instance.
devices InstanceDevice[]
Optional - Device definition. See reference below.
ephemeral boolean
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
execs {[key: string]: InstanceExecsArgs}
Optional - Map of exec commands to run within the instance. See reference below.
files InstanceFile[]
Optional - File to upload to the instance. See reference below.
image string
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
interfaces {[key: string]: InstanceInterfacesArgs}
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
ipv4Address string
The instance's global IPv4 address. See Instance Network Access for more details.
ipv6Address string
The instance's global IPv6 address. See Instance Network Access for more details.
limits {[key: string]: string}
Optional - Map of key/value pairs that define the instance resources limits.
location string
Name of the cluster member where instance is located.
macAddress string
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
name string
Required - Name of the instance.
profiles string[]
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
project string
Optional - Name of the project where the instance will be spawned.
remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
running boolean
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
status string
The status of the instance.
target string
Optional - Specify a target cluster member or cluster member group.
timeouts InstanceTimeouts
type string
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
waitForNetwork boolean
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
allow_restart bool
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
config Mapping[str, str]
Optional - Map of key/value pairs of instance config settings.
description str
Optional - Description of the instance.
devices Sequence[InstanceDeviceArgs]
Optional - Device definition. See reference below.
ephemeral bool
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
execs Mapping[str, InstanceExecsArgs]
Optional - Map of exec commands to run within the instance. See reference below.
files Sequence[InstanceFileArgs]
Optional - File to upload to the instance. See reference below.
image str
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
interfaces Mapping[str, InstanceInterfacesArgs]
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
ipv4_address str
The instance's global IPv4 address. See Instance Network Access for more details.
ipv6_address str
The instance's global IPv6 address. See Instance Network Access for more details.
limits Mapping[str, str]
Optional - Map of key/value pairs that define the instance resources limits.
location str
Name of the cluster member where instance is located.
mac_address str
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
name str
Required - Name of the instance.
profiles Sequence[str]
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
project str
Optional - Name of the project where the instance will be spawned.
remote str
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
running bool
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
status str
The status of the instance.
target str
Optional - Specify a target cluster member or cluster member group.
timeouts InstanceTimeoutsArgs
type str
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
wait_for_network bool
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.
allowRestart Boolean
Optional - Allow instance to be stopped and restarted if required by the provider for operations like migration or renaming.
config Map<String>
Optional - Map of key/value pairs of instance config settings.
description String
Optional - Description of the instance.
devices List<Property Map>
Optional - Device definition. See reference below.
ephemeral Boolean
Optional - Boolean indicating if this instance is ephemeral. Defaults to false.
execs Map<Property Map>
Optional - Map of exec commands to run within the instance. See reference below.
files List<Property Map>
Optional - File to upload to the instance. See reference below.
image String
Optional - Base image from which the instance will be created. For containers it must specify an image accessible from the provider remote. If omitted, it is equivalent to the --empty CLI flag and creates an empty virtual machine.
interfaces Map<Property Map>
Map of all instance network interfaces (excluding loopback device). The map key represents the name of the network device (from LXD configuration).
ipv4Address String
The instance's global IPv4 address. See Instance Network Access for more details.
ipv6Address String
The instance's global IPv6 address. See Instance Network Access for more details.
limits Map<String>
Optional - Map of key/value pairs that define the instance resources limits.
location String
Name of the cluster member where instance is located.
macAddress String
The MAC address of the network interface. If MAC address is not available, the instance has no global IP address. See Instance Network Access for more details.
name String
Required - Name of the instance.
profiles List<String>
Optional - List of LXD config profiles to apply to the new instance. Profile default will be applied if profiles are not set (are null). However, if an empty array ([]) is set as a value, no profiles will be applied.
project String
Optional - Name of the project where the instance will be spawned.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
running Boolean
Optional - Boolean indicating whether the instance should be started (running). Defaults to true.
status String
The status of the instance.
target String
Optional - Specify a target cluster member or cluster member group.
timeouts Property Map
type String
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
waitForNetwork Boolean
Optional - Boolean indicating if the provider should wait for the instance to get an IPv4 address before considering the instance as started. If running is set to false or instance is already running (on update), this value has no effect. Defaults to true.

Supporting Types

InstanceDevice
, InstanceDeviceArgs

Name This property is required. string
Required - Name of the device.
Properties This property is required. Dictionary<string, string>
Required - Map of key/value pairs of device properties.
Type This property is required. string
Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
Name This property is required. string
Required - Name of the device.
Properties This property is required. map[string]string
Required - Map of key/value pairs of device properties.
Type This property is required. string
Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
name This property is required. String
Required - Name of the device.
properties This property is required. Map<String,String>
Required - Map of key/value pairs of device properties.
type This property is required. String
Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
name This property is required. string
Required - Name of the device.
properties This property is required. {[key: string]: string}
Required - Map of key/value pairs of device properties.
type This property is required. string
Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
name This property is required. str
Required - Name of the device.
properties This property is required. Mapping[str, str]
Required - Map of key/value pairs of device properties.
type This property is required. str
Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
name This property is required. String
Required - Name of the device.
properties This property is required. Map<String>
Required - Map of key/value pairs of device properties.
type This property is required. String
Required - Type of the device Must be one of none, disk, nic, unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.

InstanceExecs
, InstanceExecsArgs

Commands This property is required. List<string>
Required - The command to be executed and its arguments, if any (list of strings).
Enabled bool
Optional - Boolean indicating whether the command should be executed. Defaults to true.
Environment Dictionary<string, string>
Optional - Map of additional environment variables. (Variables PATH, LANG, HOME, and USER are set by default, unless passed by the user.)
ExitCode double
Exit code of the command
FailOnError bool
Optional - Boolean indicating whether resource provisioning should stop upon encountering an error during command execution. Defaults to false.
Gid double

Optional - The group ID for running command. Defaults to 0 (root).

Note: Command will be executed only when it is enabled, trigger condition is met, and instance is running (or started).

RecordOutput bool
Optional - When set to true, stdout and stderr attributes will be populated (exported). Defaults to false.
RunCount double
Internal run count indicating how many times the command was executed
Stderr string
Command standard error (if recorded)
Stdout string
Command standard output (if recorded)
Trigger string
Optional - Determines when the command should be executed. Available values are:
Uid double
Optional - The user ID for running command. Defaults to 0 (root).
WorkingDir string
Optional - The directory in which the command should run.
Commands This property is required. []string
Required - The command to be executed and its arguments, if any (list of strings).
Enabled bool
Optional - Boolean indicating whether the command should be executed. Defaults to true.
Environment map[string]string
Optional - Map of additional environment variables. (Variables PATH, LANG, HOME, and USER are set by default, unless passed by the user.)
ExitCode float64
Exit code of the command
FailOnError bool
Optional - Boolean indicating whether resource provisioning should stop upon encountering an error during command execution. Defaults to false.
Gid float64

Optional - The group ID for running command. Defaults to 0 (root).

Note: Command will be executed only when it is enabled, trigger condition is met, and instance is running (or started).

RecordOutput bool
Optional - When set to true, stdout and stderr attributes will be populated (exported). Defaults to false.
RunCount float64
Internal run count indicating how many times the command was executed
Stderr string
Command standard error (if recorded)
Stdout string
Command standard output (if recorded)
Trigger string
Optional - Determines when the command should be executed. Available values are:
Uid float64
Optional - The user ID for running command. Defaults to 0 (root).
WorkingDir string
Optional - The directory in which the command should run.
commands This property is required. List<String>
Required - The command to be executed and its arguments, if any (list of strings).
enabled Boolean
Optional - Boolean indicating whether the command should be executed. Defaults to true.
environment Map<String,String>
Optional - Map of additional environment variables. (Variables PATH, LANG, HOME, and USER are set by default, unless passed by the user.)
exitCode Double
Exit code of the command
failOnError Boolean
Optional - Boolean indicating whether resource provisioning should stop upon encountering an error during command execution. Defaults to false.
gid Double

Optional - The group ID for running command. Defaults to 0 (root).

Note: Command will be executed only when it is enabled, trigger condition is met, and instance is running (or started).

recordOutput Boolean
Optional - When set to true, stdout and stderr attributes will be populated (exported). Defaults to false.
runCount Double
Internal run count indicating how many times the command was executed
stderr String
Command standard error (if recorded)
stdout String
Command standard output (if recorded)
trigger String
Optional - Determines when the command should be executed. Available values are:
uid Double
Optional - The user ID for running command. Defaults to 0 (root).
workingDir String
Optional - The directory in which the command should run.
commands This property is required. string[]
Required - The command to be executed and its arguments, if any (list of strings).
enabled boolean
Optional - Boolean indicating whether the command should be executed. Defaults to true.
environment {[key: string]: string}
Optional - Map of additional environment variables. (Variables PATH, LANG, HOME, and USER are set by default, unless passed by the user.)
exitCode number
Exit code of the command
failOnError boolean
Optional - Boolean indicating whether resource provisioning should stop upon encountering an error during command execution. Defaults to false.
gid number

Optional - The group ID for running command. Defaults to 0 (root).

Note: Command will be executed only when it is enabled, trigger condition is met, and instance is running (or started).

recordOutput boolean
Optional - When set to true, stdout and stderr attributes will be populated (exported). Defaults to false.
runCount number
Internal run count indicating how many times the command was executed
stderr string
Command standard error (if recorded)
stdout string
Command standard output (if recorded)
trigger string
Optional - Determines when the command should be executed. Available values are:
uid number
Optional - The user ID for running command. Defaults to 0 (root).
workingDir string
Optional - The directory in which the command should run.
commands This property is required. Sequence[str]
Required - The command to be executed and its arguments, if any (list of strings).
enabled bool
Optional - Boolean indicating whether the command should be executed. Defaults to true.
environment Mapping[str, str]
Optional - Map of additional environment variables. (Variables PATH, LANG, HOME, and USER are set by default, unless passed by the user.)
exit_code float
Exit code of the command
fail_on_error bool
Optional - Boolean indicating whether resource provisioning should stop upon encountering an error during command execution. Defaults to false.
gid float

Optional - The group ID for running command. Defaults to 0 (root).

Note: Command will be executed only when it is enabled, trigger condition is met, and instance is running (or started).

record_output bool
Optional - When set to true, stdout and stderr attributes will be populated (exported). Defaults to false.
run_count float
Internal run count indicating how many times the command was executed
stderr str
Command standard error (if recorded)
stdout str
Command standard output (if recorded)
trigger str
Optional - Determines when the command should be executed. Available values are:
uid float
Optional - The user ID for running command. Defaults to 0 (root).
working_dir str
Optional - The directory in which the command should run.
commands This property is required. List<String>
Required - The command to be executed and its arguments, if any (list of strings).
enabled Boolean
Optional - Boolean indicating whether the command should be executed. Defaults to true.
environment Map<String>
Optional - Map of additional environment variables. (Variables PATH, LANG, HOME, and USER are set by default, unless passed by the user.)
exitCode Number
Exit code of the command
failOnError Boolean
Optional - Boolean indicating whether resource provisioning should stop upon encountering an error during command execution. Defaults to false.
gid Number

Optional - The group ID for running command. Defaults to 0 (root).

Note: Command will be executed only when it is enabled, trigger condition is met, and instance is running (or started).

recordOutput Boolean
Optional - When set to true, stdout and stderr attributes will be populated (exported). Defaults to false.
runCount Number
Internal run count indicating how many times the command was executed
stderr String
Command standard error (if recorded)
stdout String
Command standard output (if recorded)
trigger String
Optional - Determines when the command should be executed. Available values are:
uid Number
Optional - The user ID for running command. Defaults to 0 (root).
workingDir String
Optional - The directory in which the command should run.

InstanceFile
, InstanceFileArgs

TargetPath This property is required. string
Required - The absolute path of the file on the instance, including the filename.
Append bool
Content string
Required unless source_path is used - The contents of the file. Use the file() function to read in the content of a file from disk.
CreateDirectories bool
Optional - Whether to create the directories leading to the target if they do not exist.
Gid double
Optional - The GID of the file. Must be an unquoted integer.
Mode string
Optional - The octal permissions of the file, must be quoted. Defaults to 0755.
SourcePath string
Required unless content is used - The source path to a file to copy to the instance.
Uid double
Optional - The UID of the file. Must be an unquoted integer.
TargetPath This property is required. string
Required - The absolute path of the file on the instance, including the filename.
Append bool
Content string
Required unless source_path is used - The contents of the file. Use the file() function to read in the content of a file from disk.
CreateDirectories bool
Optional - Whether to create the directories leading to the target if they do not exist.
Gid float64
Optional - The GID of the file. Must be an unquoted integer.
Mode string
Optional - The octal permissions of the file, must be quoted. Defaults to 0755.
SourcePath string
Required unless content is used - The source path to a file to copy to the instance.
Uid float64
Optional - The UID of the file. Must be an unquoted integer.
targetPath This property is required. String
Required - The absolute path of the file on the instance, including the filename.
append Boolean
content String
Required unless source_path is used - The contents of the file. Use the file() function to read in the content of a file from disk.
createDirectories Boolean
Optional - Whether to create the directories leading to the target if they do not exist.
gid Double
Optional - The GID of the file. Must be an unquoted integer.
mode String
Optional - The octal permissions of the file, must be quoted. Defaults to 0755.
sourcePath String
Required unless content is used - The source path to a file to copy to the instance.
uid Double
Optional - The UID of the file. Must be an unquoted integer.
targetPath This property is required. string
Required - The absolute path of the file on the instance, including the filename.
append boolean
content string
Required unless source_path is used - The contents of the file. Use the file() function to read in the content of a file from disk.
createDirectories boolean
Optional - Whether to create the directories leading to the target if they do not exist.
gid number
Optional - The GID of the file. Must be an unquoted integer.
mode string
Optional - The octal permissions of the file, must be quoted. Defaults to 0755.
sourcePath string
Required unless content is used - The source path to a file to copy to the instance.
uid number
Optional - The UID of the file. Must be an unquoted integer.
target_path This property is required. str
Required - The absolute path of the file on the instance, including the filename.
append bool
content str
Required unless source_path is used - The contents of the file. Use the file() function to read in the content of a file from disk.
create_directories bool
Optional - Whether to create the directories leading to the target if they do not exist.
gid float
Optional - The GID of the file. Must be an unquoted integer.
mode str
Optional - The octal permissions of the file, must be quoted. Defaults to 0755.
source_path str
Required unless content is used - The source path to a file to copy to the instance.
uid float
Optional - The UID of the file. Must be an unquoted integer.
targetPath This property is required. String
Required - The absolute path of the file on the instance, including the filename.
append Boolean
content String
Required unless source_path is used - The contents of the file. Use the file() function to read in the content of a file from disk.
createDirectories Boolean
Optional - Whether to create the directories leading to the target if they do not exist.
gid Number
Optional - The GID of the file. Must be an unquoted integer.
mode String
Optional - The octal permissions of the file, must be quoted. Defaults to 0755.
sourcePath String
Required unless content is used - The source path to a file to copy to the instance.
uid Number
Optional - The UID of the file. Must be an unquoted integer.

InstanceInterfaces
, InstanceInterfacesArgs

Ips List<InstanceInterfacesIp>
IP addresses assigned to the interface
Name string
Required - Name of the instance.
State string
State of the network interface (up, down)
Type string
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
Ips []InstanceInterfacesIp
IP addresses assigned to the interface
Name string
Required - Name of the instance.
State string
State of the network interface (up, down)
Type string
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
ips List<InstanceInterfacesIp>
IP addresses assigned to the interface
name String
Required - Name of the instance.
state String
State of the network interface (up, down)
type String
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
ips InstanceInterfacesIp[]
IP addresses assigned to the interface
name string
Required - Name of the instance.
state string
State of the network interface (up, down)
type string
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
ips Sequence[InstanceInterfacesIp]
IP addresses assigned to the interface
name str
Required - Name of the instance.
state str
State of the network interface (up, down)
type str
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.
ips List<Property Map>
IP addresses assigned to the interface
name String
Required - Name of the instance.
state String
State of the network interface (up, down)
type String
Optional - Instance type. Can be container, or virtual-machine. Defaults to container.

InstanceInterfacesIp
, InstanceInterfacesIpArgs

Address string
IP address
Family string
IP family (inet, inet6)
Scope string
Scope (local, global, link)
Address string
IP address
Family string
IP family (inet, inet6)
Scope string
Scope (local, global, link)
address String
IP address
family String
IP family (inet, inet6)
scope String
Scope (local, global, link)
address string
IP address
family string
IP family (inet, inet6)
scope string
Scope (local, global, link)
address str
IP address
family str
IP family (inet, inet6)
scope str
Scope (local, global, link)
address String
IP address
family String
IP family (inet, inet6)
scope String
Scope (local, global, link)

InstanceTimeouts
, InstanceTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Package Details

Repository
lxd terraform-lxd/terraform-provider-lxd
License
Notes
This Pulumi package is based on the lxd Terraform Provider.