1. Packages
  2. Scaleway
  3. API Docs
  4. InstanceVolume
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

scaleway.InstanceVolume

Explore with Pulumi AI

scaleway logo
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

    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).

    FromSnapshotId string

    Create a volume based on a image

    FromVolumeId string

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    Name string

    The name of the volume. If not provided it will be randomly generated.

    ProjectId 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, from_volume_id and from_snapshot_id should be specified.

    Tags 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).

    FromSnapshotId string

    Create a volume based on a image

    FromVolumeId string

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    Name string

    The name of the volume. If not provided it will be randomly generated.

    ProjectId 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, from_volume_id and from_snapshot_id should be specified.

    Tags []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).

    fromSnapshotId String

    Create a volume based on a image

    fromVolumeId String

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    name String

    The name of the volume. If not provided it will be randomly generated.

    projectId 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, from_volume_id and from_snapshot_id should be specified.

    tags 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).

    fromSnapshotId string

    Create a volume based on a image

    fromVolumeId string

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    name string

    The name of the volume. If not provided it will be randomly generated.

    projectId 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, from_volume_id and from_snapshot_id should be specified.

    tags 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_id str

    Create a volume based on a image

    from_volume_id str

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_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_gb int

    The size of the volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    tags 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).

    fromSnapshotId String

    Create a volume based on a image

    fromVolumeId String

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    name String

    The name of the volume. If not provided it will be randomly generated.

    projectId 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, from_volume_id and from_snapshot_id should be specified.

    tags 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.

    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,
            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.
    The following state arguments are supported:
    FromSnapshotId string

    Create a volume based on a image

    FromVolumeId string

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    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 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, from_volume_id and from_snapshot_id should be specified.

    Tags 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.

    FromSnapshotId string

    Create a volume based on a image

    FromVolumeId string

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    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 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, from_volume_id and from_snapshot_id should be specified.

    Tags []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.

    fromSnapshotId String

    Create a volume based on a image

    fromVolumeId String

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    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 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, from_volume_id and from_snapshot_id should be specified.

    tags 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.

    fromSnapshotId string

    Create a volume based on a image

    fromVolumeId string

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    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 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, from_volume_id and from_snapshot_id should be specified.

    tags 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_id str

    Create a volume based on a image

    from_volume_id str

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_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_gb int

    The size of the volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    tags 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.

    fromSnapshotId String

    Create a volume based on a image

    fromVolumeId String

    If set, the new volume will be copied from this volume. Only one of size_in_gb, from_volume_id and from_snapshot_id should be specified.

    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 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, from_volume_id and from_snapshot_id should be specified.

    tags 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.

    scaleway logo
    Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs