linode.Image
Explore with Pulumi AI
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.
Create Image Resource
new Image(name: string, args: ImageArgs, opts?: CustomResourceOptions);
@overload
def Image(resource_name: str,
opts: Optional[ResourceOptions] = 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,
label: Optional[str] = None,
linode_id: Optional[int] = None,
region: Optional[str] = None)
@overload
def Image(resource_name: str,
args: ImageArgs,
opts: Optional[ResourceOptions] = None)
func NewImage(ctx *Context, name string, args ImageArgs, opts ...ResourceOption) (*Image, error)
public Image(string name, ImageArgs args, CustomResourceOptions? opts = null)
type: linode:Image
properties: # The arguments to resource properties.
options: # 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.
- 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.
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
The Image resource accepts the following input properties:
- Label string
A short description of the Image. Labels cannot contain special characters.
- Cloud
Init bool Whether this image supports cloud-init.
- Description string
A detailed description of this Image.
The following arguments apply to creating an image from an existing Linode Instance:
- Disk
Id int The ID of the Linode Disk that this Image will be created from.
- File
Hash string The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- File
Path string 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 tov4beta
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.
- Label string
A short description of the Image. Labels cannot contain special characters.
- Cloud
Init bool Whether this image supports cloud-init.
- Description string
A detailed description of this Image.
The following arguments apply to creating an image from an existing Linode Instance:
- Disk
Id int The ID of the Linode Disk that this Image will be created from.
- File
Hash string The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- File
Path string 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 tov4beta
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.
- label String
A short description of the Image. Labels cannot contain special characters.
- cloud
Init Boolean Whether this image supports cloud-init.
- description String
A detailed description of this Image.
The following arguments apply to creating an image from an existing Linode Instance:
- disk
Id Integer The ID of the Linode Disk that this Image will be created from.
- file
Hash String The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- file
Path String The path of the image file to be uploaded.
- linode
Id 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 tov4beta
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.
- label string
A short description of the Image. Labels cannot contain special characters.
- cloud
Init boolean Whether this image supports cloud-init.
- description string
A detailed description of this Image.
The following arguments apply to creating an image from an existing Linode Instance:
- disk
Id number The ID of the Linode Disk that this Image will be created from.
- file
Hash string The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- file
Path string The path of the image file to be uploaded.
- linode
Id 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 tov4beta
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.
- 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.
The following arguments apply to creating an image from an existing Linode Instance:
- 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 tov4beta
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.
- label String
A short description of the Image. Labels cannot contain special characters.
- cloud
Init Boolean Whether this image supports cloud-init.
- description String
A detailed description of this Image.
The following arguments apply to creating an image from an existing Linode Instance:
- disk
Id Number The ID of the Linode Disk that this Image will be created from.
- file
Hash String The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- file
Path String The path of the image file to be uploaded.
- linode
Id 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 tov4beta
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.
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.
- Created
By 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.
- Is
Public bool True if the Image is public.
- Size int
The minimum size this Image needs to deploy. Size is in MB.
- Status string
The current status of this Image.
- 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.
- Created
By 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.
- Is
Public bool True if the Image is public.
- Size int
The minimum size this Image needs to deploy. Size is in MB.
- Status string
The current status of this Image.
- 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.
- created
By 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.
- is
Public Boolean True if the Image is public.
- size Integer
The minimum size this Image needs to deploy. Size is in MB.
- status String
The current status of this Image.
- 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.
- created
By 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.
- is
Public boolean True if the Image is public.
- size number
The minimum size this Image needs to deploy. Size is in MB.
- status string
The current status of this Image.
- 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.
- size int
The minimum size this Image needs to deploy. Size is in MB.
- status str
The current status of this Image.
- 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.
- created
By 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.
- is
Public Boolean True if the Image is public.
- size Number
The minimum size this Image needs to deploy. Size is in MB.
- status String
The current status of this Image.
- 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,
size: Optional[int] = None,
status: Optional[str] = None,
type: Optional[str] = None,
vendor: Optional[str] = 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.
- Capabilities List<string>
The capabilities of this Image.
- Cloud
Init bool Whether this image supports cloud-init.
- Created string
When this Image was created.
- Created
By 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.
The following arguments apply to creating an image from an existing Linode Instance:
- Disk
Id 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.
- File
Hash string The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- File
Path string The path of the image file to be uploaded.
- Is
Public bool True if the Image is public.
- Label string
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 tov4beta
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.
- Size int
The minimum size this Image needs to deploy. Size is in MB.
- Status string
The current status of this Image.
- 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.
- Cloud
Init bool Whether this image supports cloud-init.
- Created string
When this Image was created.
- Created
By 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.
The following arguments apply to creating an image from an existing Linode Instance:
- Disk
Id 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.
- File
Hash string The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- File
Path string The path of the image file to be uploaded.
- Is
Public bool True if the Image is public.
- Label string
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 tov4beta
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.
- Size int
The minimum size this Image needs to deploy. Size is in MB.
- Status string
The current status of this Image.
- 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.
- cloud
Init Boolean Whether this image supports cloud-init.
- created String
When this Image was created.
- created
By 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.
The following arguments apply to creating an image from an existing Linode Instance:
- disk
Id 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.
- file
Hash String The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- file
Path String The path of the image file to be uploaded.
- is
Public Boolean True if the Image is public.
- label String
A short description of the Image. Labels cannot contain special characters.
- linode
Id 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 tov4beta
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.
- size Integer
The minimum size this Image needs to deploy. Size is in MB.
- status String
The current status of this Image.
- 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.
- cloud
Init boolean Whether this image supports cloud-init.
- created string
When this Image was created.
- created
By 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.
The following arguments apply to creating an image from an existing Linode Instance:
- disk
Id 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.
- file
Hash string The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- file
Path string The path of the image file to be uploaded.
- is
Public boolean True if the Image is public.
- label string
A short description of the Image. Labels cannot contain special characters.
- linode
Id 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 tov4beta
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.
- size number
The minimum size this Image needs to deploy. Size is in MB.
- status string
The current status of this Image.
- 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.
- 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.
The following arguments apply to creating an image from an existing Linode Instance:
- 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 tov4beta
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.
- size int
The minimum size this Image needs to deploy. Size is in MB.
- status str
The current status of this Image.
- 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.
- cloud
Init Boolean Whether this image supports cloud-init.
- created String
When this Image was created.
- created
By 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.
The following arguments apply to creating an image from an existing Linode Instance:
- disk
Id 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.
- file
Hash String The MD5 hash of the file to be uploaded. This is used to trigger file updates.
- file
Path String The path of the image file to be uploaded.
- is
Public Boolean True if the Image is public.
- label String
A short description of the Image. Labels cannot contain special characters.
- linode
Id 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 tov4beta
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.
- size Number
The minimum size this Image needs to deploy. Size is in MB.
- status String
The current status of this Image.
- 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.
Import
Linodes Images can be imported using the Linode Image id
, e.g.
$ pulumi import linode:index/image:Image myimage 1234567
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
linode
Terraform Provider.