published on Friday, Feb 20, 2026 by stackitcloud
published on Friday, Feb 20, 2026 by stackitcloud
Image resource schema. Must have a region specified in the provider configuration.
Example Usage
resource "stackit_image" "example_image" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-image"
disk_format = "qcow2"
local_file_path = "./path/to/image.qcow2"
min_disk_size = 10
min_ram = 5
}
# Only use the import statement, if you want to import an existing image
# Must set a configuration value for the local_file_path attribute as the provider has marked it as required.
# Since this attribute is not fetched in general from the API call, after adding it this would replace your image resource after an pulumi up.
# In order to prevent this you need to add:
#lifecycle {
# ignore_changes = [ local_file_path ]
# }
import {
to = stackit_image.import-example
id = "${var.project_id},${var.region},${var.image_id}"
}
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,
disk_format: Optional[str] = None,
local_file_path: Optional[str] = None,
project_id: Optional[str] = None,
config: Optional[ImageConfigArgs] = None,
labels: Optional[Mapping[str, str]] = None,
min_disk_size: Optional[int] = None,
min_ram: Optional[int] = None,
name: Optional[str] = None,
region: Optional[str] = None)func NewImage(ctx *Context, name string, args ImageArgs, opts ...ResourceOption) (*Image, error)public Image(string name, ImageArgs args, CustomResourceOptions? opts = null)type: stackit: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 Stackit.Image("imageResource", new()
{
DiskFormat = "string",
LocalFilePath = "string",
ProjectId = "string",
Config = new Stackit.Inputs.ImageConfigArgs
{
BootMenu = false,
CdromBus = "string",
DiskBus = "string",
NicModel = "string",
OperatingSystem = "string",
OperatingSystemDistro = "string",
OperatingSystemVersion = "string",
RescueBus = "string",
RescueDevice = "string",
SecureBoot = false,
Uefi = false,
VideoModel = "string",
VirtioScsi = false,
},
Labels =
{
{ "string", "string" },
},
MinDiskSize = 0,
MinRam = 0,
Name = "string",
Region = "string",
});
example, err := stackit.NewImage(ctx, "imageResource", &stackit.ImageArgs{
DiskFormat: pulumi.String("string"),
LocalFilePath: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Config: &stackit.ImageConfigArgs{
BootMenu: pulumi.Bool(false),
CdromBus: pulumi.String("string"),
DiskBus: pulumi.String("string"),
NicModel: pulumi.String("string"),
OperatingSystem: pulumi.String("string"),
OperatingSystemDistro: pulumi.String("string"),
OperatingSystemVersion: pulumi.String("string"),
RescueBus: pulumi.String("string"),
RescueDevice: pulumi.String("string"),
SecureBoot: pulumi.Bool(false),
Uefi: pulumi.Bool(false),
VideoModel: pulumi.String("string"),
VirtioScsi: pulumi.Bool(false),
},
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
MinDiskSize: pulumi.Int(0),
MinRam: pulumi.Int(0),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var imageResource = new Image("imageResource", ImageArgs.builder()
.diskFormat("string")
.localFilePath("string")
.projectId("string")
.config(ImageConfigArgs.builder()
.bootMenu(false)
.cdromBus("string")
.diskBus("string")
.nicModel("string")
.operatingSystem("string")
.operatingSystemDistro("string")
.operatingSystemVersion("string")
.rescueBus("string")
.rescueDevice("string")
.secureBoot(false)
.uefi(false)
.videoModel("string")
.virtioScsi(false)
.build())
.labels(Map.of("string", "string"))
.minDiskSize(0)
.minRam(0)
.name("string")
.region("string")
.build());
image_resource = stackit.Image("imageResource",
disk_format="string",
local_file_path="string",
project_id="string",
config={
"boot_menu": False,
"cdrom_bus": "string",
"disk_bus": "string",
"nic_model": "string",
"operating_system": "string",
"operating_system_distro": "string",
"operating_system_version": "string",
"rescue_bus": "string",
"rescue_device": "string",
"secure_boot": False,
"uefi": False,
"video_model": "string",
"virtio_scsi": False,
},
labels={
"string": "string",
},
min_disk_size=0,
min_ram=0,
name="string",
region="string")
const imageResource = new stackit.Image("imageResource", {
diskFormat: "string",
localFilePath: "string",
projectId: "string",
config: {
bootMenu: false,
cdromBus: "string",
diskBus: "string",
nicModel: "string",
operatingSystem: "string",
operatingSystemDistro: "string",
operatingSystemVersion: "string",
rescueBus: "string",
rescueDevice: "string",
secureBoot: false,
uefi: false,
videoModel: "string",
virtioScsi: false,
},
labels: {
string: "string",
},
minDiskSize: 0,
minRam: 0,
name: "string",
region: "string",
});
type: stackit:Image
properties:
config:
bootMenu: false
cdromBus: string
diskBus: string
nicModel: string
operatingSystem: string
operatingSystemDistro: string
operatingSystemVersion: string
rescueBus: string
rescueDevice: string
secureBoot: false
uefi: false
videoModel: string
virtioScsi: false
diskFormat: string
labels:
string: string
localFilePath: string
minDiskSize: 0
minRam: 0
name: string
projectId: string
region: string
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:
- Disk
Format string - The disk format of the image.
- Local
File stringPath - The filepath of the raw image file to be uploaded.
- Project
Id string - STACKIT project ID to which the image is associated.
- Config
Image
Config - Properties to set hardware and scheduling settings for an image.
- Labels Dictionary<string, string>
- Labels are key-value string pairs which can be attached to a resource container
- Min
Disk intSize - The minimum disk size of the image in GB.
- Min
Ram int - The minimum RAM of the image in MB.
- Name string
- The name of the image.
- Region string
- The resource region. If not defined, the provider region is used.
- Disk
Format string - The disk format of the image.
- Local
File stringPath - The filepath of the raw image file to be uploaded.
- Project
Id string - STACKIT project ID to which the image is associated.
- Config
Image
Config Args - Properties to set hardware and scheduling settings for an image.
- Labels map[string]string
- Labels are key-value string pairs which can be attached to a resource container
- Min
Disk intSize - The minimum disk size of the image in GB.
- Min
Ram int - The minimum RAM of the image in MB.
- Name string
- The name of the image.
- Region string
- The resource region. If not defined, the provider region is used.
- disk
Format String - The disk format of the image.
- local
File StringPath - The filepath of the raw image file to be uploaded.
- project
Id String - STACKIT project ID to which the image is associated.
- config
Image
Config - Properties to set hardware and scheduling settings for an image.
- labels Map<String,String>
- Labels are key-value string pairs which can be attached to a resource container
- min
Disk IntegerSize - The minimum disk size of the image in GB.
- min
Ram Integer - The minimum RAM of the image in MB.
- name String
- The name of the image.
- region String
- The resource region. If not defined, the provider region is used.
- disk
Format string - The disk format of the image.
- local
File stringPath - The filepath of the raw image file to be uploaded.
- project
Id string - STACKIT project ID to which the image is associated.
- config
Image
Config - Properties to set hardware and scheduling settings for an image.
- labels {[key: string]: string}
- Labels are key-value string pairs which can be attached to a resource container
- min
Disk numberSize - The minimum disk size of the image in GB.
- min
Ram number - The minimum RAM of the image in MB.
- name string
- The name of the image.
- region string
- The resource region. If not defined, the provider region is used.
- disk_
format str - The disk format of the image.
- local_
file_ strpath - The filepath of the raw image file to be uploaded.
- project_
id str - STACKIT project ID to which the image is associated.
- config
Image
Config Args - Properties to set hardware and scheduling settings for an image.
- labels Mapping[str, str]
- Labels are key-value string pairs which can be attached to a resource container
- min_
disk_ intsize - The minimum disk size of the image in GB.
- min_
ram int - The minimum RAM of the image in MB.
- name str
- The name of the image.
- region str
- The resource region. If not defined, the provider region is used.
- disk
Format String - The disk format of the image.
- local
File StringPath - The filepath of the raw image file to be uploaded.
- project
Id String - STACKIT project ID to which the image is associated.
- config Property Map
- Properties to set hardware and scheduling settings for an image.
- labels Map<String>
- Labels are key-value string pairs which can be attached to a resource container
- min
Disk NumberSize - The minimum disk size of the image in GB.
- min
Ram Number - The minimum RAM of the image in MB.
- name String
- The name of the image.
- region String
- The resource region. If not defined, the provider region is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Image resource produces the following output properties:
- checksum
Image
Checksum - Representation of an image checksum.
- id String
- The provider-assigned unique ID for this managed resource.
- image
Id String - The image ID.
- protected_ Boolean
- Whether the image is protected.
- scope String
- The scope of the image.
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,
checksum: Optional[ImageChecksumArgs] = None,
config: Optional[ImageConfigArgs] = None,
disk_format: Optional[str] = None,
image_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
local_file_path: Optional[str] = None,
min_disk_size: Optional[int] = None,
min_ram: Optional[int] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
protected: Optional[bool] = None,
region: Optional[str] = None,
scope: Optional[str] = None) -> Imagefunc 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)resources: _: type: stackit:Image get: id: ${id}- 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.
- Checksum
Image
Checksum - Representation of an image checksum.
- Config
Image
Config - Properties to set hardware and scheduling settings for an image.
- Disk
Format string - The disk format of the image.
- Image
Id string - The image ID.
- Labels Dictionary<string, string>
- Labels are key-value string pairs which can be attached to a resource container
- Local
File stringPath - The filepath of the raw image file to be uploaded.
- Min
Disk intSize - The minimum disk size of the image in GB.
- Min
Ram int - The minimum RAM of the image in MB.
- Name string
- The name of the image.
- Project
Id string - STACKIT project ID to which the image is associated.
- Protected bool
- Whether the image is protected.
- Region string
- The resource region. If not defined, the provider region is used.
- Scope string
- The scope of the image.
- Checksum
Image
Checksum Args - Representation of an image checksum.
- Config
Image
Config Args - Properties to set hardware and scheduling settings for an image.
- Disk
Format string - The disk format of the image.
- Image
Id string - The image ID.
- Labels map[string]string
- Labels are key-value string pairs which can be attached to a resource container
- Local
File stringPath - The filepath of the raw image file to be uploaded.
- Min
Disk intSize - The minimum disk size of the image in GB.
- Min
Ram int - The minimum RAM of the image in MB.
- Name string
- The name of the image.
- Project
Id string - STACKIT project ID to which the image is associated.
- Protected bool
- Whether the image is protected.
- Region string
- The resource region. If not defined, the provider region is used.
- Scope string
- The scope of the image.
- checksum
Image
Checksum - Representation of an image checksum.
- config
Image
Config - Properties to set hardware and scheduling settings for an image.
- disk
Format String - The disk format of the image.
- image
Id String - The image ID.
- labels Map<String,String>
- Labels are key-value string pairs which can be attached to a resource container
- local
File StringPath - The filepath of the raw image file to be uploaded.
- min
Disk IntegerSize - The minimum disk size of the image in GB.
- min
Ram Integer - The minimum RAM of the image in MB.
- name String
- The name of the image.
- project
Id String - STACKIT project ID to which the image is associated.
- protected_ Boolean
- Whether the image is protected.
- region String
- The resource region. If not defined, the provider region is used.
- scope String
- The scope of the image.
- checksum
Image
Checksum - Representation of an image checksum.
- config
Image
Config - Properties to set hardware and scheduling settings for an image.
- disk
Format string - The disk format of the image.
- image
Id string - The image ID.
- labels {[key: string]: string}
- Labels are key-value string pairs which can be attached to a resource container
- local
File stringPath - The filepath of the raw image file to be uploaded.
- min
Disk numberSize - The minimum disk size of the image in GB.
- min
Ram number - The minimum RAM of the image in MB.
- name string
- The name of the image.
- project
Id string - STACKIT project ID to which the image is associated.
- protected boolean
- Whether the image is protected.
- region string
- The resource region. If not defined, the provider region is used.
- scope string
- The scope of the image.
- checksum
Image
Checksum Args - Representation of an image checksum.
- config
Image
Config Args - Properties to set hardware and scheduling settings for an image.
- disk_
format str - The disk format of the image.
- image_
id str - The image ID.
- labels Mapping[str, str]
- Labels are key-value string pairs which can be attached to a resource container
- local_
file_ strpath - The filepath of the raw image file to be uploaded.
- min_
disk_ intsize - The minimum disk size of the image in GB.
- min_
ram int - The minimum RAM of the image in MB.
- name str
- The name of the image.
- project_
id str - STACKIT project ID to which the image is associated.
- protected bool
- Whether the image is protected.
- region str
- The resource region. If not defined, the provider region is used.
- scope str
- The scope of the image.
- checksum Property Map
- Representation of an image checksum.
- config Property Map
- Properties to set hardware and scheduling settings for an image.
- disk
Format String - The disk format of the image.
- image
Id String - The image ID.
- labels Map<String>
- Labels are key-value string pairs which can be attached to a resource container
- local
File StringPath - The filepath of the raw image file to be uploaded.
- min
Disk NumberSize - The minimum disk size of the image in GB.
- min
Ram Number - The minimum RAM of the image in MB.
- name String
- The name of the image.
- project
Id String - STACKIT project ID to which the image is associated.
- protected Boolean
- Whether the image is protected.
- region String
- The resource region. If not defined, the provider region is used.
- scope String
- The scope of the image.
Supporting Types
ImageChecksum, ImageChecksumArgs
ImageConfig, ImageConfigArgs
- bool
- Enables the BIOS bootmenu.
- Cdrom
Bus string - Sets CDROM bus controller type.
- Disk
Bus string - Sets Disk bus controller type.
- Nic
Model string - Sets virtual network interface model.
- Operating
System string - Enables operating system specific optimizations.
- Operating
System stringDistro - Operating system distribution.
- Operating
System stringVersion - Version of the operating system.
- Rescue
Bus string - Sets the device bus when the image is used as a rescue image.
- Rescue
Device string - Sets the device when the image is used as a rescue image.
- Secure
Boot bool - Enables Secure Boot.
- Uefi bool
- Enables UEFI boot.
- Video
Model string - Sets Graphic device model.
- Virtio
Scsi bool - Enables the use of VirtIO SCSI to provide block device access. By default instances use VirtIO Block.
- bool
- Enables the BIOS bootmenu.
- Cdrom
Bus string - Sets CDROM bus controller type.
- Disk
Bus string - Sets Disk bus controller type.
- Nic
Model string - Sets virtual network interface model.
- Operating
System string - Enables operating system specific optimizations.
- Operating
System stringDistro - Operating system distribution.
- Operating
System stringVersion - Version of the operating system.
- Rescue
Bus string - Sets the device bus when the image is used as a rescue image.
- Rescue
Device string - Sets the device when the image is used as a rescue image.
- Secure
Boot bool - Enables Secure Boot.
- Uefi bool
- Enables UEFI boot.
- Video
Model string - Sets Graphic device model.
- Virtio
Scsi bool - Enables the use of VirtIO SCSI to provide block device access. By default instances use VirtIO Block.
- Boolean
- Enables the BIOS bootmenu.
- cdrom
Bus String - Sets CDROM bus controller type.
- disk
Bus String - Sets Disk bus controller type.
- nic
Model String - Sets virtual network interface model.
- operating
System String - Enables operating system specific optimizations.
- operating
System StringDistro - Operating system distribution.
- operating
System StringVersion - Version of the operating system.
- rescue
Bus String - Sets the device bus when the image is used as a rescue image.
- rescue
Device String - Sets the device when the image is used as a rescue image.
- secure
Boot Boolean - Enables Secure Boot.
- uefi Boolean
- Enables UEFI boot.
- video
Model String - Sets Graphic device model.
- virtio
Scsi Boolean - Enables the use of VirtIO SCSI to provide block device access. By default instances use VirtIO Block.
- boolean
- Enables the BIOS bootmenu.
- cdrom
Bus string - Sets CDROM bus controller type.
- disk
Bus string - Sets Disk bus controller type.
- nic
Model string - Sets virtual network interface model.
- operating
System string - Enables operating system specific optimizations.
- operating
System stringDistro - Operating system distribution.
- operating
System stringVersion - Version of the operating system.
- rescue
Bus string - Sets the device bus when the image is used as a rescue image.
- rescue
Device string - Sets the device when the image is used as a rescue image.
- secure
Boot boolean - Enables Secure Boot.
- uefi boolean
- Enables UEFI boot.
- video
Model string - Sets Graphic device model.
- virtio
Scsi boolean - Enables the use of VirtIO SCSI to provide block device access. By default instances use VirtIO Block.
- bool
- Enables the BIOS bootmenu.
- cdrom_
bus str - Sets CDROM bus controller type.
- disk_
bus str - Sets Disk bus controller type.
- nic_
model str - Sets virtual network interface model.
- operating_
system str - Enables operating system specific optimizations.
- operating_
system_ strdistro - Operating system distribution.
- operating_
system_ strversion - Version of the operating system.
- rescue_
bus str - Sets the device bus when the image is used as a rescue image.
- rescue_
device str - Sets the device when the image is used as a rescue image.
- secure_
boot bool - Enables Secure Boot.
- uefi bool
- Enables UEFI boot.
- video_
model str - Sets Graphic device model.
- virtio_
scsi bool - Enables the use of VirtIO SCSI to provide block device access. By default instances use VirtIO Block.
- Boolean
- Enables the BIOS bootmenu.
- cdrom
Bus String - Sets CDROM bus controller type.
- disk
Bus String - Sets Disk bus controller type.
- nic
Model String - Sets virtual network interface model.
- operating
System String - Enables operating system specific optimizations.
- operating
System StringDistro - Operating system distribution.
- operating
System StringVersion - Version of the operating system.
- rescue
Bus String - Sets the device bus when the image is used as a rescue image.
- rescue
Device String - Sets the device when the image is used as a rescue image.
- secure
Boot Boolean - Enables Secure Boot.
- uefi Boolean
- Enables UEFI boot.
- video
Model String - Sets Graphic device model.
- virtio
Scsi Boolean - Enables the use of VirtIO SCSI to provide block device access. By default instances use VirtIO Block.
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Friday, Feb 20, 2026 by stackitcloud
