1. Packages
  2. Linode Provider
  3. API Docs
  4. Image
Linode v4.30.1 published on Thursday, Nov 21, 2024 by Pulumi

linode.Image

Explore with Pulumi AI

linode logo
Linode v4.30.1 published on Thursday, Nov 21, 2024 by Pulumi

    Provides a Linode Image resource. This can be used to create, modify, and delete Linodes Images. Linode Images are snapshots of a Linode Instance Disk which can then be used to provision more Linode Instances. Images can be used across regions.

    For more information, see Linode’s documentation on Images and the Linode APIv4 docs.

    Example Usage

    Creating an image from an existing Linode Instance and deploying another instance with that image:

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const foo = new linode.Instance("foo", {
        type: "g6-nanode-1",
        region: "us-central",
        image: "linode/ubuntu22.04",
        rootPass: "insecure-p4ssw0rd!!",
    });
    const bar = new linode.Image("bar", {
        label: "foo-sda-image",
        description: "Image taken from foo",
        diskId: foo.disks.apply(disks => disks[0].id),
        linodeId: foo.id,
        tags: [
            "image-tag",
            "test",
        ],
    });
    const barBased = new linode.Instance("bar_based", {
        type: foo.type,
        region: "eu-west",
        image: bar.id,
    });
    
    import pulumi
    import pulumi_linode as linode
    
    foo = linode.Instance("foo",
        type="g6-nanode-1",
        region="us-central",
        image="linode/ubuntu22.04",
        root_pass="insecure-p4ssw0rd!!")
    bar = linode.Image("bar",
        label="foo-sda-image",
        description="Image taken from foo",
        disk_id=foo.disks[0].id,
        linode_id=foo.id,
        tags=[
            "image-tag",
            "test",
        ])
    bar_based = linode.Instance("bar_based",
        type=foo.type,
        region="eu-west",
        image=bar.id)
    
    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 {
    		foo, err := linode.NewInstance(ctx, "foo", &linode.InstanceArgs{
    			Type:     pulumi.String("g6-nanode-1"),
    			Region:   pulumi.String("us-central"),
    			Image:    pulumi.String("linode/ubuntu22.04"),
    			RootPass: pulumi.String("insecure-p4ssw0rd!!"),
    		})
    		if err != nil {
    			return err
    		}
    		bar, err := linode.NewImage(ctx, "bar", &linode.ImageArgs{
    			Label:       pulumi.String("foo-sda-image"),
    			Description: pulumi.String("Image taken from foo"),
    			DiskId: pulumi.Int(foo.Disks.ApplyT(func(disks []linode.InstanceDiskType) (*int, error) {
    				return &disks[0].Id, nil
    			}).(pulumi.IntPtrOutput)),
    			LinodeId: foo.ID(),
    			Tags: pulumi.StringArray{
    				pulumi.String("image-tag"),
    				pulumi.String("test"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = linode.NewInstance(ctx, "bar_based", &linode.InstanceArgs{
    			Type:   foo.Type,
    			Region: pulumi.String("eu-west"),
    			Image:  bar.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Linode.Instance("foo", new()
        {
            Type = "g6-nanode-1",
            Region = "us-central",
            Image = "linode/ubuntu22.04",
            RootPass = "insecure-p4ssw0rd!!",
        });
    
        var bar = new Linode.Image("bar", new()
        {
            Label = "foo-sda-image",
            Description = "Image taken from foo",
            DiskId = foo.Disks.Apply(disks => disks[0].Id),
            LinodeId = foo.Id,
            Tags = new[]
            {
                "image-tag",
                "test",
            },
        });
    
        var barBased = new Linode.Instance("bar_based", new()
        {
            Type = foo.Type,
            Region = "eu-west",
            Image = bar.Id,
        });
    
    });
    
    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.Image;
    import com.pulumi.linode.ImageArgs;
    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 foo = new Instance("foo", InstanceArgs.builder()
                .type("g6-nanode-1")
                .region("us-central")
                .image("linode/ubuntu22.04")
                .rootPass("insecure-p4ssw0rd!!")
                .build());
    
            var bar = new Image("bar", ImageArgs.builder()
                .label("foo-sda-image")
                .description("Image taken from foo")
                .diskId(foo.disks().applyValue(disks -> disks[0].id()))
                .linodeId(foo.id())
                .tags(            
                    "image-tag",
                    "test")
                .build());
    
            var barBased = new Instance("barBased", InstanceArgs.builder()
                .type(foo.type())
                .region("eu-west")
                .image(bar.id())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: linode:Instance
        properties:
          type: g6-nanode-1
          region: us-central
          image: linode/ubuntu22.04
          rootPass: insecure-p4ssw0rd!!
      bar:
        type: linode:Image
        properties:
          label: foo-sda-image
          description: Image taken from foo
          diskId: ${foo.disks[0].id}
          linodeId: ${foo.id}
          tags:
            - image-tag
            - test
      barBased:
        type: linode:Instance
        name: bar_based
        properties:
          type: ${foo.type}
          region: eu-west
          image: ${bar.id}
    

    Creating and uploading an image from a local file:

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    import * as std from "@pulumi/std";
    
    const foobar = new linode.Image("foobar", {
        label: "foobar-image",
        description: "An image uploaded from Terraform!",
        region: "us-southeast",
        tags: [
            "image-tag",
            "test",
        ],
        filePath: "path/to/image.img.gz",
        fileHash: std.filemd5({
            input: "path/to/image.img.gz",
        }).then(invoke => invoke.result),
    });
    
    import pulumi
    import pulumi_linode as linode
    import pulumi_std as std
    
    foobar = linode.Image("foobar",
        label="foobar-image",
        description="An image uploaded from Terraform!",
        region="us-southeast",
        tags=[
            "image-tag",
            "test",
        ],
        file_path="path/to/image.img.gz",
        file_hash=std.filemd5(input="path/to/image.img.gz").result)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		invokeFilemd5, err := std.Filemd5(ctx, &std.Filemd5Args{
    			Input: "path/to/image.img.gz",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = linode.NewImage(ctx, "foobar", &linode.ImageArgs{
    			Label:       pulumi.String("foobar-image"),
    			Description: pulumi.String("An image uploaded from Terraform!"),
    			Region:      pulumi.String("us-southeast"),
    			Tags: pulumi.StringArray{
    				pulumi.String("image-tag"),
    				pulumi.String("test"),
    			},
    			FilePath: pulumi.String("path/to/image.img.gz"),
    			FileHash: pulumi.String(invokeFilemd5.Result),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var foobar = new Linode.Image("foobar", new()
        {
            Label = "foobar-image",
            Description = "An image uploaded from Terraform!",
            Region = "us-southeast",
            Tags = new[]
            {
                "image-tag",
                "test",
            },
            FilePath = "path/to/image.img.gz",
            FileHash = Std.Filemd5.Invoke(new()
            {
                Input = "path/to/image.img.gz",
            }).Apply(invoke => invoke.Result),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.Image;
    import com.pulumi.linode.ImageArgs;
    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 foobar = new Image("foobar", ImageArgs.builder()
                .label("foobar-image")
                .description("An image uploaded from Terraform!")
                .region("us-southeast")
                .tags(            
                    "image-tag",
                    "test")
                .filePath("path/to/image.img.gz")
                .fileHash(StdFunctions.filemd5(Filemd5Args.builder()
                    .input("path/to/image.img.gz")
                    .build()).result())
                .build());
    
        }
    }
    
    resources:
      foobar:
        type: linode:Image
        properties:
          label: foobar-image
          description: An image uploaded from Terraform!
          region: us-southeast
          tags:
            - image-tag
            - test
          filePath: path/to/image.img.gz
          fileHash:
            fn::invoke:
              Function: std:filemd5
              Arguments:
                input: path/to/image.img.gz
              Return: result
    

    Upload and replicate an image from a local file:

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    import * as std from "@pulumi/std";
    
    const foobar = new linode.Image("foobar", {
        label: "foobar-image",
        description: "An image uploaded from Terraform!",
        region: "us-southeast",
        tags: [
            "image-tag",
            "test",
        ],
        filePath: "path/to/image.img.gz",
        fileHash: std.filemd5({
            input: "path/to/image.img.gz",
        }).then(invoke => invoke.result),
        replicaRegions: [
            "us-southeast",
            "us-east",
            "eu-west",
        ],
    });
    
    import pulumi
    import pulumi_linode as linode
    import pulumi_std as std
    
    foobar = linode.Image("foobar",
        label="foobar-image",
        description="An image uploaded from Terraform!",
        region="us-southeast",
        tags=[
            "image-tag",
            "test",
        ],
        file_path="path/to/image.img.gz",
        file_hash=std.filemd5(input="path/to/image.img.gz").result,
        replica_regions=[
            "us-southeast",
            "us-east",
            "eu-west",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		invokeFilemd5, err := std.Filemd5(ctx, &std.Filemd5Args{
    			Input: "path/to/image.img.gz",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = linode.NewImage(ctx, "foobar", &linode.ImageArgs{
    			Label:       pulumi.String("foobar-image"),
    			Description: pulumi.String("An image uploaded from Terraform!"),
    			Region:      pulumi.String("us-southeast"),
    			Tags: pulumi.StringArray{
    				pulumi.String("image-tag"),
    				pulumi.String("test"),
    			},
    			FilePath: pulumi.String("path/to/image.img.gz"),
    			FileHash: pulumi.String(invokeFilemd5.Result),
    			ReplicaRegions: pulumi.StringArray{
    				pulumi.String("us-southeast"),
    				pulumi.String("us-east"),
    				pulumi.String("eu-west"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var foobar = new Linode.Image("foobar", new()
        {
            Label = "foobar-image",
            Description = "An image uploaded from Terraform!",
            Region = "us-southeast",
            Tags = new[]
            {
                "image-tag",
                "test",
            },
            FilePath = "path/to/image.img.gz",
            FileHash = Std.Filemd5.Invoke(new()
            {
                Input = "path/to/image.img.gz",
            }).Apply(invoke => invoke.Result),
            ReplicaRegions = new[]
            {
                "us-southeast",
                "us-east",
                "eu-west",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.Image;
    import com.pulumi.linode.ImageArgs;
    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 foobar = new Image("foobar", ImageArgs.builder()
                .label("foobar-image")
                .description("An image uploaded from Terraform!")
                .region("us-southeast")
                .tags(            
                    "image-tag",
                    "test")
                .filePath("path/to/image.img.gz")
                .fileHash(StdFunctions.filemd5(Filemd5Args.builder()
                    .input("path/to/image.img.gz")
                    .build()).result())
                .replicaRegions(            
                    "us-southeast",
                    "us-east",
                    "eu-west")
                .build());
    
        }
    }
    
    resources:
      foobar:
        type: linode:Image
        properties:
          label: foobar-image
          description: An image uploaded from Terraform!
          region: us-southeast
          tags:
            - image-tag
            - test
          filePath: path/to/image.img.gz
          fileHash:
            fn::invoke:
              Function: std:filemd5
              Arguments:
                input: path/to/image.img.gz
              Return: result
          replicaRegions:
            - us-southeast
            - us-east
            - eu-west
    

    Create Image Resource

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

    Constructor syntax

    new Image(name: string, args: ImageArgs, opts?: CustomResourceOptions);
    @overload
    def Image(resource_name: str,
              args: ImageArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Image(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              label: Optional[str] = None,
              cloud_init: Optional[bool] = None,
              description: Optional[str] = None,
              disk_id: Optional[int] = None,
              file_hash: Optional[str] = None,
              file_path: Optional[str] = None,
              linode_id: Optional[int] = None,
              region: Optional[str] = None,
              replica_regions: Optional[Sequence[str]] = None,
              tags: Optional[Sequence[str]] = None,
              timeouts: Optional[ImageTimeoutsArgs] = None,
              wait_for_replications: Optional[bool] = None)
    func NewImage(ctx *Context, name string, args ImageArgs, opts ...ResourceOption) (*Image, error)
    public Image(string name, ImageArgs args, CustomResourceOptions? opts = null)
    public Image(String name, ImageArgs args)
    public Image(String name, ImageArgs args, CustomResourceOptions options)
    
    type: linode:Image
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ImageArgs
    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 imageResource = new Linode.Image("imageResource", new()
    {
        Label = "string",
        CloudInit = false,
        Description = "string",
        DiskId = 0,
        FileHash = "string",
        FilePath = "string",
        LinodeId = 0,
        Region = "string",
        ReplicaRegions = new[]
        {
            "string",
        },
        Tags = new[]
        {
            "string",
        },
        Timeouts = new Linode.Inputs.ImageTimeoutsArgs
        {
            Create = "string",
        },
        WaitForReplications = false,
    });
    
    example, err := linode.NewImage(ctx, "imageResource", &linode.ImageArgs{
    	Label:       pulumi.String("string"),
    	CloudInit:   pulumi.Bool(false),
    	Description: pulumi.String("string"),
    	DiskId:      pulumi.Int(0),
    	FileHash:    pulumi.String("string"),
    	FilePath:    pulumi.String("string"),
    	LinodeId:    pulumi.Int(0),
    	Region:      pulumi.String("string"),
    	ReplicaRegions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &linode.ImageTimeoutsArgs{
    		Create: pulumi.String("string"),
    	},
    	WaitForReplications: pulumi.Bool(false),
    })
    
    var imageResource = new Image("imageResource", ImageArgs.builder()
        .label("string")
        .cloudInit(false)
        .description("string")
        .diskId(0)
        .fileHash("string")
        .filePath("string")
        .linodeId(0)
        .region("string")
        .replicaRegions("string")
        .tags("string")
        .timeouts(ImageTimeoutsArgs.builder()
            .create("string")
            .build())
        .waitForReplications(false)
        .build());
    
    image_resource = linode.Image("imageResource",
        label="string",
        cloud_init=False,
        description="string",
        disk_id=0,
        file_hash="string",
        file_path="string",
        linode_id=0,
        region="string",
        replica_regions=["string"],
        tags=["string"],
        timeouts={
            "create": "string",
        },
        wait_for_replications=False)
    
    const imageResource = new linode.Image("imageResource", {
        label: "string",
        cloudInit: false,
        description: "string",
        diskId: 0,
        fileHash: "string",
        filePath: "string",
        linodeId: 0,
        region: "string",
        replicaRegions: ["string"],
        tags: ["string"],
        timeouts: {
            create: "string",
        },
        waitForReplications: false,
    });
    
    type: linode:Image
    properties:
        cloudInit: false
        description: string
        diskId: 0
        fileHash: string
        filePath: string
        label: string
        linodeId: 0
        region: string
        replicaRegions:
            - string
        tags:
            - string
        timeouts:
            create: string
        waitForReplications: false
    

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

    Label string
    A short description of the Image. Labels cannot contain special characters.
    CloudInit bool
    Whether this image supports cloud-init.
    Description string
    A detailed description of this Image.
    DiskId int
    The ID of the Linode Disk that this Image will be created from.
    FileHash string
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    FilePath string
    The path of the image file to be uploaded.
    LinodeId int

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    Region string
    The region of the image. See all regions here.
    ReplicaRegions List<string>
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    Tags List<string>
    A list of customized tags.
    Timeouts ImageTimeouts
    WaitForReplications bool

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    Label string
    A short description of the Image. Labels cannot contain special characters.
    CloudInit bool
    Whether this image supports cloud-init.
    Description string
    A detailed description of this Image.
    DiskId int
    The ID of the Linode Disk that this Image will be created from.
    FileHash string
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    FilePath string
    The path of the image file to be uploaded.
    LinodeId int

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    Region string
    The region of the image. See all regions here.
    ReplicaRegions []string
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    Tags []string
    A list of customized tags.
    Timeouts ImageTimeoutsArgs
    WaitForReplications bool

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    label String
    A short description of the Image. Labels cannot contain special characters.
    cloudInit Boolean
    Whether this image supports cloud-init.
    description String
    A detailed description of this Image.
    diskId Integer
    The ID of the Linode Disk that this Image will be created from.
    fileHash String
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    filePath String
    The path of the image file to be uploaded.
    linodeId Integer

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    region String
    The region of the image. See all regions here.
    replicaRegions List<String>
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    tags List<String>
    A list of customized tags.
    timeouts ImageTimeouts
    waitForReplications Boolean

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    label string
    A short description of the Image. Labels cannot contain special characters.
    cloudInit boolean
    Whether this image supports cloud-init.
    description string
    A detailed description of this Image.
    diskId number
    The ID of the Linode Disk that this Image will be created from.
    fileHash string
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    filePath string
    The path of the image file to be uploaded.
    linodeId number

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    region string
    The region of the image. See all regions here.
    replicaRegions string[]
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    tags string[]
    A list of customized tags.
    timeouts ImageTimeouts
    waitForReplications boolean

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    label str
    A short description of the Image. Labels cannot contain special characters.
    cloud_init bool
    Whether this image supports cloud-init.
    description str
    A detailed description of this Image.
    disk_id int
    The ID of the Linode Disk that this Image will be created from.
    file_hash str
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    file_path str
    The path of the image file to be uploaded.
    linode_id int

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    region str
    The region of the image. See all regions here.
    replica_regions Sequence[str]
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    tags Sequence[str]
    A list of customized tags.
    timeouts ImageTimeoutsArgs
    wait_for_replications bool

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    label String
    A short description of the Image. Labels cannot contain special characters.
    cloudInit Boolean
    Whether this image supports cloud-init.
    description String
    A detailed description of this Image.
    diskId Number
    The ID of the Linode Disk that this Image will be created from.
    fileHash String
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    filePath String
    The path of the image file to be uploaded.
    linodeId Number

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    region String
    The region of the image. See all regions here.
    replicaRegions List<String>
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    tags List<String>
    A list of customized tags.
    timeouts Property Map
    waitForReplications Boolean

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    Outputs

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

    Capabilities List<string>
    The capabilities of this Image.
    Created string
    When this Image was created.
    CreatedBy string
    The name of the User who created this Image.
    Deprecated bool
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    Expiry string
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsPublic bool
    True if the Image is public.
    Replications List<ImageReplication>
    A list of image replications region and corresponding status.
    Size int
    The minimum size this Image needs to deploy. Size is in MB.
    Status string
    The status of an image replica.
    TotalSize int
    The total size of the image in all available regions.
    Type string
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    Vendor string
    The upstream distribution vendor. Nil for private Images.
    Capabilities []string
    The capabilities of this Image.
    Created string
    When this Image was created.
    CreatedBy string
    The name of the User who created this Image.
    Deprecated bool
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    Expiry string
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsPublic bool
    True if the Image is public.
    Replications []ImageReplication
    A list of image replications region and corresponding status.
    Size int
    The minimum size this Image needs to deploy. Size is in MB.
    Status string
    The status of an image replica.
    TotalSize int
    The total size of the image in all available regions.
    Type string
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    Vendor string
    The upstream distribution vendor. Nil for private Images.
    capabilities List<String>
    The capabilities of this Image.
    created String
    When this Image was created.
    createdBy String
    The name of the User who created this Image.
    deprecated Boolean
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    expiry String
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    id String
    The provider-assigned unique ID for this managed resource.
    isPublic Boolean
    True if the Image is public.
    replications List<ImageReplication>
    A list of image replications region and corresponding status.
    size Integer
    The minimum size this Image needs to deploy. Size is in MB.
    status String
    The status of an image replica.
    totalSize Integer
    The total size of the image in all available regions.
    type String
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    vendor String
    The upstream distribution vendor. Nil for private Images.
    capabilities string[]
    The capabilities of this Image.
    created string
    When this Image was created.
    createdBy string
    The name of the User who created this Image.
    deprecated boolean
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    expiry string
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    id string
    The provider-assigned unique ID for this managed resource.
    isPublic boolean
    True if the Image is public.
    replications ImageReplication[]
    A list of image replications region and corresponding status.
    size number
    The minimum size this Image needs to deploy. Size is in MB.
    status string
    The status of an image replica.
    totalSize number
    The total size of the image in all available regions.
    type string
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    vendor string
    The upstream distribution vendor. Nil for private Images.
    capabilities Sequence[str]
    The capabilities of this Image.
    created str
    When this Image was created.
    created_by str
    The name of the User who created this Image.
    deprecated bool
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    expiry str
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    id str
    The provider-assigned unique ID for this managed resource.
    is_public bool
    True if the Image is public.
    replications Sequence[ImageReplication]
    A list of image replications region and corresponding status.
    size int
    The minimum size this Image needs to deploy. Size is in MB.
    status str
    The status of an image replica.
    total_size int
    The total size of the image in all available regions.
    type str
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    vendor str
    The upstream distribution vendor. Nil for private Images.
    capabilities List<String>
    The capabilities of this Image.
    created String
    When this Image was created.
    createdBy String
    The name of the User who created this Image.
    deprecated Boolean
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    expiry String
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    id String
    The provider-assigned unique ID for this managed resource.
    isPublic Boolean
    True if the Image is public.
    replications List<Property Map>
    A list of image replications region and corresponding status.
    size Number
    The minimum size this Image needs to deploy. Size is in MB.
    status String
    The status of an image replica.
    totalSize Number
    The total size of the image in all available regions.
    type String
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    vendor String
    The upstream distribution vendor. Nil for private Images.

    Look up Existing Image Resource

    Get an existing Image 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?: ImageState, opts?: CustomResourceOptions): Image
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            capabilities: Optional[Sequence[str]] = None,
            cloud_init: Optional[bool] = None,
            created: Optional[str] = None,
            created_by: Optional[str] = None,
            deprecated: Optional[bool] = None,
            description: Optional[str] = None,
            disk_id: Optional[int] = None,
            expiry: Optional[str] = None,
            file_hash: Optional[str] = None,
            file_path: Optional[str] = None,
            is_public: Optional[bool] = None,
            label: Optional[str] = None,
            linode_id: Optional[int] = None,
            region: Optional[str] = None,
            replica_regions: Optional[Sequence[str]] = None,
            replications: Optional[Sequence[ImageReplicationArgs]] = None,
            size: Optional[int] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            timeouts: Optional[ImageTimeoutsArgs] = None,
            total_size: Optional[int] = None,
            type: Optional[str] = None,
            vendor: Optional[str] = None,
            wait_for_replications: Optional[bool] = None) -> Image
    func GetImage(ctx *Context, name string, id IDInput, state *ImageState, opts ...ResourceOption) (*Image, error)
    public static Image Get(string name, Input<string> id, ImageState? state, CustomResourceOptions? opts = null)
    public static Image get(String name, Output<String> id, ImageState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    Capabilities List<string>
    The capabilities of this Image.
    CloudInit bool
    Whether this image supports cloud-init.
    Created string
    When this Image was created.
    CreatedBy string
    The name of the User who created this Image.
    Deprecated bool
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    Description string
    A detailed description of this Image.
    DiskId int
    The ID of the Linode Disk that this Image will be created from.
    Expiry string
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    FileHash string
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    FilePath string
    The path of the image file to be uploaded.
    IsPublic bool
    True if the Image is public.
    Label string
    A short description of the Image. Labels cannot contain special characters.
    LinodeId int

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    Region string
    The region of the image. See all regions here.
    ReplicaRegions List<string>
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    Replications List<ImageReplication>
    A list of image replications region and corresponding status.
    Size int
    The minimum size this Image needs to deploy. Size is in MB.
    Status string
    The status of an image replica.
    Tags List<string>
    A list of customized tags.
    Timeouts ImageTimeouts
    TotalSize int
    The total size of the image in all available regions.
    Type string
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    Vendor string
    The upstream distribution vendor. Nil for private Images.
    WaitForReplications bool

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    Capabilities []string
    The capabilities of this Image.
    CloudInit bool
    Whether this image supports cloud-init.
    Created string
    When this Image was created.
    CreatedBy string
    The name of the User who created this Image.
    Deprecated bool
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    Description string
    A detailed description of this Image.
    DiskId int
    The ID of the Linode Disk that this Image will be created from.
    Expiry string
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    FileHash string
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    FilePath string
    The path of the image file to be uploaded.
    IsPublic bool
    True if the Image is public.
    Label string
    A short description of the Image. Labels cannot contain special characters.
    LinodeId int

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    Region string
    The region of the image. See all regions here.
    ReplicaRegions []string
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    Replications []ImageReplicationArgs
    A list of image replications region and corresponding status.
    Size int
    The minimum size this Image needs to deploy. Size is in MB.
    Status string
    The status of an image replica.
    Tags []string
    A list of customized tags.
    Timeouts ImageTimeoutsArgs
    TotalSize int
    The total size of the image in all available regions.
    Type string
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    Vendor string
    The upstream distribution vendor. Nil for private Images.
    WaitForReplications bool

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    capabilities List<String>
    The capabilities of this Image.
    cloudInit Boolean
    Whether this image supports cloud-init.
    created String
    When this Image was created.
    createdBy String
    The name of the User who created this Image.
    deprecated Boolean
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    description String
    A detailed description of this Image.
    diskId Integer
    The ID of the Linode Disk that this Image will be created from.
    expiry String
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    fileHash String
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    filePath String
    The path of the image file to be uploaded.
    isPublic Boolean
    True if the Image is public.
    label String
    A short description of the Image. Labels cannot contain special characters.
    linodeId Integer

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    region String
    The region of the image. See all regions here.
    replicaRegions List<String>
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    replications List<ImageReplication>
    A list of image replications region and corresponding status.
    size Integer
    The minimum size this Image needs to deploy. Size is in MB.
    status String
    The status of an image replica.
    tags List<String>
    A list of customized tags.
    timeouts ImageTimeouts
    totalSize Integer
    The total size of the image in all available regions.
    type String
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    vendor String
    The upstream distribution vendor. Nil for private Images.
    waitForReplications Boolean

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    capabilities string[]
    The capabilities of this Image.
    cloudInit boolean
    Whether this image supports cloud-init.
    created string
    When this Image was created.
    createdBy string
    The name of the User who created this Image.
    deprecated boolean
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    description string
    A detailed description of this Image.
    diskId number
    The ID of the Linode Disk that this Image will be created from.
    expiry string
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    fileHash string
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    filePath string
    The path of the image file to be uploaded.
    isPublic boolean
    True if the Image is public.
    label string
    A short description of the Image. Labels cannot contain special characters.
    linodeId number

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    region string
    The region of the image. See all regions here.
    replicaRegions string[]
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    replications ImageReplication[]
    A list of image replications region and corresponding status.
    size number
    The minimum size this Image needs to deploy. Size is in MB.
    status string
    The status of an image replica.
    tags string[]
    A list of customized tags.
    timeouts ImageTimeouts
    totalSize number
    The total size of the image in all available regions.
    type string
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    vendor string
    The upstream distribution vendor. Nil for private Images.
    waitForReplications boolean

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    capabilities Sequence[str]
    The capabilities of this Image.
    cloud_init bool
    Whether this image supports cloud-init.
    created str
    When this Image was created.
    created_by str
    The name of the User who created this Image.
    deprecated bool
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    description str
    A detailed description of this Image.
    disk_id int
    The ID of the Linode Disk that this Image will be created from.
    expiry str
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    file_hash str
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    file_path str
    The path of the image file to be uploaded.
    is_public bool
    True if the Image is public.
    label str
    A short description of the Image. Labels cannot contain special characters.
    linode_id int

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    region str
    The region of the image. See all regions here.
    replica_regions Sequence[str]
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    replications Sequence[ImageReplicationArgs]
    A list of image replications region and corresponding status.
    size int
    The minimum size this Image needs to deploy. Size is in MB.
    status str
    The status of an image replica.
    tags Sequence[str]
    A list of customized tags.
    timeouts ImageTimeoutsArgs
    total_size int
    The total size of the image in all available regions.
    type str
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    vendor str
    The upstream distribution vendor. Nil for private Images.
    wait_for_replications bool

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    capabilities List<String>
    The capabilities of this Image.
    cloudInit Boolean
    Whether this image supports cloud-init.
    created String
    When this Image was created.
    createdBy String
    The name of the User who created this Image.
    deprecated Boolean
    Whether or not this Image is deprecated. Will only be True for deprecated public Images.
    description String
    A detailed description of this Image.
    diskId Number
    The ID of the Linode Disk that this Image will be created from.
    expiry String
    Only Images created automatically (from a deleted Linode; type=automatic) will expire.
    fileHash String
    The MD5 hash of the file to be uploaded. This is used to trigger file updates.
    filePath String
    The path of the image file to be uploaded.
    isPublic Boolean
    True if the Image is public.
    label String
    A short description of the Image. Labels cannot contain special characters.
    linodeId Number

    The ID of the Linode that this Image will be created from.


    NOTICE: Uploading images is currently in beta. Ensure LINODE_API_VERSION is set to v4beta in order to use this functionality.

    The following arguments apply to uploading an image:

    region String
    The region of the image. See all regions here.
    replicaRegions List<String>
    A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. Note: Image replication may not be available to all users. See Replicate an Image here for more details.
    replications List<Property Map>
    A list of image replications region and corresponding status.
    size Number
    The minimum size this Image needs to deploy. Size is in MB.
    status String
    The status of an image replica.
    tags List<String>
    A list of customized tags.
    timeouts Property Map
    totalSize Number
    The total size of the image in all available regions.
    type String
    How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.
    vendor String
    The upstream distribution vendor. Nil for private Images.
    waitForReplications Boolean

    Whether to wait for all image replications become available. Default to false.


    The following arguments apply to creating an image from an existing Linode Instance:

    Supporting Types

    ImageReplication, ImageReplicationArgs

    Region string
    The region of the image. See all regions here.
    Status string
    The status of an image replica.
    Region string
    The region of the image. See all regions here.
    Status string
    The status of an image replica.
    region String
    The region of the image. See all regions here.
    status String
    The status of an image replica.
    region string
    The region of the image. See all regions here.
    status string
    The status of an image replica.
    region str
    The region of the image. See all regions here.
    status str
    The status of an image replica.
    region String
    The region of the image. See all regions here.
    status String
    The status of an image replica.

    ImageTimeouts, ImageTimeoutsArgs

    Create string
    Used when creating the instance image (until the instance is available)
    Create string
    Used when creating the instance image (until the instance is available)
    create String
    Used when creating the instance image (until the instance is available)
    create string
    Used when creating the instance image (until the instance is available)
    create str
    Used when creating the instance image (until the instance is available)
    create String
    Used when creating the instance image (until the instance is available)

    Import

    Linodes Images can be imported using the Linode Image id, e.g.

    $ pulumi import linode:index/image:Image myimage 1234567
    

    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.
    linode logo
    Linode v4.30.1 published on Thursday, Nov 21, 2024 by Pulumi