1. Packages
  2. Ionoscloud
  3. API Docs
  4. compute
  5. Volume
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

ionoscloud.compute.Volume

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

    Manages a Volume on IonosCloud.

    Example Usage

    A primary volume will be created with the server. If there is a need for additional volumes, this resource handles it.

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    import * as random from "@pulumi/random";
    
    const example = ionoscloud.compute.getImage({
        type: "HDD",
        cloudInit: "V1",
        imageAlias: "ubuntu:latest",
        location: "us/las",
    });
    const exampleDatacenter = new ionoscloud.compute.Datacenter("example", {
        name: "Datacenter Example",
        location: "us/las",
        description: "Datacenter Description",
        secAuthProtection: false,
    });
    const exampleLan = new ionoscloud.compute.Lan("example", {
        datacenterId: exampleDatacenter.id,
        "public": true,
        name: "Lan Example",
    });
    const exampleIPBlock = new ionoscloud.compute.IPBlock("example", {
        location: exampleDatacenter.location,
        size: 4,
        name: "IP Block Example",
    });
    const serverImagePassword = new random.index.Password("server_image_password", {
        length: 16,
        special: false,
    });
    const exampleServer = new ionoscloud.compute.Server("example", {
        name: "Server Example",
        datacenterId: exampleDatacenter.id,
        cores: 1,
        ram: 1024,
        availabilityZone: "ZONE_1",
        cpuFamily: "INTEL_XEON",
        imageName: example.then(example => example.name),
        imagePassword: serverImagePassword.result,
        type: "ENTERPRISE",
        volume: {
            name: "system",
            size: 5,
            diskType: "SSD Standard",
            userData: "foo",
            bus: "VIRTIO",
            availabilityZone: "ZONE_1",
        },
        nic: {
            lan: exampleLan.id,
            name: "system",
            dhcp: true,
            firewallActive: true,
            firewallType: "BIDIRECTIONAL",
            ips: [
                exampleIPBlock.ips[0],
                exampleIPBlock.ips[1],
            ],
            firewalls: [{
                protocol: "TCP",
                name: "SSH",
                portRangeStart: 22,
                portRangeEnd: 22,
                sourceMac: "00:0a:95:9d:68:17",
                sourceIp: exampleIPBlock.ips[2],
                targetIp: exampleIPBlock.ips[3],
                type: "EGRESS",
            }],
        },
    });
    const volumeImagePassword = new random.index.Password("volume_image_password", {
        length: 16,
        special: false,
    });
    const exampleVolume = new ionoscloud.compute.Volume("example", {
        datacenterId: exampleDatacenter.id,
        serverId: exampleServer.id,
        name: "Volume Example",
        availabilityZone: "ZONE_1",
        size: 5,
        diskType: "SSD Standard",
        bus: "VIRTIO",
        imageName: example.then(example => example.name),
        imagePassword: volumeImagePassword.result,
        userData: "foo",
    });
    const example2 = new ionoscloud.compute.Volume("example2", {
        datacenterId: exampleDatacenter.id,
        serverId: exampleServer.id,
        name: "Another Volume Example",
        availabilityZone: "ZONE_1",
        size: 5,
        diskType: "SSD Standard",
        bus: "VIRTIO",
        licenceType: "OTHER",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    import pulumi_random as random
    
    example = ionoscloud.compute.get_image(type="HDD",
        cloud_init="V1",
        image_alias="ubuntu:latest",
        location="us/las")
    example_datacenter = ionoscloud.compute.Datacenter("example",
        name="Datacenter Example",
        location="us/las",
        description="Datacenter Description",
        sec_auth_protection=False)
    example_lan = ionoscloud.compute.Lan("example",
        datacenter_id=example_datacenter.id,
        public=True,
        name="Lan Example")
    example_ip_block = ionoscloud.compute.IPBlock("example",
        location=example_datacenter.location,
        size=4,
        name="IP Block Example")
    server_image_password = random.index.Password("server_image_password",
        length=16,
        special=False)
    example_server = ionoscloud.compute.Server("example",
        name="Server Example",
        datacenter_id=example_datacenter.id,
        cores=1,
        ram=1024,
        availability_zone="ZONE_1",
        cpu_family="INTEL_XEON",
        image_name=example.name,
        image_password=server_image_password["result"],
        type="ENTERPRISE",
        volume={
            "name": "system",
            "size": 5,
            "disk_type": "SSD Standard",
            "user_data": "foo",
            "bus": "VIRTIO",
            "availability_zone": "ZONE_1",
        },
        nic={
            "lan": example_lan.id,
            "name": "system",
            "dhcp": True,
            "firewall_active": True,
            "firewall_type": "BIDIRECTIONAL",
            "ips": [
                example_ip_block.ips[0],
                example_ip_block.ips[1],
            ],
            "firewalls": [{
                "protocol": "TCP",
                "name": "SSH",
                "port_range_start": 22,
                "port_range_end": 22,
                "source_mac": "00:0a:95:9d:68:17",
                "source_ip": example_ip_block.ips[2],
                "target_ip": example_ip_block.ips[3],
                "type": "EGRESS",
            }],
        })
    volume_image_password = random.index.Password("volume_image_password",
        length=16,
        special=False)
    example_volume = ionoscloud.compute.Volume("example",
        datacenter_id=example_datacenter.id,
        server_id=example_server.id,
        name="Volume Example",
        availability_zone="ZONE_1",
        size=5,
        disk_type="SSD Standard",
        bus="VIRTIO",
        image_name=example.name,
        image_password=volume_image_password["result"],
        user_data="foo")
    example2 = ionoscloud.compute.Volume("example2",
        datacenter_id=example_datacenter.id,
        server_id=example_server.id,
        name="Another Volume Example",
        availability_zone="ZONE_1",
        size=5,
        disk_type="SSD Standard",
        bus="VIRTIO",
        licence_type="OTHER")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
    	"github.com/pulumi/pulumi-random/sdk/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.GetImage(ctx, &compute.GetImageArgs{
    			Type:       pulumi.StringRef("HDD"),
    			CloudInit:  pulumi.StringRef("V1"),
    			ImageAlias: pulumi.StringRef("ubuntu:latest"),
    			Location:   pulumi.StringRef("us/las"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleDatacenter, err := compute.NewDatacenter(ctx, "example", &compute.DatacenterArgs{
    			Name:              pulumi.String("Datacenter Example"),
    			Location:          pulumi.String("us/las"),
    			Description:       pulumi.String("Datacenter Description"),
    			SecAuthProtection: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		exampleLan, err := compute.NewLan(ctx, "example", &compute.LanArgs{
    			DatacenterId: exampleDatacenter.ID(),
    			Public:       pulumi.Bool(true),
    			Name:         pulumi.String("Lan Example"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleIPBlock, err := compute.NewIPBlock(ctx, "example", &compute.IPBlockArgs{
    			Location: exampleDatacenter.Location,
    			Size:     pulumi.Int(4),
    			Name:     pulumi.String("IP Block Example"),
    		})
    		if err != nil {
    			return err
    		}
    		serverImagePassword, err := random.NewPassword(ctx, "server_image_password", &random.PasswordArgs{
    			Length:  16,
    			Special: false,
    		})
    		if err != nil {
    			return err
    		}
    		exampleServer, err := compute.NewServer(ctx, "example", &compute.ServerArgs{
    			Name:             pulumi.String("Server Example"),
    			DatacenterId:     exampleDatacenter.ID(),
    			Cores:            pulumi.Int(1),
    			Ram:              pulumi.Int(1024),
    			AvailabilityZone: pulumi.String("ZONE_1"),
    			CpuFamily:        pulumi.String("INTEL_XEON"),
    			ImageName:        pulumi.String(example.Name),
    			ImagePassword:    serverImagePassword.Result,
    			Type:             pulumi.String("ENTERPRISE"),
    			Volume: &compute.ServerVolumeArgs{
    				Name:             pulumi.String("system"),
    				Size:             pulumi.Int(5),
    				DiskType:         pulumi.String("SSD Standard"),
    				UserData:         pulumi.String("foo"),
    				Bus:              pulumi.String("VIRTIO"),
    				AvailabilityZone: pulumi.String("ZONE_1"),
    			},
    			Nic: &compute.ServerNicArgs{
    				Lan:            exampleLan.ID(),
    				Name:           pulumi.String("system"),
    				Dhcp:           pulumi.Bool(true),
    				FirewallActive: pulumi.Bool(true),
    				FirewallType:   pulumi.String("BIDIRECTIONAL"),
    				Ips: pulumi.StringArray{
    					exampleIPBlock.Ips.ApplyT(func(ips []string) (string, error) {
    						return ips[0], nil
    					}).(pulumi.StringOutput),
    					exampleIPBlock.Ips.ApplyT(func(ips []string) (string, error) {
    						return ips[1], nil
    					}).(pulumi.StringOutput),
    				},
    				Firewalls: compute.ServerNicFirewallArray{
    					&compute.ServerNicFirewallArgs{
    						Protocol:       pulumi.String("TCP"),
    						Name:           pulumi.String("SSH"),
    						PortRangeStart: pulumi.Int(22),
    						PortRangeEnd:   pulumi.Int(22),
    						SourceMac:      pulumi.String("00:0a:95:9d:68:17"),
    						SourceIp: exampleIPBlock.Ips.ApplyT(func(ips []string) (string, error) {
    							return ips[2], nil
    						}).(pulumi.StringOutput),
    						TargetIp: exampleIPBlock.Ips.ApplyT(func(ips []string) (string, error) {
    							return ips[3], nil
    						}).(pulumi.StringOutput),
    						Type: pulumi.String("EGRESS"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		volumeImagePassword, err := random.NewPassword(ctx, "volume_image_password", &random.PasswordArgs{
    			Length:  16,
    			Special: false,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewVolume(ctx, "example", &compute.VolumeArgs{
    			DatacenterId:     exampleDatacenter.ID(),
    			ServerId:         exampleServer.ID(),
    			Name:             pulumi.String("Volume Example"),
    			AvailabilityZone: pulumi.String("ZONE_1"),
    			Size:             pulumi.Int(5),
    			DiskType:         pulumi.String("SSD Standard"),
    			Bus:              pulumi.String("VIRTIO"),
    			ImageName:        pulumi.String(example.Name),
    			ImagePassword:    volumeImagePassword.Result,
    			UserData:         pulumi.String("foo"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewVolume(ctx, "example2", &compute.VolumeArgs{
    			DatacenterId:     exampleDatacenter.ID(),
    			ServerId:         exampleServer.ID(),
    			Name:             pulumi.String("Another Volume Example"),
    			AvailabilityZone: pulumi.String("ZONE_1"),
    			Size:             pulumi.Int(5),
    			DiskType:         pulumi.String("SSD Standard"),
    			Bus:              pulumi.String("VIRTIO"),
    			LicenceType:      pulumi.String("OTHER"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    using Ionoscloud = Pulumi.Ionoscloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Compute.GetImage.Invoke(new()
        {
            Type = "HDD",
            CloudInit = "V1",
            ImageAlias = "ubuntu:latest",
            Location = "us/las",
        });
    
        var exampleDatacenter = new Ionoscloud.Compute.Datacenter("example", new()
        {
            Name = "Datacenter Example",
            Location = "us/las",
            Description = "Datacenter Description",
            SecAuthProtection = false,
        });
    
        var exampleLan = new Ionoscloud.Compute.Lan("example", new()
        {
            DatacenterId = exampleDatacenter.Id,
            Public = true,
            Name = "Lan Example",
        });
    
        var exampleIPBlock = new Ionoscloud.Compute.IPBlock("example", new()
        {
            Location = exampleDatacenter.Location,
            Size = 4,
            Name = "IP Block Example",
        });
    
        var serverImagePassword = new Random.Index.Password("server_image_password", new()
        {
            Length = 16,
            Special = false,
        });
    
        var exampleServer = new Ionoscloud.Compute.Server("example", new()
        {
            Name = "Server Example",
            DatacenterId = exampleDatacenter.Id,
            Cores = 1,
            Ram = 1024,
            AvailabilityZone = "ZONE_1",
            CpuFamily = "INTEL_XEON",
            ImageName = example.Apply(getImageResult => getImageResult.Name),
            ImagePassword = serverImagePassword.Result,
            Type = "ENTERPRISE",
            Volume = new Ionoscloud.Compute.Inputs.ServerVolumeArgs
            {
                Name = "system",
                Size = 5,
                DiskType = "SSD Standard",
                UserData = "foo",
                Bus = "VIRTIO",
                AvailabilityZone = "ZONE_1",
            },
            Nic = new Ionoscloud.Compute.Inputs.ServerNicArgs
            {
                Lan = exampleLan.Id,
                Name = "system",
                Dhcp = true,
                FirewallActive = true,
                FirewallType = "BIDIRECTIONAL",
                Ips = new[]
                {
                    exampleIPBlock.Ips.Apply(ips => ips[0]),
                    exampleIPBlock.Ips.Apply(ips => ips[1]),
                },
                Firewalls = new[]
                {
                    new Ionoscloud.Compute.Inputs.ServerNicFirewallArgs
                    {
                        Protocol = "TCP",
                        Name = "SSH",
                        PortRangeStart = 22,
                        PortRangeEnd = 22,
                        SourceMac = "00:0a:95:9d:68:17",
                        SourceIp = exampleIPBlock.Ips.Apply(ips => ips[2]),
                        TargetIp = exampleIPBlock.Ips.Apply(ips => ips[3]),
                        Type = "EGRESS",
                    },
                },
            },
        });
    
        var volumeImagePassword = new Random.Index.Password("volume_image_password", new()
        {
            Length = 16,
            Special = false,
        });
    
        var exampleVolume = new Ionoscloud.Compute.Volume("example", new()
        {
            DatacenterId = exampleDatacenter.Id,
            ServerId = exampleServer.Id,
            Name = "Volume Example",
            AvailabilityZone = "ZONE_1",
            Size = 5,
            DiskType = "SSD Standard",
            Bus = "VIRTIO",
            ImageName = example.Apply(getImageResult => getImageResult.Name),
            ImagePassword = volumeImagePassword.Result,
            UserData = "foo",
        });
    
        var example2 = new Ionoscloud.Compute.Volume("example2", new()
        {
            DatacenterId = exampleDatacenter.Id,
            ServerId = exampleServer.Id,
            Name = "Another Volume Example",
            AvailabilityZone = "ZONE_1",
            Size = 5,
            DiskType = "SSD Standard",
            Bus = "VIRTIO",
            LicenceType = "OTHER",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.compute.ComputeFunctions;
    import com.pulumi.ionoscloud.compute.inputs.GetImageArgs;
    import com.pulumi.ionoscloud.compute.Datacenter;
    import com.pulumi.ionoscloud.compute.DatacenterArgs;
    import com.pulumi.ionoscloud.compute.Lan;
    import com.pulumi.ionoscloud.compute.LanArgs;
    import com.pulumi.ionoscloud.compute.IPBlock;
    import com.pulumi.ionoscloud.compute.IPBlockArgs;
    import com.pulumi.random.password;
    import com.pulumi.random.PasswordArgs;
    import com.pulumi.ionoscloud.compute.Server;
    import com.pulumi.ionoscloud.compute.ServerArgs;
    import com.pulumi.ionoscloud.compute.inputs.ServerVolumeArgs;
    import com.pulumi.ionoscloud.compute.inputs.ServerNicArgs;
    import com.pulumi.ionoscloud.compute.Volume;
    import com.pulumi.ionoscloud.compute.VolumeArgs;
    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) {
            final var example = ComputeFunctions.getImage(GetImageArgs.builder()
                .type("HDD")
                .cloudInit("V1")
                .imageAlias("ubuntu:latest")
                .location("us/las")
                .build());
    
            var exampleDatacenter = new Datacenter("exampleDatacenter", DatacenterArgs.builder()
                .name("Datacenter Example")
                .location("us/las")
                .description("Datacenter Description")
                .secAuthProtection(false)
                .build());
    
            var exampleLan = new Lan("exampleLan", LanArgs.builder()
                .datacenterId(exampleDatacenter.id())
                .public_(true)
                .name("Lan Example")
                .build());
    
            var exampleIPBlock = new IPBlock("exampleIPBlock", IPBlockArgs.builder()
                .location(exampleDatacenter.location())
                .size(4)
                .name("IP Block Example")
                .build());
    
            var serverImagePassword = new Password("serverImagePassword", PasswordArgs.builder()
                .length(16)
                .special(false)
                .build());
    
            var exampleServer = new Server("exampleServer", ServerArgs.builder()
                .name("Server Example")
                .datacenterId(exampleDatacenter.id())
                .cores(1)
                .ram(1024)
                .availabilityZone("ZONE_1")
                .cpuFamily("INTEL_XEON")
                .imageName(example.applyValue(getImageResult -> getImageResult.name()))
                .imagePassword(serverImagePassword.result())
                .type("ENTERPRISE")
                .volume(ServerVolumeArgs.builder()
                    .name("system")
                    .size(5)
                    .diskType("SSD Standard")
                    .userData("foo")
                    .bus("VIRTIO")
                    .availabilityZone("ZONE_1")
                    .build())
                .nic(ServerNicArgs.builder()
                    .lan(exampleLan.id())
                    .name("system")
                    .dhcp(true)
                    .firewallActive(true)
                    .firewallType("BIDIRECTIONAL")
                    .ips(                
                        exampleIPBlock.ips().applyValue(ips -> ips[0]),
                        exampleIPBlock.ips().applyValue(ips -> ips[1]))
                    .firewalls(ServerNicFirewallArgs.builder()
                        .protocol("TCP")
                        .name("SSH")
                        .portRangeStart(22)
                        .portRangeEnd(22)
                        .sourceMac("00:0a:95:9d:68:17")
                        .sourceIp(exampleIPBlock.ips().applyValue(ips -> ips[2]))
                        .targetIp(exampleIPBlock.ips().applyValue(ips -> ips[3]))
                        .type("EGRESS")
                        .build())
                    .build())
                .build());
    
            var volumeImagePassword = new Password("volumeImagePassword", PasswordArgs.builder()
                .length(16)
                .special(false)
                .build());
    
            var exampleVolume = new Volume("exampleVolume", VolumeArgs.builder()
                .datacenterId(exampleDatacenter.id())
                .serverId(exampleServer.id())
                .name("Volume Example")
                .availabilityZone("ZONE_1")
                .size(5)
                .diskType("SSD Standard")
                .bus("VIRTIO")
                .imageName(example.applyValue(getImageResult -> getImageResult.name()))
                .imagePassword(volumeImagePassword.result())
                .userData("foo")
                .build());
    
            var example2 = new Volume("example2", VolumeArgs.builder()
                .datacenterId(exampleDatacenter.id())
                .serverId(exampleServer.id())
                .name("Another Volume Example")
                .availabilityZone("ZONE_1")
                .size(5)
                .diskType("SSD Standard")
                .bus("VIRTIO")
                .licenceType("OTHER")
                .build());
    
        }
    }
    
    resources:
      exampleDatacenter:
        type: ionoscloud:compute:Datacenter
        name: example
        properties:
          name: Datacenter Example
          location: us/las
          description: Datacenter Description
          secAuthProtection: false
      exampleLan:
        type: ionoscloud:compute:Lan
        name: example
        properties:
          datacenterId: ${exampleDatacenter.id}
          public: true
          name: Lan Example
      exampleIPBlock:
        type: ionoscloud:compute:IPBlock
        name: example
        properties:
          location: ${exampleDatacenter.location}
          size: 4
          name: IP Block Example
      exampleServer:
        type: ionoscloud:compute:Server
        name: example
        properties:
          name: Server Example
          datacenterId: ${exampleDatacenter.id}
          cores: 1
          ram: 1024
          availabilityZone: ZONE_1
          cpuFamily: INTEL_XEON
          imageName: ${example.name}
          imagePassword: ${serverImagePassword.result}
          type: ENTERPRISE
          volume:
            name: system
            size: 5
            diskType: SSD Standard
            userData: foo
            bus: VIRTIO
            availabilityZone: ZONE_1
          nic:
            lan: ${exampleLan.id}
            name: system
            dhcp: true
            firewallActive: true
            firewallType: BIDIRECTIONAL
            ips:
              - ${exampleIPBlock.ips[0]}
              - ${exampleIPBlock.ips[1]}
            firewalls:
              - protocol: TCP
                name: SSH
                portRangeStart: 22
                portRangeEnd: 22
                sourceMac: 00:0a:95:9d:68:17
                sourceIp: ${exampleIPBlock.ips[2]}
                targetIp: ${exampleIPBlock.ips[3]}
                type: EGRESS
      exampleVolume:
        type: ionoscloud:compute:Volume
        name: example
        properties:
          datacenterId: ${exampleDatacenter.id}
          serverId: ${exampleServer.id}
          name: Volume Example
          availabilityZone: ZONE_1
          size: 5
          diskType: SSD Standard
          bus: VIRTIO
          imageName: ${example.name}
          imagePassword: ${volumeImagePassword.result}
          userData: foo
      example2:
        type: ionoscloud:compute:Volume
        properties:
          datacenterId: ${exampleDatacenter.id}
          serverId: ${exampleServer.id}
          name: Another Volume Example
          availabilityZone: ZONE_1
          size: 5
          diskType: SSD Standard
          bus: VIRTIO
          licenceType: OTHER
      serverImagePassword:
        type: random:password
        name: server_image_password
        properties:
          length: 16
          special: false
      volumeImagePassword:
        type: random:password
        name: volume_image_password
        properties:
          length: 16
          special: false
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getImage
          arguments:
            type: HDD
            cloudInit: V1
            imageAlias: ubuntu:latest
            location: us/las
    

    Create Volume Resource

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

    Constructor syntax

    new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
    @overload
    def Volume(resource_name: str,
               args: VolumeArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Volume(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               server_id: Optional[str] = None,
               size: Optional[int] = None,
               disk_type: Optional[str] = None,
               datacenter_id: Optional[str] = None,
               bus: Optional[str] = None,
               image_name: Optional[str] = None,
               name: Optional[str] = None,
               ssh_keys: Optional[Sequence[str]] = None,
               backup_unit_id: Optional[str] = None,
               availability_zone: Optional[str] = None,
               image_password: Optional[str] = None,
               ssh_key_paths: Optional[Sequence[str]] = None,
               licence_type: Optional[str] = None,
               user_data: Optional[str] = None)
    func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
    public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
    public Volume(String name, VolumeArgs args)
    public Volume(String name, VolumeArgs args, CustomResourceOptions options)
    
    type: ionoscloud:compute:Volume
    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 VolumeArgs
    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 VolumeArgs
    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 VolumeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VolumeArgs
    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 volumeResource = new Ionoscloud.Compute.Volume("volumeResource", new()
    {
        ServerId = "string",
        Size = 0,
        DiskType = "string",
        DatacenterId = "string",
        Bus = "string",
        ImageName = "string",
        Name = "string",
        SshKeys = new[]
        {
            "string",
        },
        BackupUnitId = "string",
        AvailabilityZone = "string",
        ImagePassword = "string",
        SshKeyPaths = new[]
        {
            "string",
        },
        LicenceType = "string",
        UserData = "string",
    });
    
    example, err := compute.NewVolume(ctx, "volumeResource", &compute.VolumeArgs{
    	ServerId:     pulumi.String("string"),
    	Size:         pulumi.Int(0),
    	DiskType:     pulumi.String("string"),
    	DatacenterId: pulumi.String("string"),
    	Bus:          pulumi.String("string"),
    	ImageName:    pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	SshKeys: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	BackupUnitId:     pulumi.String("string"),
    	AvailabilityZone: pulumi.String("string"),
    	ImagePassword:    pulumi.String("string"),
    	SshKeyPaths: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LicenceType: pulumi.String("string"),
    	UserData:    pulumi.String("string"),
    })
    
    var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
        .serverId("string")
        .size(0)
        .diskType("string")
        .datacenterId("string")
        .bus("string")
        .imageName("string")
        .name("string")
        .sshKeys("string")
        .backupUnitId("string")
        .availabilityZone("string")
        .imagePassword("string")
        .sshKeyPaths("string")
        .licenceType("string")
        .userData("string")
        .build());
    
    volume_resource = ionoscloud.compute.Volume("volumeResource",
        server_id="string",
        size=0,
        disk_type="string",
        datacenter_id="string",
        bus="string",
        image_name="string",
        name="string",
        ssh_keys=["string"],
        backup_unit_id="string",
        availability_zone="string",
        image_password="string",
        ssh_key_paths=["string"],
        licence_type="string",
        user_data="string")
    
    const volumeResource = new ionoscloud.compute.Volume("volumeResource", {
        serverId: "string",
        size: 0,
        diskType: "string",
        datacenterId: "string",
        bus: "string",
        imageName: "string",
        name: "string",
        sshKeys: ["string"],
        backupUnitId: "string",
        availabilityZone: "string",
        imagePassword: "string",
        sshKeyPaths: ["string"],
        licenceType: "string",
        userData: "string",
    });
    
    type: ionoscloud:compute:Volume
    properties:
        availabilityZone: string
        backupUnitId: string
        bus: string
        datacenterId: string
        diskType: string
        imageName: string
        imagePassword: string
        licenceType: string
        name: string
        serverId: string
        size: 0
        sshKeyPaths:
            - string
        sshKeys:
            - string
        userData: string
    

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

    DatacenterId string
    [string] The ID of a Virtual Data Center.
    DiskType string
    [string] The volume type: HDD or SSD. This property is immutable.
    ServerId string
    [string] The ID of a server.
    Size int
    [integer] The size of the volume in GB.
    AvailabilityZone string
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    BackupUnitId string
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    Bus string
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    ImageName string
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    ImagePassword string
    [string] Required if sshkey_path is not provided.
    LicenceType string
    [string] Required if image_name is not provided.
    Name string
    [string] The name of the volume.
    SshKeyPaths List<string>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    SshKeys List<string>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    UserData string
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    DatacenterId string
    [string] The ID of a Virtual Data Center.
    DiskType string
    [string] The volume type: HDD or SSD. This property is immutable.
    ServerId string
    [string] The ID of a server.
    Size int
    [integer] The size of the volume in GB.
    AvailabilityZone string
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    BackupUnitId string
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    Bus string
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    ImageName string
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    ImagePassword string
    [string] Required if sshkey_path is not provided.
    LicenceType string
    [string] Required if image_name is not provided.
    Name string
    [string] The name of the volume.
    SshKeyPaths []string
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    SshKeys []string
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    UserData string
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    datacenterId String
    [string] The ID of a Virtual Data Center.
    diskType String
    [string] The volume type: HDD or SSD. This property is immutable.
    serverId String
    [string] The ID of a server.
    size Integer
    [integer] The size of the volume in GB.
    availabilityZone String
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    backupUnitId String
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    bus String
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    imageName String
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    imagePassword String
    [string] Required if sshkey_path is not provided.
    licenceType String
    [string] Required if image_name is not provided.
    name String
    [string] The name of the volume.
    sshKeyPaths List<String>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshKeys List<String>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    userData String
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    datacenterId string
    [string] The ID of a Virtual Data Center.
    diskType string
    [string] The volume type: HDD or SSD. This property is immutable.
    serverId string
    [string] The ID of a server.
    size number
    [integer] The size of the volume in GB.
    availabilityZone string
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    backupUnitId string
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    bus string
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    imageName string
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    imagePassword string
    [string] Required if sshkey_path is not provided.
    licenceType string
    [string] Required if image_name is not provided.
    name string
    [string] The name of the volume.
    sshKeyPaths string[]
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshKeys string[]
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    userData string
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    datacenter_id str
    [string] The ID of a Virtual Data Center.
    disk_type str
    [string] The volume type: HDD or SSD. This property is immutable.
    server_id str
    [string] The ID of a server.
    size int
    [integer] The size of the volume in GB.
    availability_zone str
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    backup_unit_id str
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    bus str
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    image_name str
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    image_password str
    [string] Required if sshkey_path is not provided.
    licence_type str
    [string] Required if image_name is not provided.
    name str
    [string] The name of the volume.
    ssh_key_paths Sequence[str]
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    ssh_keys Sequence[str]
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    user_data str
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    datacenterId String
    [string] The ID of a Virtual Data Center.
    diskType String
    [string] The volume type: HDD or SSD. This property is immutable.
    serverId String
    [string] The ID of a server.
    size Number
    [integer] The size of the volume in GB.
    availabilityZone String
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    backupUnitId String
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    bus String
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    imageName String
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    imagePassword String
    [string] Required if sshkey_path is not provided.
    licenceType String
    [string] Required if image_name is not provided.
    name String
    [string] The name of the volume.
    sshKeyPaths List<String>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshKeys List<String>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    userData String
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.

    Outputs

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

    BootServer string

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    CpuHotPlug bool
    [string] Is capable of CPU hot plug (no reboot required)
    DeviceNumber int
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    DiscVirtioHotPlug bool
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    DiscVirtioHotUnplug bool
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    Id string
    The provider-assigned unique ID for this managed resource.
    Image string
    The image or snapshot UUID.
    ImageId string
    NicHotPlug bool
    [string] Is capable of nic hot plug (no reboot required)
    NicHotUnplug bool
    [string] Is capable of nic hot unplug (no reboot required)
    PciSlot int
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    RamHotPlug bool
    [string] Is capable of memory hot plug (no reboot required)
    Sshkey string
    The associated public SSH key.
    BootServer string

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    CpuHotPlug bool
    [string] Is capable of CPU hot plug (no reboot required)
    DeviceNumber int
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    DiscVirtioHotPlug bool
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    DiscVirtioHotUnplug bool
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    Id string
    The provider-assigned unique ID for this managed resource.
    Image string
    The image or snapshot UUID.
    ImageId string
    NicHotPlug bool
    [string] Is capable of nic hot plug (no reboot required)
    NicHotUnplug bool
    [string] Is capable of nic hot unplug (no reboot required)
    PciSlot int
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    RamHotPlug bool
    [string] Is capable of memory hot plug (no reboot required)
    Sshkey string
    The associated public SSH key.
    bootServer String

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    cpuHotPlug Boolean
    [string] Is capable of CPU hot plug (no reboot required)
    deviceNumber Integer
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    discVirtioHotPlug Boolean
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    discVirtioHotUnplug Boolean
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    id String
    The provider-assigned unique ID for this managed resource.
    image String
    The image or snapshot UUID.
    imageId String
    nicHotPlug Boolean
    [string] Is capable of nic hot plug (no reboot required)
    nicHotUnplug Boolean
    [string] Is capable of nic hot unplug (no reboot required)
    pciSlot Integer
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    ramHotPlug Boolean
    [string] Is capable of memory hot plug (no reboot required)
    sshkey String
    The associated public SSH key.
    bootServer string

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    cpuHotPlug boolean
    [string] Is capable of CPU hot plug (no reboot required)
    deviceNumber number
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    discVirtioHotPlug boolean
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    discVirtioHotUnplug boolean
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    id string
    The provider-assigned unique ID for this managed resource.
    image string
    The image or snapshot UUID.
    imageId string
    nicHotPlug boolean
    [string] Is capable of nic hot plug (no reboot required)
    nicHotUnplug boolean
    [string] Is capable of nic hot unplug (no reboot required)
    pciSlot number
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    ramHotPlug boolean
    [string] Is capable of memory hot plug (no reboot required)
    sshkey string
    The associated public SSH key.
    boot_server str

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    cpu_hot_plug bool
    [string] Is capable of CPU hot plug (no reboot required)
    device_number int
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    disc_virtio_hot_plug bool
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    disc_virtio_hot_unplug bool
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    id str
    The provider-assigned unique ID for this managed resource.
    image str
    The image or snapshot UUID.
    image_id str
    nic_hot_plug bool
    [string] Is capable of nic hot plug (no reboot required)
    nic_hot_unplug bool
    [string] Is capable of nic hot unplug (no reboot required)
    pci_slot int
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    ram_hot_plug bool
    [string] Is capable of memory hot plug (no reboot required)
    sshkey str
    The associated public SSH key.
    bootServer String

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    cpuHotPlug Boolean
    [string] Is capable of CPU hot plug (no reboot required)
    deviceNumber Number
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    discVirtioHotPlug Boolean
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    discVirtioHotUnplug Boolean
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    id String
    The provider-assigned unique ID for this managed resource.
    image String
    The image or snapshot UUID.
    imageId String
    nicHotPlug Boolean
    [string] Is capable of nic hot plug (no reboot required)
    nicHotUnplug Boolean
    [string] Is capable of nic hot unplug (no reboot required)
    pciSlot Number
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    ramHotPlug Boolean
    [string] Is capable of memory hot plug (no reboot required)
    sshkey String
    The associated public SSH key.

    Look up Existing Volume Resource

    Get an existing Volume 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?: VolumeState, opts?: CustomResourceOptions): Volume
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_zone: Optional[str] = None,
            backup_unit_id: Optional[str] = None,
            boot_server: Optional[str] = None,
            bus: Optional[str] = None,
            cpu_hot_plug: Optional[bool] = None,
            datacenter_id: Optional[str] = None,
            device_number: Optional[int] = None,
            disc_virtio_hot_plug: Optional[bool] = None,
            disc_virtio_hot_unplug: Optional[bool] = None,
            disk_type: Optional[str] = None,
            image: Optional[str] = None,
            image_id: Optional[str] = None,
            image_name: Optional[str] = None,
            image_password: Optional[str] = None,
            licence_type: Optional[str] = None,
            name: Optional[str] = None,
            nic_hot_plug: Optional[bool] = None,
            nic_hot_unplug: Optional[bool] = None,
            pci_slot: Optional[int] = None,
            ram_hot_plug: Optional[bool] = None,
            server_id: Optional[str] = None,
            size: Optional[int] = None,
            ssh_key_paths: Optional[Sequence[str]] = None,
            ssh_keys: Optional[Sequence[str]] = None,
            sshkey: Optional[str] = None,
            user_data: Optional[str] = None) -> Volume
    func GetVolume(ctx *Context, name string, id IDInput, state *VolumeState, opts ...ResourceOption) (*Volume, error)
    public static Volume Get(string name, Input<string> id, VolumeState? state, CustomResourceOptions? opts = null)
    public static Volume get(String name, Output<String> id, VolumeState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:compute:Volume    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.
    The following state arguments are supported:
    AvailabilityZone string
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    BackupUnitId string
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    BootServer string

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    Bus string
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    CpuHotPlug bool
    [string] Is capable of CPU hot plug (no reboot required)
    DatacenterId string
    [string] The ID of a Virtual Data Center.
    DeviceNumber int
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    DiscVirtioHotPlug bool
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    DiscVirtioHotUnplug bool
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    DiskType string
    [string] The volume type: HDD or SSD. This property is immutable.
    Image string
    The image or snapshot UUID.
    ImageId string
    ImageName string
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    ImagePassword string
    [string] Required if sshkey_path is not provided.
    LicenceType string
    [string] Required if image_name is not provided.
    Name string
    [string] The name of the volume.
    NicHotPlug bool
    [string] Is capable of nic hot plug (no reboot required)
    NicHotUnplug bool
    [string] Is capable of nic hot unplug (no reboot required)
    PciSlot int
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    RamHotPlug bool
    [string] Is capable of memory hot plug (no reboot required)
    ServerId string
    [string] The ID of a server.
    Size int
    [integer] The size of the volume in GB.
    SshKeyPaths List<string>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    SshKeys List<string>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    Sshkey string
    The associated public SSH key.
    UserData string
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    AvailabilityZone string
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    BackupUnitId string
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    BootServer string

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    Bus string
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    CpuHotPlug bool
    [string] Is capable of CPU hot plug (no reboot required)
    DatacenterId string
    [string] The ID of a Virtual Data Center.
    DeviceNumber int
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    DiscVirtioHotPlug bool
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    DiscVirtioHotUnplug bool
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    DiskType string
    [string] The volume type: HDD or SSD. This property is immutable.
    Image string
    The image or snapshot UUID.
    ImageId string
    ImageName string
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    ImagePassword string
    [string] Required if sshkey_path is not provided.
    LicenceType string
    [string] Required if image_name is not provided.
    Name string
    [string] The name of the volume.
    NicHotPlug bool
    [string] Is capable of nic hot plug (no reboot required)
    NicHotUnplug bool
    [string] Is capable of nic hot unplug (no reboot required)
    PciSlot int
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    RamHotPlug bool
    [string] Is capable of memory hot plug (no reboot required)
    ServerId string
    [string] The ID of a server.
    Size int
    [integer] The size of the volume in GB.
    SshKeyPaths []string
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    SshKeys []string
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    Sshkey string
    The associated public SSH key.
    UserData string
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    availabilityZone String
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    backupUnitId String
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    bootServer String

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    bus String
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    cpuHotPlug Boolean
    [string] Is capable of CPU hot plug (no reboot required)
    datacenterId String
    [string] The ID of a Virtual Data Center.
    deviceNumber Integer
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    discVirtioHotPlug Boolean
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    discVirtioHotUnplug Boolean
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    diskType String
    [string] The volume type: HDD or SSD. This property is immutable.
    image String
    The image or snapshot UUID.
    imageId String
    imageName String
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    imagePassword String
    [string] Required if sshkey_path is not provided.
    licenceType String
    [string] Required if image_name is not provided.
    name String
    [string] The name of the volume.
    nicHotPlug Boolean
    [string] Is capable of nic hot plug (no reboot required)
    nicHotUnplug Boolean
    [string] Is capable of nic hot unplug (no reboot required)
    pciSlot Integer
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    ramHotPlug Boolean
    [string] Is capable of memory hot plug (no reboot required)
    serverId String
    [string] The ID of a server.
    size Integer
    [integer] The size of the volume in GB.
    sshKeyPaths List<String>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshKeys List<String>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshkey String
    The associated public SSH key.
    userData String
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    availabilityZone string
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    backupUnitId string
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    bootServer string

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    bus string
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    cpuHotPlug boolean
    [string] Is capable of CPU hot plug (no reboot required)
    datacenterId string
    [string] The ID of a Virtual Data Center.
    deviceNumber number
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    discVirtioHotPlug boolean
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    discVirtioHotUnplug boolean
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    diskType string
    [string] The volume type: HDD or SSD. This property is immutable.
    image string
    The image or snapshot UUID.
    imageId string
    imageName string
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    imagePassword string
    [string] Required if sshkey_path is not provided.
    licenceType string
    [string] Required if image_name is not provided.
    name string
    [string] The name of the volume.
    nicHotPlug boolean
    [string] Is capable of nic hot plug (no reboot required)
    nicHotUnplug boolean
    [string] Is capable of nic hot unplug (no reboot required)
    pciSlot number
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    ramHotPlug boolean
    [string] Is capable of memory hot plug (no reboot required)
    serverId string
    [string] The ID of a server.
    size number
    [integer] The size of the volume in GB.
    sshKeyPaths string[]
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshKeys string[]
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshkey string
    The associated public SSH key.
    userData string
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    availability_zone str
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    backup_unit_id str
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    boot_server str

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    bus str
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    cpu_hot_plug bool
    [string] Is capable of CPU hot plug (no reboot required)
    datacenter_id str
    [string] The ID of a Virtual Data Center.
    device_number int
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    disc_virtio_hot_plug bool
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    disc_virtio_hot_unplug bool
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    disk_type str
    [string] The volume type: HDD or SSD. This property is immutable.
    image str
    The image or snapshot UUID.
    image_id str
    image_name str
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    image_password str
    [string] Required if sshkey_path is not provided.
    licence_type str
    [string] Required if image_name is not provided.
    name str
    [string] The name of the volume.
    nic_hot_plug bool
    [string] Is capable of nic hot plug (no reboot required)
    nic_hot_unplug bool
    [string] Is capable of nic hot unplug (no reboot required)
    pci_slot int
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    ram_hot_plug bool
    [string] Is capable of memory hot plug (no reboot required)
    server_id str
    [string] The ID of a server.
    size int
    [integer] The size of the volume in GB.
    ssh_key_paths Sequence[str]
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    ssh_keys Sequence[str]
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshkey str
    The associated public SSH key.
    user_data str
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.
    availabilityZone String
    [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
    backupUnitId String
    [string] The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.
    bootServer String

    [string] The UUID of the attached server.

    ⚠ WARNING

    ssh_key_path and ssh_keys fields are immutable. If you want to create a CUBE server, the type of the inline volume must be set to DAS. In this case, you can not set the size argument since it is taken from the template_uuid you set in the server.

    bus String
    [Boolean] The bus type of the volume: VIRTIO or IDE.
    cpuHotPlug Boolean
    [string] Is capable of CPU hot plug (no reboot required)
    datacenterId String
    [string] The ID of a Virtual Data Center.
    deviceNumber Number
    The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
    discVirtioHotPlug Boolean
    [string] Is capable of Virt-IO drive hot plug (no reboot required)
    discVirtioHotUnplug Boolean
    [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
    diskType String
    [string] The volume type: HDD or SSD. This property is immutable.
    image String
    The image or snapshot UUID.
    imageId String
    imageName String
    [string] The name, ID or alias of the image. May also be a snapshot ID. It is required if licence_type is not provided. Attribute is immutable.
    imagePassword String
    [string] Required if sshkey_path is not provided.
    licenceType String
    [string] Required if image_name is not provided.
    name String
    [string] The name of the volume.
    nicHotPlug Boolean
    [string] Is capable of nic hot plug (no reboot required)
    nicHotUnplug Boolean
    [string] Is capable of nic hot unplug (no reboot required)
    pciSlot Number
    The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
    ramHotPlug Boolean
    [string] Is capable of memory hot plug (no reboot required)
    serverId String
    [string] The ID of a server.
    size Number
    [integer] The size of the volume in GB.
    sshKeyPaths List<String>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshKeys List<String>
    [list] List of absolute paths to files containing a public SSH key that will be injected into IonosCloud provided Linux images. Also accepts ssh keys directly. Required for IonosCloud Linux images. Required if image_password is not provided. This property is immutable.
    sshkey String
    The associated public SSH key.
    userData String
    [string] The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. This option will work only with cloud-init compatible images.

    Import

    Resource Volume can be imported using the resource id, e.g.

    $ pulumi import ionoscloud:compute/volume:Volume myvolume datacenter uuid/server uuid/volume uuid
    

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

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud