1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. Volume
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.Volume

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 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 "@pulumi/ionoscloud";
    import * as random from "@pulumi/random";
    
    const exampleImage = ionoscloud.getImage({
        type: "HDD",
        cloudInit: "V1",
        imageAlias: "ubuntu:latest",
        location: "us/las",
    });
    const exampleDatacenter = new ionoscloud.Datacenter("exampleDatacenter", {
        location: "us/las",
        description: "Datacenter Description",
        secAuthProtection: false,
    });
    const exampleLan = new ionoscloud.Lan("exampleLan", {
        datacenterId: exampleDatacenter.datacenterId,
        "public": true,
    });
    const exampleIpblock = new ionoscloud.Ipblock("exampleIpblock", {
        location: exampleDatacenter.location,
        size: 4,
    });
    const serverImagePassword = new random.index.Random_password("serverImagePassword", {
        length: 16,
        special: false,
    });
    const exampleServer = new ionoscloud.Server("exampleServer", {
        datacenterId: exampleDatacenter.datacenterId,
        cores: 1,
        ram: 1024,
        imageName: exampleImage.then(exampleImage => exampleImage.name),
        imagePassword: serverImagePassword.result,
        type: "ENTERPRISE",
        volume: {
            name: "system",
            size: 5,
            diskType: "SSD Standard",
            userData: "foo",
            bus: "VIRTIO",
            availabilityZone: "ZONE_1",
        },
        nic: {
            lan: exampleLan.lanId,
            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.Random_password("volumeImagePassword", {
        length: 16,
        special: false,
    });
    const exampleVolume = new ionoscloud.Volume("exampleVolume", {
        datacenterId: exampleDatacenter.datacenterId,
        serverId: exampleServer.serverId,
        availabilityZone: "ZONE_1",
        size: 5,
        diskType: "SSD Standard",
        bus: "VIRTIO",
        imageName: exampleImage.then(exampleImage => exampleImage.name),
        imagePassword: volumeImagePassword.result,
        userData: "foo",
    });
    const example2 = new ionoscloud.Volume("example2", {
        datacenterId: exampleDatacenter.datacenterId,
        serverId: exampleServer.serverId,
        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_image = ionoscloud.get_image(type="HDD",
        cloud_init="V1",
        image_alias="ubuntu:latest",
        location="us/las")
    example_datacenter = ionoscloud.Datacenter("exampleDatacenter",
        location="us/las",
        description="Datacenter Description",
        sec_auth_protection=False)
    example_lan = ionoscloud.Lan("exampleLan",
        datacenter_id=example_datacenter.datacenter_id,
        public=True)
    example_ipblock = ionoscloud.Ipblock("exampleIpblock",
        location=example_datacenter.location,
        size=4)
    server_image_password = random.index.Random_password("serverImagePassword",
        length=16,
        special=False)
    example_server = ionoscloud.Server("exampleServer",
        datacenter_id=example_datacenter.datacenter_id,
        cores=1,
        ram=1024,
        image_name=example_image.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.lan_id,
            "name": "system",
            "dhcp": True,
            "firewall_active": True,
            "firewall_type": "BIDIRECTIONAL",
            "ips": [
                example_ipblock.ips[0],
                example_ipblock.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_ipblock.ips[2],
                "target_ip": example_ipblock.ips[3],
                "type": "EGRESS",
            }],
        })
    volume_image_password = random.index.Random_password("volumeImagePassword",
        length=16,
        special=False)
    example_volume = ionoscloud.Volume("exampleVolume",
        datacenter_id=example_datacenter.datacenter_id,
        server_id=example_server.server_id,
        availability_zone="ZONE_1",
        size=5,
        disk_type="SSD Standard",
        bus="VIRTIO",
        image_name=example_image.name,
        image_password=volume_image_password["result"],
        user_data="foo")
    example2 = ionoscloud.Volume("example2",
        datacenter_id=example_datacenter.datacenter_id,
        server_id=example_server.server_id,
        availability_zone="ZONE_1",
        size=5,
        disk_type="SSD Standard",
        bus="VIRTIO",
        licence_type="OTHER")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-random/sdk/go/random"
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleImage, err := ionoscloud.GetImage(ctx, &ionoscloud.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 := ionoscloud.NewDatacenter(ctx, "exampleDatacenter", &ionoscloud.DatacenterArgs{
    			Location:          pulumi.String("us/las"),
    			Description:       pulumi.String("Datacenter Description"),
    			SecAuthProtection: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		exampleLan, err := ionoscloud.NewLan(ctx, "exampleLan", &ionoscloud.LanArgs{
    			DatacenterId: exampleDatacenter.DatacenterId,
    			Public:       pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		exampleIpblock, err := ionoscloud.NewIpblock(ctx, "exampleIpblock", &ionoscloud.IpblockArgs{
    			Location: exampleDatacenter.Location,
    			Size:     pulumi.Float64(4),
    		})
    		if err != nil {
    			return err
    		}
    		serverImagePassword, err := random.NewRandom_password(ctx, "serverImagePassword", &random.Random_passwordArgs{
    			Length:  16,
    			Special: false,
    		})
    		if err != nil {
    			return err
    		}
    		exampleServer, err := ionoscloud.NewServer(ctx, "exampleServer", &ionoscloud.ServerArgs{
    			DatacenterId:  exampleDatacenter.DatacenterId,
    			Cores:         pulumi.Float64(1),
    			Ram:           pulumi.Float64(1024),
    			ImageName:     pulumi.String(exampleImage.Name),
    			ImagePassword: serverImagePassword.Result,
    			Type:          pulumi.String("ENTERPRISE"),
    			Volume: &ionoscloud.ServerVolumeArgs{
    				Name:             pulumi.String("system"),
    				Size:             pulumi.Float64(5),
    				DiskType:         pulumi.String("SSD Standard"),
    				UserData:         pulumi.String("foo"),
    				Bus:              pulumi.String("VIRTIO"),
    				AvailabilityZone: pulumi.String("ZONE_1"),
    			},
    			Nic: &ionoscloud.ServerNicArgs{
    				Lan:            exampleLan.LanId,
    				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: ionoscloud.ServerNicFirewallArray{
    					&ionoscloud.ServerNicFirewallArgs{
    						Protocol:       pulumi.String("TCP"),
    						Name:           pulumi.String("SSH"),
    						PortRangeStart: pulumi.Float64(22),
    						PortRangeEnd:   pulumi.Float64(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.NewRandom_password(ctx, "volumeImagePassword", &random.Random_passwordArgs{
    			Length:  16,
    			Special: false,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ionoscloud.NewVolume(ctx, "exampleVolume", &ionoscloud.VolumeArgs{
    			DatacenterId:     exampleDatacenter.DatacenterId,
    			ServerId:         exampleServer.ServerId,
    			AvailabilityZone: pulumi.String("ZONE_1"),
    			Size:             pulumi.Float64(5),
    			DiskType:         pulumi.String("SSD Standard"),
    			Bus:              pulumi.String("VIRTIO"),
    			ImageName:        pulumi.String(exampleImage.Name),
    			ImagePassword:    volumeImagePassword.Result,
    			UserData:         pulumi.String("foo"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ionoscloud.NewVolume(ctx, "example2", &ionoscloud.VolumeArgs{
    			DatacenterId:     exampleDatacenter.DatacenterId,
    			ServerId:         exampleServer.ServerId,
    			AvailabilityZone: pulumi.String("ZONE_1"),
    			Size:             pulumi.Float64(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 = Pulumi.Ionoscloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleImage = Ionoscloud.GetImage.Invoke(new()
        {
            Type = "HDD",
            CloudInit = "V1",
            ImageAlias = "ubuntu:latest",
            Location = "us/las",
        });
    
        var exampleDatacenter = new Ionoscloud.Datacenter("exampleDatacenter", new()
        {
            Location = "us/las",
            Description = "Datacenter Description",
            SecAuthProtection = false,
        });
    
        var exampleLan = new Ionoscloud.Lan("exampleLan", new()
        {
            DatacenterId = exampleDatacenter.DatacenterId,
            Public = true,
        });
    
        var exampleIpblock = new Ionoscloud.Ipblock("exampleIpblock", new()
        {
            Location = exampleDatacenter.Location,
            Size = 4,
        });
    
        var serverImagePassword = new Random.Index.Random_password("serverImagePassword", new()
        {
            Length = 16,
            Special = false,
        });
    
        var exampleServer = new Ionoscloud.Server("exampleServer", new()
        {
            DatacenterId = exampleDatacenter.DatacenterId,
            Cores = 1,
            Ram = 1024,
            ImageName = exampleImage.Apply(getImageResult => getImageResult.Name),
            ImagePassword = serverImagePassword.Result,
            Type = "ENTERPRISE",
            Volume = new Ionoscloud.Inputs.ServerVolumeArgs
            {
                Name = "system",
                Size = 5,
                DiskType = "SSD Standard",
                UserData = "foo",
                Bus = "VIRTIO",
                AvailabilityZone = "ZONE_1",
            },
            Nic = new Ionoscloud.Inputs.ServerNicArgs
            {
                Lan = exampleLan.LanId,
                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.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.Random_password("volumeImagePassword", new()
        {
            Length = 16,
            Special = false,
        });
    
        var exampleVolume = new Ionoscloud.Volume("exampleVolume", new()
        {
            DatacenterId = exampleDatacenter.DatacenterId,
            ServerId = exampleServer.ServerId,
            AvailabilityZone = "ZONE_1",
            Size = 5,
            DiskType = "SSD Standard",
            Bus = "VIRTIO",
            ImageName = exampleImage.Apply(getImageResult => getImageResult.Name),
            ImagePassword = volumeImagePassword.Result,
            UserData = "foo",
        });
    
        var example2 = new Ionoscloud.Volume("example2", new()
        {
            DatacenterId = exampleDatacenter.DatacenterId,
            ServerId = exampleServer.ServerId,
            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.IonoscloudFunctions;
    import com.pulumi.ionoscloud.inputs.GetImageArgs;
    import com.pulumi.ionoscloud.Datacenter;
    import com.pulumi.ionoscloud.DatacenterArgs;
    import com.pulumi.ionoscloud.Lan;
    import com.pulumi.ionoscloud.LanArgs;
    import com.pulumi.ionoscloud.Ipblock;
    import com.pulumi.ionoscloud.IpblockArgs;
    import com.pulumi.random.random_password;
    import com.pulumi.random.Random_passwordArgs;
    import com.pulumi.ionoscloud.Server;
    import com.pulumi.ionoscloud.ServerArgs;
    import com.pulumi.ionoscloud.inputs.ServerVolumeArgs;
    import com.pulumi.ionoscloud.inputs.ServerNicArgs;
    import com.pulumi.ionoscloud.Volume;
    import com.pulumi.ionoscloud.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 exampleImage = IonoscloudFunctions.getImage(GetImageArgs.builder()
                .type("HDD")
                .cloudInit("V1")
                .imageAlias("ubuntu:latest")
                .location("us/las")
                .build());
    
            var exampleDatacenter = new Datacenter("exampleDatacenter", DatacenterArgs.builder()
                .location("us/las")
                .description("Datacenter Description")
                .secAuthProtection(false)
                .build());
    
            var exampleLan = new Lan("exampleLan", LanArgs.builder()
                .datacenterId(exampleDatacenter.datacenterId())
                .public_(true)
                .build());
    
            var exampleIpblock = new Ipblock("exampleIpblock", IpblockArgs.builder()
                .location(exampleDatacenter.location())
                .size(4)
                .build());
    
            var serverImagePassword = new Random_password("serverImagePassword", Random_passwordArgs.builder()
                .length(16)
                .special(false)
                .build());
    
            var exampleServer = new Server("exampleServer", ServerArgs.builder()
                .datacenterId(exampleDatacenter.datacenterId())
                .cores(1)
                .ram(1024)
                .imageName(exampleImage.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.lanId())
                    .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 Random_password("volumeImagePassword", Random_passwordArgs.builder()
                .length(16)
                .special(false)
                .build());
    
            var exampleVolume = new Volume("exampleVolume", VolumeArgs.builder()
                .datacenterId(exampleDatacenter.datacenterId())
                .serverId(exampleServer.serverId())
                .availabilityZone("ZONE_1")
                .size(5)
                .diskType("SSD Standard")
                .bus("VIRTIO")
                .imageName(exampleImage.applyValue(getImageResult -> getImageResult.name()))
                .imagePassword(volumeImagePassword.result())
                .userData("foo")
                .build());
    
            var example2 = new Volume("example2", VolumeArgs.builder()
                .datacenterId(exampleDatacenter.datacenterId())
                .serverId(exampleServer.serverId())
                .availabilityZone("ZONE_1")
                .size(5)
                .diskType("SSD Standard")
                .bus("VIRTIO")
                .licenceType("OTHER")
                .build());
    
        }
    }
    
    resources:
      exampleDatacenter:
        type: ionoscloud:Datacenter
        properties:
          location: us/las
          description: Datacenter Description
          secAuthProtection: false
      exampleLan:
        type: ionoscloud:Lan
        properties:
          datacenterId: ${exampleDatacenter.datacenterId}
          public: true
      exampleIpblock:
        type: ionoscloud:Ipblock
        properties:
          location: ${exampleDatacenter.location}
          size: 4
      exampleServer:
        type: ionoscloud:Server
        properties:
          datacenterId: ${exampleDatacenter.datacenterId}
          cores: 1
          ram: 1024
          imageName: ${exampleImage.name}
          imagePassword: ${serverImagePassword.result}
          type: ENTERPRISE
          volume:
            name: system
            size: 5
            diskType: SSD Standard
            userData: foo
            bus: VIRTIO
            availabilityZone: ZONE_1
          nic:
            lan: ${exampleLan.lanId}
            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:Volume
        properties:
          datacenterId: ${exampleDatacenter.datacenterId}
          serverId: ${exampleServer.serverId}
          availabilityZone: ZONE_1
          size: 5
          diskType: SSD Standard
          bus: VIRTIO
          imageName: ${exampleImage.name}
          imagePassword: ${volumeImagePassword.result}
          userData: foo
      example2:
        type: ionoscloud:Volume
        properties:
          datacenterId: ${exampleDatacenter.datacenterId}
          serverId: ${exampleServer.serverId}
          availabilityZone: ZONE_1
          size: 5
          diskType: SSD Standard
          bus: VIRTIO
          licenceType: OTHER
      serverImagePassword:
        type: random:random_password
        properties:
          length: 16
          special: false
      volumeImagePassword:
        type: random:random_password
        properties:
          length: 16
          special: false
    variables:
      exampleImage:
        fn::invoke:
          function: ionoscloud: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,
               disk_type: Optional[str] = None,
               size: Optional[float] = None,
               server_id: Optional[str] = None,
               datacenter_id: Optional[str] = None,
               name: Optional[str] = None,
               image_name: Optional[str] = None,
               image_password: Optional[str] = None,
               licence_type: Optional[str] = None,
               availability_zone: Optional[str] = None,
               bus: Optional[str] = None,
               backup_unit_id: Optional[str] = None,
               ssh_key_paths: Optional[Sequence[str]] = None,
               ssh_keys: Optional[Sequence[str]] = None,
               timeouts: Optional[VolumeTimeoutsArgs] = None,
               user_data: Optional[str] = None,
               volume_id: 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: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.Volume("volumeResource", new()
    {
        DiskType = "string",
        Size = 0,
        ServerId = "string",
        DatacenterId = "string",
        Name = "string",
        ImageName = "string",
        ImagePassword = "string",
        LicenceType = "string",
        AvailabilityZone = "string",
        Bus = "string",
        BackupUnitId = "string",
        SshKeyPaths = new[]
        {
            "string",
        },
        SshKeys = new[]
        {
            "string",
        },
        Timeouts = new Ionoscloud.Inputs.VolumeTimeoutsArgs
        {
            Create = "string",
            Default = "string",
            Delete = "string",
            Update = "string",
        },
        UserData = "string",
        VolumeId = "string",
    });
    
    example, err := ionoscloud.NewVolume(ctx, "volumeResource", &ionoscloud.VolumeArgs{
    	DiskType:         pulumi.String("string"),
    	Size:             pulumi.Float64(0),
    	ServerId:         pulumi.String("string"),
    	DatacenterId:     pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	ImageName:        pulumi.String("string"),
    	ImagePassword:    pulumi.String("string"),
    	LicenceType:      pulumi.String("string"),
    	AvailabilityZone: pulumi.String("string"),
    	Bus:              pulumi.String("string"),
    	BackupUnitId:     pulumi.String("string"),
    	SshKeyPaths: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SshKeys: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &ionoscloud.VolumeTimeoutsArgs{
    		Create:  pulumi.String("string"),
    		Default: pulumi.String("string"),
    		Delete:  pulumi.String("string"),
    		Update:  pulumi.String("string"),
    	},
    	UserData: pulumi.String("string"),
    	VolumeId: pulumi.String("string"),
    })
    
    var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
        .diskType("string")
        .size(0)
        .serverId("string")
        .datacenterId("string")
        .name("string")
        .imageName("string")
        .imagePassword("string")
        .licenceType("string")
        .availabilityZone("string")
        .bus("string")
        .backupUnitId("string")
        .sshKeyPaths("string")
        .sshKeys("string")
        .timeouts(VolumeTimeoutsArgs.builder()
            .create("string")
            .default_("string")
            .delete("string")
            .update("string")
            .build())
        .userData("string")
        .volumeId("string")
        .build());
    
    volume_resource = ionoscloud.Volume("volumeResource",
        disk_type="string",
        size=0,
        server_id="string",
        datacenter_id="string",
        name="string",
        image_name="string",
        image_password="string",
        licence_type="string",
        availability_zone="string",
        bus="string",
        backup_unit_id="string",
        ssh_key_paths=["string"],
        ssh_keys=["string"],
        timeouts={
            "create": "string",
            "default": "string",
            "delete": "string",
            "update": "string",
        },
        user_data="string",
        volume_id="string")
    
    const volumeResource = new ionoscloud.Volume("volumeResource", {
        diskType: "string",
        size: 0,
        serverId: "string",
        datacenterId: "string",
        name: "string",
        imageName: "string",
        imagePassword: "string",
        licenceType: "string",
        availabilityZone: "string",
        bus: "string",
        backupUnitId: "string",
        sshKeyPaths: ["string"],
        sshKeys: ["string"],
        timeouts: {
            create: "string",
            "default": "string",
            "delete": "string",
            update: "string",
        },
        userData: "string",
        volumeId: "string",
    });
    
    type: ionoscloud: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
        timeouts:
            create: string
            default: string
            delete: string
            update: string
        userData: string
        volumeId: 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 double
    [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.
    Timeouts VolumeTimeouts
    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.
    VolumeId string
    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 float64
    [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.
    Timeouts VolumeTimeoutsArgs
    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.
    VolumeId string
    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 Double
    [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.
    timeouts VolumeTimeouts
    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.
    volumeId String
    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.
    timeouts VolumeTimeouts
    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.
    volumeId string
    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 float
    [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.
    timeouts VolumeTimeoutsArgs
    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.
    volume_id str
    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.
    timeouts Property Map
    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.
    volumeId String

    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 double
    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 double
    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 float64
    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 float64
    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 Double
    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 Double
    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 float
    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 float
    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[float] = 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[float] = None,
            ram_hot_plug: Optional[bool] = None,
            server_id: Optional[str] = None,
            size: Optional[float] = None,
            ssh_key_paths: Optional[Sequence[str]] = None,
            ssh_keys: Optional[Sequence[str]] = None,
            sshkey: Optional[str] = None,
            timeouts: Optional[VolumeTimeoutsArgs] = None,
            user_data: Optional[str] = None,
            volume_id: 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: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 double
    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 double
    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 double
    [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.
    Timeouts VolumeTimeouts
    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.
    VolumeId string
    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 float64
    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 float64
    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 float64
    [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.
    Timeouts VolumeTimeoutsArgs
    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.
    VolumeId string
    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 Double
    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 Double
    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 Double
    [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.
    timeouts VolumeTimeouts
    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.
    volumeId String
    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.
    timeouts VolumeTimeouts
    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.
    volumeId string
    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 float
    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 float
    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 float
    [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.
    timeouts VolumeTimeoutsArgs
    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.
    volume_id str
    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.
    timeouts Property Map
    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.
    volumeId String

    Supporting Types

    VolumeTimeouts, VolumeTimeoutsArgs

    Create string
    Default string
    Delete string
    Update string
    Create string
    Default string
    Delete string
    Update string
    create String
    default_ String
    delete String
    update String
    create string
    default string
    delete string
    update string
    create String
    default String
    delete String
    update String

    Import

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

    $ pulumi import ionoscloud:index/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/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud