scaleway.InstanceVolume
Explore with Pulumi AI
Creates and manages Scaleway Compute Instance Volumes. For more information, see the documentation.
Example
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-scaleway";
const serverVolume = new scaleway.InstanceVolume("serverVolume", {
sizeInGb: 20,
type: "l_ssd",
});
import pulumi
import lbrlabs_pulumi_scaleway as scaleway
server_volume = scaleway.InstanceVolume("serverVolume",
size_in_gb=20,
type="l_ssd")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
return await Deployment.RunAsync(() =>
{
var serverVolume = new Scaleway.InstanceVolume("serverVolume", new()
{
SizeInGb = 20,
Type = "l_ssd",
});
});
package main
import (
"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.NewInstanceVolume(ctx, "serverVolume", &scaleway.InstanceVolumeArgs{
SizeInGb: pulumi.Int(20),
Type: pulumi.String("l_ssd"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.InstanceVolume;
import com.pulumi.scaleway.InstanceVolumeArgs;
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 InstanceVolume("serverVolume", InstanceVolumeArgs.builder()
.sizeInGb(20)
.type("l_ssd")
.build());
}
}
resources:
serverVolume:
type: scaleway:InstanceVolume
properties:
sizeInGb: 20
type: l_ssd
Create InstanceVolume Resource
new InstanceVolume(name: string, args: InstanceVolumeArgs, opts?: CustomResourceOptions);
@overload
def InstanceVolume(resource_name: str,
opts: Optional[ResourceOptions] = None,
from_snapshot_id: Optional[str] = None,
from_volume_id: Optional[str] = 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)
@overload
def InstanceVolume(resource_name: str,
args: InstanceVolumeArgs,
opts: Optional[ResourceOptions] = 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.
- name string
- The unique name of the resource.
- args InstanceVolumeArgs
- 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 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 string
- The unique name of the resource.
- args InstanceVolumeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceVolumeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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
The InstanceVolume resource accepts the following input properties:
- Type string
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- From
Snapshot stringId Create a volume based on a image
- From
Volume stringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- Name string
The name of the volume. If not provided it will be randomly generated.
- Project
Id string project_id
) The ID of the project the volume is associated with.- Size
In intGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- List<string>
A list of tags to apply to the volume.
- Zone string
zone
) The zone in which the volume should be created.
- Type string
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- From
Snapshot stringId Create a volume based on a image
- From
Volume stringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- Name string
The name of the volume. If not provided it will be randomly generated.
- Project
Id string project_id
) The ID of the project the volume is associated with.- Size
In intGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- []string
A list of tags to apply to the volume.
- Zone string
zone
) The zone in which the volume should be created.
- type String
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- from
Snapshot StringId Create a volume based on a image
- from
Volume StringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- name String
The name of the volume. If not provided it will be randomly generated.
- project
Id String project_id
) The ID of the project the volume is associated with.- size
In IntegerGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- List<String>
A list of tags to apply to the volume.
- zone String
zone
) The zone in which the volume should be created.
- type string
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- from
Snapshot stringId Create a volume based on a image
- from
Volume stringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- name string
The name of the volume. If not provided it will be randomly generated.
- project
Id string project_id
) The ID of the project the volume is associated with.- size
In numberGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- string[]
A list of tags to apply to the volume.
- zone string
zone
) The zone in which the volume should be created.
- type str
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- from_
snapshot_ strid Create a volume based on a image
- from_
volume_ strid If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- name str
The name of the volume. If not provided it will be randomly generated.
- project_
id str project_id
) The ID of the project the volume is associated with.- size_
in_ intgb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- Sequence[str]
A list of tags to apply to the volume.
- zone str
zone
) The zone in which the volume should be created.
- type String
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- from
Snapshot StringId Create a volume based on a image
- from
Volume StringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- name String
The name of the volume. If not provided it will be randomly generated.
- project
Id String project_id
) The ID of the project the volume is associated with.- size
In NumberGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- List<String>
A list of tags to apply to the volume.
- zone 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.
- Organization
Id string The organization ID the volume is associated with.
- Server
Id string The id of the associated server.
- Id string
The provider-assigned unique ID for this managed resource.
- Organization
Id string The organization ID the volume is associated with.
- Server
Id string The id of the associated server.
- id String
The provider-assigned unique ID for this managed resource.
- organization
Id String The organization ID the volume is associated with.
- server
Id String The id of the associated server.
- id string
The provider-assigned unique ID for this managed resource.
- organization
Id string The organization ID the volume is associated with.
- server
Id 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.
- organization
Id String The organization ID the volume is associated with.
- server
Id 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,
from_volume_id: Optional[str] = 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)
Resource lookup is not supported in YAML
- 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.
- From
Snapshot stringId Create a volume based on a image
- From
Volume stringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- Name string
The name of the volume. If not provided it will be randomly generated.
- Organization
Id string The organization ID the volume is associated with.
- Project
Id string project_id
) The ID of the project the volume is associated with.- Server
Id string The id of the associated server.
- Size
In intGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- List<string>
A list of tags to apply to the volume.
- Type string
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- Zone string
zone
) The zone in which the volume should be created.
- From
Snapshot stringId Create a volume based on a image
- From
Volume stringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- Name string
The name of the volume. If not provided it will be randomly generated.
- Organization
Id string The organization ID the volume is associated with.
- Project
Id string project_id
) The ID of the project the volume is associated with.- Server
Id string The id of the associated server.
- Size
In intGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- []string
A list of tags to apply to the volume.
- Type string
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- Zone string
zone
) The zone in which the volume should be created.
- from
Snapshot StringId Create a volume based on a image
- from
Volume StringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- name String
The name of the volume. If not provided it will be randomly generated.
- organization
Id String The organization ID the volume is associated with.
- project
Id String project_id
) The ID of the project the volume is associated with.- server
Id String The id of the associated server.
- size
In IntegerGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- List<String>
A list of tags to apply to the volume.
- type String
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- zone String
zone
) The zone in which the volume should be created.
- from
Snapshot stringId Create a volume based on a image
- from
Volume stringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- name string
The name of the volume. If not provided it will be randomly generated.
- organization
Id string The organization ID the volume is associated with.
- project
Id string project_id
) The ID of the project the volume is associated with.- server
Id string The id of the associated server.
- size
In numberGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- string[]
A list of tags to apply to the volume.
- type string
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- zone string
zone
) The zone in which the volume should be created.
- from_
snapshot_ strid Create a volume based on a image
- from_
volume_ strid If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- 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 str project_id
) The ID of the project the volume is associated with.- server_
id str The id of the associated server.
- size_
in_ intgb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- Sequence[str]
A list of tags to apply to the volume.
- type str
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- zone str
zone
) The zone in which the volume should be created.
- from
Snapshot StringId Create a volume based on a image
- from
Volume StringId If set, the new volume will be copied from this volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- name String
The name of the volume. If not provided it will be randomly generated.
- organization
Id String The organization ID the volume is associated with.
- project
Id String project_id
) The ID of the project the volume is associated with.- server
Id String The id of the associated server.
- size
In NumberGb The size of the volume. Only one of
size_in_gb
,from_volume_id
andfrom_snapshot_id
should be specified.- List<String>
A list of tags to apply to the volume.
- type String
The type of the volume. The possible values are:
b_ssd
(Block SSD),l_ssd
(Local SSD).- zone 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
Package Details
- Repository
- scaleway lbrlabs/pulumi-scaleway
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
scaleway
Terraform Provider.