1. Packages
  2. Scaleway
  3. API Docs
  4. InstanceVolume
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.InstanceVolume

Explore with Pulumi AI

Deprecated: scaleway.index/instancevolume.InstanceVolume has been deprecated in favor of scaleway.instance/volume.Volume

Creates and manages Scaleway compute Instance Volumes. For more information, see the API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const serverVolume = new scaleway.instance.Volume("server_volume", {
    type: "l_ssd",
    name: "some-volume-name",
    sizeInGb: 20,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

server_volume = scaleway.instance.Volume("server_volume",
    type="l_ssd",
    name="some-volume-name",
    size_in_gb=20)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/instance"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := instance.NewVolume(ctx, "server_volume", &instance.VolumeArgs{
			Type:     pulumi.String("l_ssd"),
			Name:     pulumi.String("some-volume-name"),
			SizeInGb: pulumi.Int(20),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var serverVolume = new Scaleway.Instance.Volume("server_volume", new()
    {
        Type = "l_ssd",
        Name = "some-volume-name",
        SizeInGb = 20,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.instance.Volume;
import com.pulumi.scaleway.instance.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) {
        var serverVolume = new Volume("serverVolume", VolumeArgs.builder()
            .type("l_ssd")
            .name("some-volume-name")
            .sizeInGb(20)
            .build());

    }
}
Copy
resources:
  serverVolume:
    type: scaleway:instance:Volume
    name: server_volume
    properties:
      type: l_ssd
      name: some-volume-name
      sizeInGb: 20
Copy

Create InstanceVolume Resource

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

Constructor syntax

new InstanceVolume(name: string, args: InstanceVolumeArgs, opts?: CustomResourceOptions);
@overload
def InstanceVolume(resource_name: str,
                   args: InstanceVolumeArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def InstanceVolume(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   from_snapshot_id: Optional[str] = None,
                   migrate_to_sbs: Optional[bool] = None,
                   name: Optional[str] = None,
                   project_id: Optional[str] = None,
                   size_in_gb: Optional[int] = None,
                   tags: Optional[Sequence[str]] = None,
                   type: Optional[str] = None,
                   zone: Optional[str] = None)
func NewInstanceVolume(ctx *Context, name string, args InstanceVolumeArgs, opts ...ResourceOption) (*InstanceVolume, error)
public InstanceVolume(string name, InstanceVolumeArgs args, CustomResourceOptions? opts = null)
public InstanceVolume(String name, InstanceVolumeArgs args)
public InstanceVolume(String name, InstanceVolumeArgs args, CustomResourceOptions options)
type: scaleway:InstanceVolume
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. InstanceVolumeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. InstanceVolumeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceVolumeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceVolumeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. InstanceVolumeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Type
This property is required.
Changes to this property will trigger replacement.
string
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
FromSnapshotId Changes to this property will trigger replacement. string
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
MigrateToSbs bool
If true, consider that this volume may have been migrated and no longer exists.
Name string
The name of the volume. If not provided it will be randomly generated.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the volume is associated with.
SizeInGb int
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
Tags List<string>
A list of tags to apply to the volume.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the volume should be created.
Type
This property is required.
Changes to this property will trigger replacement.
string
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
FromSnapshotId Changes to this property will trigger replacement. string
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
MigrateToSbs bool
If true, consider that this volume may have been migrated and no longer exists.
Name string
The name of the volume. If not provided it will be randomly generated.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the volume is associated with.
SizeInGb int
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
Tags []string
A list of tags to apply to the volume.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the volume should be created.
type
This property is required.
Changes to this property will trigger replacement.
String
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
fromSnapshotId Changes to this property will trigger replacement. String
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
migrateToSbs Boolean
If true, consider that this volume may have been migrated and no longer exists.
name String
The name of the volume. If not provided it will be randomly generated.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the volume is associated with.
sizeInGb Integer
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
tags List<String>
A list of tags to apply to the volume.
zone Changes to this property will trigger replacement. String
zone) The zone in which the volume should be created.
type
This property is required.
Changes to this property will trigger replacement.
string
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
fromSnapshotId Changes to this property will trigger replacement. string
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
migrateToSbs boolean
If true, consider that this volume may have been migrated and no longer exists.
name string
The name of the volume. If not provided it will be randomly generated.
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project the volume is associated with.
sizeInGb number
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
tags string[]
A list of tags to apply to the volume.
zone Changes to this property will trigger replacement. string
zone) The zone in which the volume should be created.
type
This property is required.
Changes to this property will trigger replacement.
str
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
from_snapshot_id Changes to this property will trigger replacement. str
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
migrate_to_sbs bool
If true, consider that this volume may have been migrated and no longer exists.
name str
The name of the volume. If not provided it will be randomly generated.
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project the volume is associated with.
size_in_gb int
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
tags Sequence[str]
A list of tags to apply to the volume.
zone Changes to this property will trigger replacement. str
zone) The zone in which the volume should be created.
type
This property is required.
Changes to this property will trigger replacement.
String
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
fromSnapshotId Changes to this property will trigger replacement. String
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
migrateToSbs Boolean
If true, consider that this volume may have been migrated and no longer exists.
name String
The name of the volume. If not provided it will be randomly generated.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the volume is associated with.
sizeInGb Number
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
tags List<String>
A list of tags to apply to the volume.
zone Changes to this property will trigger replacement. String
zone) The zone in which the volume should be created.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
OrganizationId string
The organization ID the volume is associated with.
ServerId string
The id of the associated server.
Id string
The provider-assigned unique ID for this managed resource.
OrganizationId string
The organization ID the volume is associated with.
ServerId string
The id of the associated server.
id String
The provider-assigned unique ID for this managed resource.
organizationId String
The organization ID the volume is associated with.
serverId String
The id of the associated server.
id string
The provider-assigned unique ID for this managed resource.
organizationId string
The organization ID the volume is associated with.
serverId string
The id of the associated server.
id str
The provider-assigned unique ID for this managed resource.
organization_id str
The organization ID the volume is associated with.
server_id str
The id of the associated server.
id String
The provider-assigned unique ID for this managed resource.
organizationId String
The organization ID the volume is associated with.
serverId String
The id of the associated server.

