1. Packages
  2. Genesis Cloud
  3. API Docs
  4. Volume
Genesis Cloud v0.0.33 published on Thursday, Feb 27, 2025 by Genesiscloud

genesiscloud.Volume

Explore with Pulumi AI

Volume resource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as genesiscloud from "@genesiscloud/pulumi-genesiscloud";

const example = new genesiscloud.Volume("example", {
    region: "NORD-NO-KRS-1",
    size: 50,
    type: "hdd",
});
Copy
import pulumi
import pulumi_genesiscloud as genesiscloud

example = genesiscloud.Volume("example",
    region="NORD-NO-KRS-1",
    size=50,
    type="hdd")
Copy
package main

import (
	"github.com/genesiscloud/pulumi-genesiscloud/sdk/go/genesiscloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := genesiscloud.NewVolume(ctx, "example", &genesiscloud.VolumeArgs{
			Region: pulumi.String("NORD-NO-KRS-1"),
			Size:   pulumi.Int(50),
			Type:   pulumi.String("hdd"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Genesiscloud = GenesisCloud.PulumiPackage.Genesiscloud;

return await Deployment.RunAsync(() => 
{
    var example = new Genesiscloud.Volume("example", new()
    {
        Region = "NORD-NO-KRS-1",
        Size = 50,
        Type = "hdd",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.genesiscloud.Volume;
import com.pulumi.genesiscloud.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 example = new Volume("example", VolumeArgs.builder()
            .region("NORD-NO-KRS-1")
            .size(50)
            .type("hdd")
            .build());

    }
}
Copy
resources:
  example:
    type: genesiscloud:Volume
    properties:
      region: NORD-NO-KRS-1
      size: 50
      type: hdd
Copy

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,
           region: Optional[str] = None,
           size: Optional[int] = None,
           type: Optional[str] = None,
           description: Optional[str] = None,
           name: Optional[str] = None,
           retain_on_delete: Optional[bool] = None,
           timeouts: Optional[VolumeTimeoutsArgs] = 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: genesiscloud:Volume
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. VolumeArgs
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. 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 This property is required. string
The unique name of the resource.
args This property is required. VolumeArgs
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. VolumeArgs
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. 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 Genesiscloud.Volume("volumeResource", new()
{
    Region = "string",
    Size = 0,
    Type = "string",
    Description = "string",
    Name = "string",
    RetainOnDelete = false,
    Timeouts = new Genesiscloud.Inputs.VolumeTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Read = "string",
        Update = "string",
    },
});
Copy
example, err := genesiscloud.NewVolume(ctx, "volumeResource", &genesiscloud.VolumeArgs{
	Region:         pulumi.String("string"),
	Size:           pulumi.Int(0),
	Type:           pulumi.String("string"),
	Description:    pulumi.String("string"),
	Name:           pulumi.String("string"),
	RetainOnDelete: pulumi.Bool(false),
	Timeouts: &genesiscloud.VolumeTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Read:   pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
    .region("string")
    .size(0)
    .type("string")
    .description("string")
    .name("string")
    .retainOnDelete(false)
    .timeouts(VolumeTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .read("string")
        .update("string")
        .build())
    .build());
Copy
volume_resource = genesiscloud.Volume("volumeResource",
    region="string",
    size=0,
    type="string",
    description="string",
    name="string",
    retain_on_delete=False,
    timeouts={
        "create": "string",
        "delete": "string",
        "read": "string",
        "update": "string",
    })
Copy
const volumeResource = new genesiscloud.Volume("volumeResource", {
    region: "string",
    size: 0,
    type: "string",
    description: "string",
    name: "string",
    retainOnDelete: false,
    timeouts: {
        create: "string",
        "delete": "string",
        read: "string",
        update: "string",
    },
});
Copy
type: genesiscloud:Volume
properties:
    description: string
    name: string
    region: string
    retainOnDelete: false
    size: 0
    timeouts:
        create: string
        delete: string
        read: string
        update: string
    type: string
Copy

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:

Region This property is required. string
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
Size This property is required. int
The storage size of this volume given in GiB. - The value must be at least 1.
Type This property is required. string
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
Description string
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
Name string
The human-readable name for the volume.
RetainOnDelete bool
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
Timeouts GenesisCloud.PulumiPackage.Genesiscloud.Inputs.VolumeTimeouts
Region This property is required. string
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
Size This property is required. int
The storage size of this volume given in GiB. - The value must be at least 1.
Type This property is required. string
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
Description string
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
Name string
The human-readable name for the volume.
RetainOnDelete bool
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
Timeouts VolumeTimeoutsArgs
region This property is required. String
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
size This property is required. Integer
The storage size of this volume given in GiB. - The value must be at least 1.
type This property is required. String
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
description String
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
name String
The human-readable name for the volume.
retainOnDelete Boolean
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
timeouts VolumeTimeouts
region This property is required. string
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
size This property is required. number
The storage size of this volume given in GiB. - The value must be at least 1.
type This property is required. string
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
description string
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
name string
The human-readable name for the volume.
retainOnDelete boolean
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
timeouts VolumeTimeouts
region This property is required. str
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
size This property is required. int
The storage size of this volume given in GiB. - The value must be at least 1.
type This property is required. str
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
description str
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
name str
The human-readable name for the volume.
retain_on_delete bool
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
timeouts VolumeTimeoutsArgs
region This property is required. String
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
size This property is required. Number
The storage size of this volume given in GiB. - The value must be at least 1.
type This property is required. String
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
description String
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
name String
The human-readable name for the volume.
retainOnDelete Boolean
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
timeouts Property Map

Outputs

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

CreatedAt string
The timestamp when this volume was created in RFC 3339.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The volume status.
CreatedAt string
The timestamp when this volume was created in RFC 3339.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The volume status.
createdAt String
The timestamp when this volume was created in RFC 3339.
id String
The provider-assigned unique ID for this managed resource.
status String
The volume status.
createdAt string
The timestamp when this volume was created in RFC 3339.
id string
The provider-assigned unique ID for this managed resource.
status string
The volume status.
created_at str
The timestamp when this volume was created in RFC 3339.
id str
The provider-assigned unique ID for this managed resource.
status str
The volume status.
createdAt String
The timestamp when this volume was created in RFC 3339.
id String
The provider-assigned unique ID for this managed resource.
status String
The volume status.

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,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        region: Optional[str] = None,
        retain_on_delete: Optional[bool] = None,
        size: Optional[int] = None,
        status: Optional[str] = None,
        timeouts: Optional[VolumeTimeoutsArgs] = None,
        type: 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: genesiscloud:Volume    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:
CreatedAt string
The timestamp when this volume was created in RFC 3339.
Description string
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
Name string
The human-readable name for the volume.
Region string
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
RetainOnDelete bool
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
Size int
The storage size of this volume given in GiB. - The value must be at least 1.
Status string
The volume status.
Timeouts GenesisCloud.PulumiPackage.Genesiscloud.Inputs.VolumeTimeouts
Type string
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
CreatedAt string
The timestamp when this volume was created in RFC 3339.
Description string
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
Name string
The human-readable name for the volume.
Region string
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
RetainOnDelete bool
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
Size int
The storage size of this volume given in GiB. - The value must be at least 1.
Status string
The volume status.
Timeouts VolumeTimeoutsArgs
Type string
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
createdAt String
The timestamp when this volume was created in RFC 3339.
description String
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
name String
The human-readable name for the volume.
region String
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
retainOnDelete Boolean
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
size Integer
The storage size of this volume given in GiB. - The value must be at least 1.
status String
The volume status.
timeouts VolumeTimeouts
type String
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
createdAt string
The timestamp when this volume was created in RFC 3339.
description string
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
name string
The human-readable name for the volume.
region string
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
retainOnDelete boolean
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
size number
The storage size of this volume given in GiB. - The value must be at least 1.
status string
The volume status.
timeouts VolumeTimeouts
type string
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
created_at str
The timestamp when this volume was created in RFC 3339.
description str
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
name str
The human-readable name for the volume.
region str
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
retain_on_delete bool
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
size int
The storage size of this volume given in GiB. - The value must be at least 1.
status str
The volume status.
timeouts VolumeTimeoutsArgs
type str
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].
createdAt String
The timestamp when this volume was created in RFC 3339.
description String
The human-readable description for the volume. - Sets the default value "" if the attribute is not set.
name String
The human-readable name for the volume.
region String
The region identifier. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["EUC-DE-MUC-1" "NORD-NO-KRS-1"].
retainOnDelete Boolean
Flag to retain the volume when the resource is deleted - Sets the default value "false" if the attribute is not set.
size Number
The storage size of this volume given in GiB. - The value must be at least 1.
status String
The volume status.
timeouts Property Map
type String
The storage type of the volume. - If the value of this attribute changes, the resource will be replaced. - The value must be one of: ["hdd" "ssd"].

Supporting Types

VolumeTimeouts
, VolumeTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

$ pulumi import genesiscloud:index/volume:Volume example 18efeec8-94f0-4776-8ff2-5e9b49c74608
Copy

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

Package Details

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