ionoscloud.Volume
Explore with Pulumi AI
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:
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Disk
Type string - [string] The volume type: HDD or SSD. This property is immutable.
- Server
Id string - [string] The ID of a server.
- Size double
- [integer] The size of the volume in GB.
- Availability
Zone string - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- Backup
Unit stringId - [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.
- Image
Name 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. - Image
Password string - [string] Required if
sshkey_path
is not provided. - Licence
Type string - [string] Required if
image_name
is not provided. - Name string
- [string] The name of the volume.
- Ssh
Key List<string>Paths - [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 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
Volume
Timeouts - User
Data 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.
- Volume
Id string
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Disk
Type string - [string] The volume type: HDD or SSD. This property is immutable.
- Server
Id string - [string] The ID of a server.
- Size float64
- [integer] The size of the volume in GB.
- Availability
Zone string - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- Backup
Unit stringId - [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.
- Image
Name 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. - Image
Password string - [string] Required if
sshkey_path
is not provided. - Licence
Type string - [string] Required if
image_name
is not provided. - Name string
- [string] The name of the volume.
- Ssh
Key []stringPaths - [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 []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
Volume
Timeouts Args - User
Data 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.
- Volume
Id string
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- disk
Type String - [string] The volume type: HDD or SSD. This property is immutable.
- server
Id String - [string] The ID of a server.
- size Double
- [integer] The size of the volume in GB.
- availability
Zone String - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- backup
Unit StringId - [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.
- image
Name 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. - image
Password String - [string] Required if
sshkey_path
is not provided. - licence
Type String - [string] Required if
image_name
is not provided. - name String
- [string] The name of the volume.
- ssh
Key List<String>Paths - [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 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
Volume
Timeouts - user
Data 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.
- volume
Id String
- datacenter
Id string - [string] The ID of a Virtual Data Center.
- disk
Type string - [string] The volume type: HDD or SSD. This property is immutable.
- server
Id string - [string] The ID of a server.
- size number
- [integer] The size of the volume in GB.
- availability
Zone string - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- backup
Unit stringId - [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.
- image
Name 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. - image
Password string - [string] Required if
sshkey_path
is not provided. - licence
Type string - [string] Required if
image_name
is not provided. - name string
- [string] The name of the volume.
- ssh
Key string[]Paths - [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 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
Volume
Timeouts - user
Data 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.
- volume
Id 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_ strid - [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_ Sequence[str]paths - [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
Volume
Timeouts Args - 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
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- disk
Type String - [string] The volume type: HDD or SSD. This property is immutable.
- server
Id String - [string] The ID of a server.
- size Number
- [integer] The size of the volume in GB.
- availability
Zone String - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- backup
Unit StringId - [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.
- image
Name 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. - image
Password String - [string] Required if
sshkey_path
is not provided. - licence
Type String - [string] Required if
image_name
is not provided. - name String
- [string] The name of the volume.
- ssh
Key List<String>Paths - [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 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
- user
Data 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.
- volume
Id String
Outputs
All input properties are implicitly available as output properties. Additionally, the Volume resource produces the following output properties:
- Boot
Server 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 thetemplate_uuid
you set in the server.- Cpu
Hot boolPlug - [string] Is capable of CPU hot plug (no reboot required)
- Device
Number double - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- Disc
Virtio boolHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- Disc
Virtio boolHot Unplug - [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.
- Image
Id string - Nic
Hot boolPlug - [string] Is capable of nic hot plug (no reboot required)
- Nic
Hot boolUnplug - [string] Is capable of nic hot unplug (no reboot required)
- Pci
Slot double - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- Ram
Hot boolPlug - [string] Is capable of memory hot plug (no reboot required)
- Sshkey string
- The associated public SSH key.
- Boot
Server 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 thetemplate_uuid
you set in the server.- Cpu
Hot boolPlug - [string] Is capable of CPU hot plug (no reboot required)
- Device
Number float64 - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- Disc
Virtio boolHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- Disc
Virtio boolHot Unplug - [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.
- Image
Id string - Nic
Hot boolPlug - [string] Is capable of nic hot plug (no reboot required)
- Nic
Hot boolUnplug - [string] Is capable of nic hot unplug (no reboot required)
- Pci
Slot float64 - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- Ram
Hot boolPlug - [string] Is capable of memory hot plug (no reboot required)
- Sshkey string
- The associated public SSH key.
- boot
Server 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 thetemplate_uuid
you set in the server.- cpu
Hot BooleanPlug - [string] Is capable of CPU hot plug (no reboot required)
- device
Number Double - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- disc
Virtio BooleanHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- disc
Virtio BooleanHot Unplug - [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.
- image
Id String - nic
Hot BooleanPlug - [string] Is capable of nic hot plug (no reboot required)
- nic
Hot BooleanUnplug - [string] Is capable of nic hot unplug (no reboot required)
- pci
Slot Double - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- ram
Hot BooleanPlug - [string] Is capable of memory hot plug (no reboot required)
- sshkey String
- The associated public SSH key.
- boot
Server 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 thetemplate_uuid
you set in the server.- cpu
Hot booleanPlug - [string] Is capable of CPU hot plug (no reboot required)
- device
Number number - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- disc
Virtio booleanHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- disc
Virtio booleanHot Unplug - [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.
- image
Id string - nic
Hot booleanPlug - [string] Is capable of nic hot plug (no reboot required)
- nic
Hot booleanUnplug - [string] Is capable of nic hot unplug (no reboot required)
- pci
Slot number - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- ram
Hot booleanPlug - [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 thetemplate_uuid
you set in the server.- cpu_
hot_ boolplug - [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_ boolhot_ plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- disc_
virtio_ boolhot_ unplug - [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_ boolplug - [string] Is capable of nic hot plug (no reboot required)
- nic_
hot_ boolunplug - [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_ boolplug - [string] Is capable of memory hot plug (no reboot required)
- sshkey str
- The associated public SSH key.
- boot
Server 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 thetemplate_uuid
you set in the server.- cpu
Hot BooleanPlug - [string] Is capable of CPU hot plug (no reboot required)
- device
Number Number - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- disc
Virtio BooleanHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- disc
Virtio BooleanHot Unplug - [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.
- image
Id String - nic
Hot BooleanPlug - [string] Is capable of nic hot plug (no reboot required)
- nic
Hot BooleanUnplug - [string] Is capable of nic hot unplug (no reboot required)
- pci
Slot Number - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- ram
Hot BooleanPlug - [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.
- Availability
Zone string - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- Backup
Unit stringId - [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 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 thetemplate_uuid
you set in the server.- Bus string
- [Boolean] The bus type of the volume: VIRTIO or IDE.
- Cpu
Hot boolPlug - [string] Is capable of CPU hot plug (no reboot required)
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Device
Number double - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- Disc
Virtio boolHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- Disc
Virtio boolHot Unplug - [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
- Disk
Type string - [string] The volume type: HDD or SSD. This property is immutable.
- Image string
- The image or snapshot UUID.
- Image
Id string - Image
Name 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. - Image
Password string - [string] Required if
sshkey_path
is not provided. - Licence
Type string - [string] Required if
image_name
is not provided. - Name string
- [string] The name of the volume.
- Nic
Hot boolPlug - [string] Is capable of nic hot plug (no reboot required)
- Nic
Hot boolUnplug - [string] Is capable of nic hot unplug (no reboot required)
- Pci
Slot double - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- Ram
Hot boolPlug - [string] Is capable of memory hot plug (no reboot required)
- Server
Id string - [string] The ID of a server.
- Size double
- [integer] The size of the volume in GB.
- Ssh
Key List<string>Paths - [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 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
Volume
Timeouts - User
Data 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.
- Volume
Id string
- Availability
Zone string - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- Backup
Unit stringId - [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 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 thetemplate_uuid
you set in the server.- Bus string
- [Boolean] The bus type of the volume: VIRTIO or IDE.
- Cpu
Hot boolPlug - [string] Is capable of CPU hot plug (no reboot required)
- Datacenter
Id string - [string] The ID of a Virtual Data Center.
- Device
Number float64 - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- Disc
Virtio boolHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- Disc
Virtio boolHot Unplug - [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
- Disk
Type string - [string] The volume type: HDD or SSD. This property is immutable.
- Image string
- The image or snapshot UUID.
- Image
Id string - Image
Name 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. - Image
Password string - [string] Required if
sshkey_path
is not provided. - Licence
Type string - [string] Required if
image_name
is not provided. - Name string
- [string] The name of the volume.
- Nic
Hot boolPlug - [string] Is capable of nic hot plug (no reboot required)
- Nic
Hot boolUnplug - [string] Is capable of nic hot unplug (no reboot required)
- Pci
Slot float64 - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- Ram
Hot boolPlug - [string] Is capable of memory hot plug (no reboot required)
- Server
Id string - [string] The ID of a server.
- Size float64
- [integer] The size of the volume in GB.
- Ssh
Key []stringPaths - [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 []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
Volume
Timeouts Args - User
Data 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.
- Volume
Id string
- availability
Zone String - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- backup
Unit StringId - [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 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 thetemplate_uuid
you set in the server.- bus String
- [Boolean] The bus type of the volume: VIRTIO or IDE.
- cpu
Hot BooleanPlug - [string] Is capable of CPU hot plug (no reboot required)
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- device
Number Double - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- disc
Virtio BooleanHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- disc
Virtio BooleanHot Unplug - [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
- disk
Type String - [string] The volume type: HDD or SSD. This property is immutable.
- image String
- The image or snapshot UUID.
- image
Id String - image
Name 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. - image
Password String - [string] Required if
sshkey_path
is not provided. - licence
Type String - [string] Required if
image_name
is not provided. - name String
- [string] The name of the volume.
- nic
Hot BooleanPlug - [string] Is capable of nic hot plug (no reboot required)
- nic
Hot BooleanUnplug - [string] Is capable of nic hot unplug (no reboot required)
- pci
Slot Double - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- ram
Hot BooleanPlug - [string] Is capable of memory hot plug (no reboot required)
- server
Id String - [string] The ID of a server.
- size Double
- [integer] The size of the volume in GB.
- ssh
Key List<String>Paths - [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 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
Volume
Timeouts - user
Data 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.
- volume
Id String
- availability
Zone string - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- backup
Unit stringId - [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 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 thetemplate_uuid
you set in the server.- bus string
- [Boolean] The bus type of the volume: VIRTIO or IDE.
- cpu
Hot booleanPlug - [string] Is capable of CPU hot plug (no reboot required)
- datacenter
Id string - [string] The ID of a Virtual Data Center.
- device
Number number - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- disc
Virtio booleanHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- disc
Virtio booleanHot Unplug - [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
- disk
Type string - [string] The volume type: HDD or SSD. This property is immutable.
- image string
- The image or snapshot UUID.
- image
Id string - image
Name 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. - image
Password string - [string] Required if
sshkey_path
is not provided. - licence
Type string - [string] Required if
image_name
is not provided. - name string
- [string] The name of the volume.
- nic
Hot booleanPlug - [string] Is capable of nic hot plug (no reboot required)
- nic
Hot booleanUnplug - [string] Is capable of nic hot unplug (no reboot required)
- pci
Slot number - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- ram
Hot booleanPlug - [string] Is capable of memory hot plug (no reboot required)
- server
Id string - [string] The ID of a server.
- size number
- [integer] The size of the volume in GB.
- ssh
Key string[]Paths - [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 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
Volume
Timeouts - user
Data 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.
- volume
Id 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_ strid - [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 thetemplate_uuid
you set in the server.- bus str
- [Boolean] The bus type of the volume: VIRTIO or IDE.
- cpu_
hot_ boolplug - [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_ boolhot_ plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- disc_
virtio_ boolhot_ unplug - [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_ boolplug - [string] Is capable of nic hot plug (no reboot required)
- nic_
hot_ boolunplug - [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_ boolplug - [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_ Sequence[str]paths - [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
Volume
Timeouts Args - 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
- availability
Zone String - [string] The storage availability zone assigned to the volume: AUTO, ZONE_1, ZONE_2, or ZONE_3. This property is immutable
- backup
Unit StringId - [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 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 thetemplate_uuid
you set in the server.- bus String
- [Boolean] The bus type of the volume: VIRTIO or IDE.
- cpu
Hot BooleanPlug - [string] Is capable of CPU hot plug (no reboot required)
- datacenter
Id String - [string] The ID of a Virtual Data Center.
- device
Number Number - The Logical Unit Number of the storage volume. Null for volumes not mounted to any VM.
- disc
Virtio BooleanHot Plug - [string] Is capable of Virt-IO drive hot plug (no reboot required)
- disc
Virtio BooleanHot Unplug - [string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
- disk
Type String - [string] The volume type: HDD or SSD. This property is immutable.
- image String
- The image or snapshot UUID.
- image
Id String - image
Name 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. - image
Password String - [string] Required if
sshkey_path
is not provided. - licence
Type String - [string] Required if
image_name
is not provided. - name String
- [string] The name of the volume.
- nic
Hot BooleanPlug - [string] Is capable of nic hot plug (no reboot required)
- nic
Hot BooleanUnplug - [string] Is capable of nic hot unplug (no reboot required)
- pci
Slot Number - The PCI slot number of the storage volume. Null for volumes not mounted to any VM.
- ram
Hot BooleanPlug - [string] Is capable of memory hot plug (no reboot required)
- server
Id String - [string] The ID of a server.
- size Number
- [integer] The size of the volume in GB.
- ssh
Key List<String>Paths - [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 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
- user
Data 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.
- volume
Id String
Supporting Types
VolumeTimeouts, VolumeTimeoutsArgs
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.