Look up Existing InstanceVolume Resource

Get an existing InstanceVolume 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?: InstanceVolumeState, opts?: CustomResourceOptions): InstanceVolume
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        from_snapshot_id: Optional[str] = None,
        migrate_to_sbs: Optional[bool] = None,
        name: Optional[str] = None,
        organization_id: Optional[str] = None,
        project_id: Optional[str] = None,
        server_id: Optional[str] = None,
        size_in_gb: Optional[int] = None,
        tags: Optional[Sequence[str]] = None,
        type: Optional[str] = None,
        zone: Optional[str] = None) -> InstanceVolume
func GetInstanceVolume(ctx *Context, name string, id IDInput, state *InstanceVolumeState, opts ...ResourceOption) (*InstanceVolume, error)
public static InstanceVolume Get(string name, Input<string> id, InstanceVolumeState? state, CustomResourceOptions? opts = null)
public static InstanceVolume get(String name, Output<String> id, InstanceVolumeState state, CustomResourceOptions options)
resources:  _:    type: scaleway:InstanceVolume    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
FromSnapshotId Changes to this property will trigger replacement. string
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
MigrateToSbs bool
If true, consider that this volume may have been migrated and no longer exists.
Name string
The name of the volume. If not provided it will be randomly generated.
OrganizationId string
The organization ID the volume is associated with.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the volume is associated with.
ServerId string
The id of the associated server.
SizeInGb int
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
Tags List<string>
A list of tags to apply to the volume.
Type Changes to this property will trigger replacement. string
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
Zone Changes to this property will trigger replacement. string
zone) The zone in which the volume should be created.
FromSnapshotId Changes to this property will trigger replacement. string
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
MigrateToSbs bool
If true, consider that this volume may have been migrated and no longer exists.
Name string
The name of the volume. If not provided it will be randomly generated.
OrganizationId string
The organization ID the volume is associated with.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the volume is associated with.
ServerId string
The id of the associated server.
SizeInGb int
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
Tags []string
A list of tags to apply to the volume.
Type Changes to this property will trigger replacement. string
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
Zone Changes to this property will trigger replacement. string
zone) The zone in which the volume should be created.
fromSnapshotId Changes to this property will trigger replacement. String
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
migrateToSbs Boolean
If true, consider that this volume may have been migrated and no longer exists.
name String
The name of the volume. If not provided it will be randomly generated.
organizationId String
The organization ID the volume is associated with.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the volume is associated with.
serverId String
The id of the associated server.
sizeInGb Integer
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
tags List<String>
A list of tags to apply to the volume.
type Changes to this property will trigger replacement. String
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
zone Changes to this property will trigger replacement. String
zone) The zone in which the volume should be created.
fromSnapshotId Changes to this property will trigger replacement. string
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
migrateToSbs boolean
If true, consider that this volume may have been migrated and no longer exists.
name string
The name of the volume. If not provided it will be randomly generated.
organizationId string
The organization ID the volume is associated with.
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project the volume is associated with.
serverId string
The id of the associated server.
sizeInGb number
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
tags string[]
A list of tags to apply to the volume.
type Changes to this property will trigger replacement. string
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
zone Changes to this property will trigger replacement. string
zone) The zone in which the volume should be created.
from_snapshot_id Changes to this property will trigger replacement. str
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
migrate_to_sbs bool
If true, consider that this volume may have been migrated and no longer exists.
name str
The name of the volume. If not provided it will be randomly generated.
organization_id str
The organization ID the volume is associated with.
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project the volume is associated with.
server_id str
The id of the associated server.
size_in_gb int
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
tags Sequence[str]
A list of tags to apply to the volume.
type Changes to this property will trigger replacement. str
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
zone Changes to this property will trigger replacement. str
zone) The zone in which the volume should be created.
fromSnapshotId Changes to this property will trigger replacement. String
If set, the new volume will be created from this snapshot. Only one of size_in_gb and from_snapshot_id should be specified.
migrateToSbs Boolean
If true, consider that this volume may have been migrated and no longer exists.
name String
The name of the volume. If not provided it will be randomly generated.
organizationId String
The organization ID the volume is associated with.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the volume is associated with.
serverId String
The id of the associated server.
sizeInGb Number
The size of the volume. Only one of size_in_gb and from_snapshot_id should be specified.
tags List<String>
A list of tags to apply to the volume.
type Changes to this property will trigger replacement. String
The type of the volume. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD), scratch (Local Scratch SSD).
zone Changes to this property will trigger replacement. String
zone) The zone in which the volume should be created.

Import

volumes can be imported using the {zone}/{id}, e.g.

bash

$ pulumi import scaleway:index/instanceVolume:InstanceVolume server_volume fr-par-1/11111111-1111-1111-1111-111111111111
Copy

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

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.