1. Packages
  2. Linode Provider
  3. API Docs
  4. InstanceDisk
Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi

linode.InstanceDisk

Explore with Pulumi AI

Provides a Linode Instance Disk resource. This can be used to create, modify, and delete Linode Instance Disks. For more information, see the Linode APIv4 docs.

NOTE: Deleting a disk will shut down the attached instance if the instance is booted. If the disk was not in use by the booted configuration profile, the instance will be automatically rebooted.

Example Usage

Creating a simple 512 MB Linode Instance Disk:

import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const my_instance = new linode.Instance("my-instance", {
    label: "my-instance",
    type: "g6-standard-1",
    region: "us-southeast",
});
const boot = new linode.InstanceDisk("boot", {
    label: "boot",
    linodeId: my_instance.id,
    size: 512,
    filesystem: "ext4",
});
Copy
import pulumi
import pulumi_linode as linode

my_instance = linode.Instance("my-instance",
    label="my-instance",
    type="g6-standard-1",
    region="us-southeast")
boot = linode.InstanceDisk("boot",
    label="boot",
    linode_id=my_instance.id,
    size=512,
    filesystem="ext4")
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		my_instance, err := linode.NewInstance(ctx, "my-instance", &linode.InstanceArgs{
			Label:  pulumi.String("my-instance"),
			Type:   pulumi.String("g6-standard-1"),
			Region: pulumi.String("us-southeast"),
		})
		if err != nil {
			return err
		}
		_, err = linode.NewInstanceDisk(ctx, "boot", &linode.InstanceDiskArgs{
			Label:      pulumi.String("boot"),
			LinodeId:   my_instance.ID(),
			Size:       pulumi.Int(512),
			Filesystem: pulumi.String("ext4"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var my_instance = new Linode.Instance("my-instance", new()
    {
        Label = "my-instance",
        Type = "g6-standard-1",
        Region = "us-southeast",
    });

    var boot = new Linode.InstanceDisk("boot", new()
    {
        Label = "boot",
        LinodeId = my_instance.Id,
        Size = 512,
        Filesystem = "ext4",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.Instance;
import com.pulumi.linode.InstanceArgs;
import com.pulumi.linode.InstanceDisk;
import com.pulumi.linode.InstanceDiskArgs;
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) {
        var my_instance = new Instance("my-instance", InstanceArgs.builder()
            .label("my-instance")
            .type("g6-standard-1")
            .region("us-southeast")
            .build());

        var boot = new InstanceDisk("boot", InstanceDiskArgs.builder()
            .label("boot")
            .linodeId(my_instance.id())
            .size(512)
            .filesystem("ext4")
            .build());

    }
}
Copy
resources:
  boot:
    type: linode:InstanceDisk
    properties:
      label: boot
      linodeId: ${["my-instance"].id}
      size: 512
      filesystem: ext4
  my-instance:
    type: linode:Instance
    properties:
      label: my-instance
      type: g6-standard-1
      region: us-southeast
Copy

Creating a complex bootable Instance Disk:

import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const my_instance = new linode.Instance("my-instance", {
    label: "my-instance",
    type: "g6-standard-1",
    region: "us-southeast",
});
const boot = new linode.InstanceDisk("boot", {
    label: "boot",
    linodeId: my_instance.id,
    size: my_instance.specs.apply(specs => specs.disk),
    image: "linode/ubuntu22.04",
    rootPass: "myc00lpass!",
    authorizedKeys: ["ssh-rsa AAAA...Gw== user@example.local"],
    stackscriptId: 12345,
    stackscriptData: {
        my_var: "my_value",
    },
});
Copy
import pulumi
import pulumi_linode as linode

my_instance = linode.Instance("my-instance",
    label="my-instance",
    type="g6-standard-1",
    region="us-southeast")
boot = linode.InstanceDisk("boot",
    label="boot",
    linode_id=my_instance.id,
    size=my_instance.specs.disk,
    image="linode/ubuntu22.04",
    root_pass="myc00lpass!",
    authorized_keys=["ssh-rsa AAAA...Gw== user@example.local"],
    stackscript_id=12345,
    stackscript_data={
        "my_var": "my_value",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		my_instance, err := linode.NewInstance(ctx, "my-instance", &linode.InstanceArgs{
			Label:  pulumi.String("my-instance"),
			Type:   pulumi.String("g6-standard-1"),
			Region: pulumi.String("us-southeast"),
		})
		if err != nil {
			return err
		}
		_, err = linode.NewInstanceDisk(ctx, "boot", &linode.InstanceDiskArgs{
			Label:    pulumi.String("boot"),
			LinodeId: my_instance.ID(),
			Size: pulumi.Int(my_instance.Specs.ApplyT(func(specs linode.InstanceSpecs) (*int, error) {
				return &specs.Disk, nil
			}).(pulumi.IntPtrOutput)),
			Image:    pulumi.String("linode/ubuntu22.04"),
			RootPass: pulumi.String("myc00lpass!"),
			AuthorizedKeys: pulumi.StringArray{
				pulumi.String("ssh-rsa AAAA...Gw== user@example.local"),
			},
			StackscriptId: pulumi.Int(12345),
			StackscriptData: pulumi.StringMap{
				"my_var": pulumi.String("my_value"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var my_instance = new Linode.Instance("my-instance", new()
    {
        Label = "my-instance",
        Type = "g6-standard-1",
        Region = "us-southeast",
    });

    var boot = new Linode.InstanceDisk("boot", new()
    {
        Label = "boot",
        LinodeId = my_instance.Id,
        Size = my_instance.Specs.Apply(specs => specs.Disk),
        Image = "linode/ubuntu22.04",
        RootPass = "myc00lpass!",
        AuthorizedKeys = new[]
        {
            "ssh-rsa AAAA...Gw== user@example.local",
        },
        StackscriptId = 12345,
        StackscriptData = 
        {
            { "my_var", "my_value" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.Instance;
import com.pulumi.linode.InstanceArgs;
import com.pulumi.linode.InstanceDisk;
import com.pulumi.linode.InstanceDiskArgs;
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) {
        var my_instance = new Instance("my-instance", InstanceArgs.builder()
            .label("my-instance")
            .type("g6-standard-1")
            .region("us-southeast")
            .build());

        var boot = new InstanceDisk("boot", InstanceDiskArgs.builder()
            .label("boot")
            .linodeId(my_instance.id())
            .size(my_instance.specs().applyValue(_specs -> _specs.disk()))
            .image("linode/ubuntu22.04")
            .rootPass("myc00lpass!")
            .authorizedKeys("ssh-rsa AAAA...Gw== user@example.local")
            .stackscriptId(12345)
            .stackscriptData(Map.of("my_var", "my_value"))
            .build());

    }
}
Copy
resources:
  boot:
    type: linode:InstanceDisk
    properties:
      label: boot
      linodeId: ${["my-instance"].id}
      size: ${["my-instance"].specs.disk}
      image: linode/ubuntu22.04
      rootPass: myc00lpass!
      authorizedKeys:
        - ssh-rsa AAAA...Gw== user@example.local
      stackscriptId: 12345
      stackscriptData:
        my_var: my_value
  my-instance:
    type: linode:Instance
    properties:
      label: my-instance
      type: g6-standard-1
      region: us-southeast
Copy

Create InstanceDisk Resource

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

Constructor syntax

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

@overload
def InstanceDisk(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 label: Optional[str] = None,
                 linode_id: Optional[int] = None,
                 size: Optional[int] = None,
                 authorized_keys: Optional[Sequence[str]] = None,
                 authorized_users: Optional[Sequence[str]] = None,
                 filesystem: Optional[str] = None,
                 image: Optional[str] = None,
                 root_pass: Optional[str] = None,
                 stackscript_data: Optional[Mapping[str, str]] = None,
                 stackscript_id: Optional[int] = None,
                 timeouts: Optional[InstanceDiskTimeoutsArgs] = None)
func NewInstanceDisk(ctx *Context, name string, args InstanceDiskArgs, opts ...ResourceOption) (*InstanceDisk, error)
public InstanceDisk(string name, InstanceDiskArgs args, CustomResourceOptions? opts = null)
public InstanceDisk(String name, InstanceDiskArgs args)
public InstanceDisk(String name, InstanceDiskArgs args, CustomResourceOptions options)
type: linode:InstanceDisk
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 This property is required. InstanceDiskArgs
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 This property is required. InstanceDiskInitArgs
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 This property is required. InstanceDiskArgs
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 This property is required. InstanceDiskArgs
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. InstanceDiskArgs
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 instanceDiskResource = new Linode.InstanceDisk("instanceDiskResource", new()
{
    Label = "string",
    LinodeId = 0,
    Size = 0,
    AuthorizedKeys = new[]
    {
        "string",
    },
    AuthorizedUsers = new[]
    {
        "string",
    },
    Filesystem = "string",
    Image = "string",
    RootPass = "string",
    StackscriptData = 
    {
        { "string", "string" },
    },
    StackscriptId = 0,
    Timeouts = new Linode.Inputs.InstanceDiskTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := linode.NewInstanceDisk(ctx, "instanceDiskResource", &linode.InstanceDiskArgs{
	Label:    pulumi.String("string"),
	LinodeId: pulumi.Int(0),
	Size:     pulumi.Int(0),
	AuthorizedKeys: pulumi.StringArray{
		pulumi.String("string"),
	},
	AuthorizedUsers: pulumi.StringArray{
		pulumi.String("string"),
	},
	Filesystem: pulumi.String("string"),
	Image:      pulumi.String("string"),
	RootPass:   pulumi.String("string"),
	StackscriptData: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	StackscriptId: pulumi.Int(0),
	Timeouts: &linode.InstanceDiskTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var instanceDiskResource = new InstanceDisk("instanceDiskResource", InstanceDiskArgs.builder()
    .label("string")
    .linodeId(0)
    .size(0)
    .authorizedKeys("string")
    .authorizedUsers("string")
    .filesystem("string")
    .image("string")
    .rootPass("string")
    .stackscriptData(Map.of("string", "string"))
    .stackscriptId(0)
    .timeouts(InstanceDiskTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
instance_disk_resource = linode.InstanceDisk("instanceDiskResource",
    label="string",
    linode_id=0,
    size=0,
    authorized_keys=["string"],
    authorized_users=["string"],
    filesystem="string",
    image="string",
    root_pass="string",
    stackscript_data={
        "string": "string",
    },
    stackscript_id=0,
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const instanceDiskResource = new linode.InstanceDisk("instanceDiskResource", {
    label: "string",
    linodeId: 0,
    size: 0,
    authorizedKeys: ["string"],
    authorizedUsers: ["string"],
    filesystem: "string",
    image: "string",
    rootPass: "string",
    stackscriptData: {
        string: "string",
    },
    stackscriptId: 0,
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: linode:InstanceDisk
properties:
    authorizedKeys:
        - string
    authorizedUsers:
        - string
    filesystem: string
    image: string
    label: string
    linodeId: 0
    rootPass: string
    size: 0
    stackscriptData:
        string: string
    stackscriptId: 0
    timeouts:
        create: string
        delete: string
        update: string
Copy

InstanceDisk 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 InstanceDisk resource accepts the following input properties:

Label This property is required. string
The Disk's label for display purposes only.
LinodeId This property is required. int
The ID of the Linode to create this Disk under.
Size This property is required. int
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


AuthorizedKeys List<string>
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
AuthorizedUsers List<string>
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
Filesystem string
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
Image string
An Image ID to deploy the Linode Disk from.
RootPass string
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
StackscriptData Dictionary<string, string>
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
StackscriptId int
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
Timeouts InstanceDiskTimeouts
Label This property is required. string
The Disk's label for display purposes only.
LinodeId This property is required. int
The ID of the Linode to create this Disk under.
Size This property is required. int
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


AuthorizedKeys []string
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
AuthorizedUsers []string
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
Filesystem string
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
Image string
An Image ID to deploy the Linode Disk from.
RootPass string
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
StackscriptData map[string]string
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
StackscriptId int
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
Timeouts InstanceDiskTimeoutsArgs
label This property is required. String
The Disk's label for display purposes only.
linodeId This property is required. Integer
The ID of the Linode to create this Disk under.
size This property is required. Integer
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


authorizedKeys List<String>
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
authorizedUsers List<String>
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
filesystem String
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
image String
An Image ID to deploy the Linode Disk from.
rootPass String
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
stackscriptData Map<String,String>
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
stackscriptId Integer
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
timeouts InstanceDiskTimeouts
label This property is required. string
The Disk's label for display purposes only.
linodeId This property is required. number
The ID of the Linode to create this Disk under.
size This property is required. number
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


authorizedKeys string[]
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
authorizedUsers string[]
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
filesystem string
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
image string
An Image ID to deploy the Linode Disk from.
rootPass string
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
stackscriptData {[key: string]: string}
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
stackscriptId number
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
timeouts InstanceDiskTimeouts
label This property is required. str
The Disk's label for display purposes only.
linode_id This property is required. int
The ID of the Linode to create this Disk under.
size This property is required. int
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


authorized_keys Sequence[str]
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
authorized_users Sequence[str]
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
filesystem str
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
image str
An Image ID to deploy the Linode Disk from.
root_pass str
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
stackscript_data Mapping[str, str]
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
stackscript_id int
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
timeouts InstanceDiskTimeoutsArgs
label This property is required. String
The Disk's label for display purposes only.
linodeId This property is required. Number
The ID of the Linode to create this Disk under.
size This property is required. Number
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


authorizedKeys List<String>
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
authorizedUsers List<String>
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
filesystem String
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
image String
An Image ID to deploy the Linode Disk from.
rootPass String
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
stackscriptData Map<String>
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
stackscriptId Number
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
timeouts Property Map

Outputs

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

Created string
When this disk was created.
DiskEncryption string
The disk encryption policy for this disk's parent instance. (enabled, disabled)
Id string
The provider-assigned unique ID for this managed resource.
Status string
A brief description of this Disk's current state.
Updated string
When this disk was last updated.
Created string
When this disk was created.
DiskEncryption string
The disk encryption policy for this disk's parent instance. (enabled, disabled)
Id string
The provider-assigned unique ID for this managed resource.
Status string
A brief description of this Disk's current state.
Updated string
When this disk was last updated.
created String
When this disk was created.
diskEncryption String
The disk encryption policy for this disk's parent instance. (enabled, disabled)
id String
The provider-assigned unique ID for this managed resource.
status String
A brief description of this Disk's current state.
updated String
When this disk was last updated.
created string
When this disk was created.
diskEncryption string
The disk encryption policy for this disk's parent instance. (enabled, disabled)
id string
The provider-assigned unique ID for this managed resource.
status string
A brief description of this Disk's current state.
updated string
When this disk was last updated.
created str
When this disk was created.
disk_encryption str
The disk encryption policy for this disk's parent instance. (enabled, disabled)
id str
The provider-assigned unique ID for this managed resource.
status str
A brief description of this Disk's current state.
updated str
When this disk was last updated.
created String
When this disk was created.
diskEncryption String
The disk encryption policy for this disk's parent instance. (enabled, disabled)
id String
The provider-assigned unique ID for this managed resource.
status String
A brief description of this Disk's current state.
updated String
When this disk was last updated.

Look up Existing InstanceDisk Resource

Get an existing InstanceDisk 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?: InstanceDiskState, opts?: CustomResourceOptions): InstanceDisk
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authorized_keys: Optional[Sequence[str]] = None,
        authorized_users: Optional[Sequence[str]] = None,
        created: Optional[str] = None,
        disk_encryption: Optional[str] = None,
        filesystem: Optional[str] = None,
        image: Optional[str] = None,
        label: Optional[str] = None,
        linode_id: Optional[int] = None,
        root_pass: Optional[str] = None,
        size: Optional[int] = None,
        stackscript_data: Optional[Mapping[str, str]] = None,
        stackscript_id: Optional[int] = None,
        status: Optional[str] = None,
        timeouts: Optional[InstanceDiskTimeoutsArgs] = None,
        updated: Optional[str] = None) -> InstanceDisk
func GetInstanceDisk(ctx *Context, name string, id IDInput, state *InstanceDiskState, opts ...ResourceOption) (*InstanceDisk, error)
public static InstanceDisk Get(string name, Input<string> id, InstanceDiskState? state, CustomResourceOptions? opts = null)
public static InstanceDisk get(String name, Output<String> id, InstanceDiskState state, CustomResourceOptions options)
resources:  _:    type: linode:InstanceDisk    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:
AuthorizedKeys List<string>
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
AuthorizedUsers List<string>
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
Created string
When this disk was created.
DiskEncryption string
The disk encryption policy for this disk's parent instance. (enabled, disabled)
Filesystem string
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
Image string
An Image ID to deploy the Linode Disk from.
Label string
The Disk's label for display purposes only.
LinodeId int
The ID of the Linode to create this Disk under.
RootPass string
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
Size int
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


StackscriptData Dictionary<string, string>
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
StackscriptId int
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
Status string
A brief description of this Disk's current state.
Timeouts InstanceDiskTimeouts
Updated string
When this disk was last updated.
AuthorizedKeys []string
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
AuthorizedUsers []string
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
Created string
When this disk was created.
DiskEncryption string
The disk encryption policy for this disk's parent instance. (enabled, disabled)
Filesystem string
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
Image string
An Image ID to deploy the Linode Disk from.
Label string
The Disk's label for display purposes only.
LinodeId int
The ID of the Linode to create this Disk under.
RootPass string
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
Size int
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


StackscriptData map[string]string
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
StackscriptId int
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
Status string
A brief description of this Disk's current state.
Timeouts InstanceDiskTimeoutsArgs
Updated string
When this disk was last updated.
authorizedKeys List<String>
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
authorizedUsers List<String>
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
created String
When this disk was created.
diskEncryption String
The disk encryption policy for this disk's parent instance. (enabled, disabled)
filesystem String
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
image String
An Image ID to deploy the Linode Disk from.
label String
The Disk's label for display purposes only.
linodeId Integer
The ID of the Linode to create this Disk under.
rootPass String
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
size Integer
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


stackscriptData Map<String,String>
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
stackscriptId Integer
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
status String
A brief description of this Disk's current state.
timeouts InstanceDiskTimeouts
updated String
When this disk was last updated.
authorizedKeys string[]
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
authorizedUsers string[]
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
created string
When this disk was created.
diskEncryption string
The disk encryption policy for this disk's parent instance. (enabled, disabled)
filesystem string
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
image string
An Image ID to deploy the Linode Disk from.
label string
The Disk's label for display purposes only.
linodeId number
The ID of the Linode to create this Disk under.
rootPass string
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
size number
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


stackscriptData {[key: string]: string}
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
stackscriptId number
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
status string
A brief description of this Disk's current state.
timeouts InstanceDiskTimeouts
updated string
When this disk was last updated.
authorized_keys Sequence[str]
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
authorized_users Sequence[str]
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
created str
When this disk was created.
disk_encryption str
The disk encryption policy for this disk's parent instance. (enabled, disabled)
filesystem str
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
image str
An Image ID to deploy the Linode Disk from.
label str
The Disk's label for display purposes only.
linode_id int
The ID of the Linode to create this Disk under.
root_pass str
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
size int
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


stackscript_data Mapping[str, str]
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
stackscript_id int
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
status str
A brief description of this Disk's current state.
timeouts InstanceDiskTimeoutsArgs
updated str
When this disk was last updated.
authorizedKeys List<String>
A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image. (Requires image)
authorizedUsers List<String>
A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root user's ~/.ssh/authorized_keys file. (Requires image)
created String
When this disk was created.
diskEncryption String
The disk encryption policy for this disk's parent instance. (enabled, disabled)
filesystem String
The filesystem of this disk. (raw, swap, ext3, ext4, initrd)
image String
An Image ID to deploy the Linode Disk from.
label String
The Disk's label for display purposes only.
linodeId Number
The ID of the Linode to create this Disk under.
rootPass String
The root user’s password on a newly-created Linode Disk when deploying from an Image. (Requires image)
size Number
The size of the Disk in MB. NOTE: Resizing a disk will trigger a Linode reboot.


stackscriptData Map<String>
An object containing responses to any User Defined Fields present in the StackScript being deployed to this Disk. Only accepted if stackscript_id is given. (Requires image)
stackscriptId Number
A StackScript ID that will cause the referenced StackScript to be run during deployment of this Disk. (Requires image)
status String
A brief description of this Disk's current state.
timeouts Property Map
updated String
When this disk was last updated.

Supporting Types

InstanceDiskTimeouts
, InstanceDiskTimeoutsArgs

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

Import

Instance Disks can be imported using the linode_id followed by the Instance Disk id separated by a comma, e.g.

$ pulumi import linode:index/instanceDisk:InstanceDisk my-disk 1234567,7654321
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Linode pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.