The Automation API is now available. No CLI. No human-in-the-loop. Just your code. Learn More

Volume

Provides a Civo volume which can be attached to a Instance in order to provide expanded storage.

Example Usage

using Pulumi;
using Civo = Pulumi.Civo;

class MyStack : Stack
{
    public MyStack()
    {
        var db = new Civo.Volume("db", new Civo.VolumeArgs
        {
            Bootable = false,
            SizeGb = 60,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-civo/sdk/go/civo"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := civo.NewVolume(ctx, "db", &civo.VolumeArgs{
            Bootable: pulumi.Bool(false),
            SizeGb:   pulumi.Int(60),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_civo as civo

db = civo.Volume("db",
    bootable=False,
    size_gb=60)
import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";

const db = new civo.Volume("db", {
    bootable: false,
    sizeGb: 60,
});

Create a Volume Resource

new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
def Volume(resource_name: str, opts: Optional[ResourceOptions] = None, bootable: Optional[bool] = None, name: Optional[str] = None, size_gb: Optional[int] = None)
func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
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.
opts ResourceOptions
A bag of options that control this 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.

Volume Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Volume resource accepts the following input properties:

Bootable bool

Mark the volume as bootable.

SizeGb int

A minimum of 1 and a maximum of your available disk space from your quota specifies the size of the volume in gigabytes .

Name string

A name that you wish to use to refer to this volume .

Bootable bool

Mark the volume as bootable.

SizeGb int

A minimum of 1 and a maximum of your available disk space from your quota specifies the size of the volume in gigabytes .

Name string

A name that you wish to use to refer to this volume .

bootable boolean

Mark the volume as bootable.

sizeGb number

A minimum of 1 and a maximum of your available disk space from your quota specifies the size of the volume in gigabytes .

name string

A name that you wish to use to refer to this volume .

bootable bool

Mark the volume as bootable.

size_gb int

A minimum of 1 and a maximum of your available disk space from your quota specifies the size of the volume in gigabytes .

name str

A name that you wish to use to refer to this volume .

Outputs

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

CreatedAt string

The date of the creation of the volume.

Id string
The provider-assigned unique ID for this managed resource.
MountPoint string

The mount point of the volume.

CreatedAt string

The date of the creation of the volume.

Id string
The provider-assigned unique ID for this managed resource.
MountPoint string

The mount point of the volume.

createdAt string

The date of the creation of the volume.

id string
The provider-assigned unique ID for this managed resource.
mountPoint string

The mount point of the volume.

created_at str

The date of the creation of the volume.

id str
The provider-assigned unique ID for this managed resource.
mount_point str

The mount point of the volume.

Look up an 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, bootable: Optional[bool] = None, created_at: Optional[str] = None, mount_point: Optional[str] = None, name: Optional[str] = None, size_gb: Optional[int] = 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)
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.

The following state arguments are supported:

Bootable bool

Mark the volume as bootable.

CreatedAt string

The date of the creation of the volume.

MountPoint string

The mount point of the volume.

Name string

A name that you wish to use to refer to this volume .

SizeGb int

A minimum of 1 and a maximum of your available disk space from your quota specifies the size of the volume in gigabytes .

Bootable bool

Mark the volume as bootable.

CreatedAt string

The date of the creation of the volume.

MountPoint string

The mount point of the volume.

Name string

A name that you wish to use to refer to this volume .

SizeGb int

A minimum of 1 and a maximum of your available disk space from your quota specifies the size of the volume in gigabytes .

bootable boolean

Mark the volume as bootable.

createdAt string

The date of the creation of the volume.

mountPoint string

The mount point of the volume.

name string

A name that you wish to use to refer to this volume .

sizeGb number

A minimum of 1 and a maximum of your available disk space from your quota specifies the size of the volume in gigabytes .

bootable bool

Mark the volume as bootable.

created_at str

The date of the creation of the volume.

mount_point str

The mount point of the volume.

name str

A name that you wish to use to refer to this volume .

size_gb int

A minimum of 1 and a maximum of your available disk space from your quota specifies the size of the volume in gigabytes .

Package Details

Repository
https://github.com/pulumi/pulumi-civo
License
Apache-2.0
Notes
This Pulumi package is based on the civo Terraform Provider.