1. Packages
  2. Vultr
  3. API Docs
  4. BlockStorage
Vultr v2.15.1 published on Friday, May 19, 2023 by dirien

vultr.BlockStorage

Explore with Pulumi AI

vultr logo
Vultr v2.15.1 published on Friday, May 19, 2023 by dirien

    Provides a Vultr Block Storage resource. This can be used to create, read, modify, and delete Block Storage.

    Example Usage

    Create a new Block Storage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = ediri.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var myBlockstorage = new Vultr.BlockStorage("myBlockstorage", new()
        {
            Region = "ewr",
            SizeGb = 10,
        });
    
    });
    
    package main
    
    import (
    	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vultr.NewBlockStorage(ctx, "myBlockstorage", &vultr.BlockStorageArgs{
    			Region: pulumi.String("ewr"),
    			SizeGb: pulumi.Int(10),
    		})
    		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.vultr.BlockStorage;
    import com.pulumi.vultr.BlockStorageArgs;
    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 myBlockstorage = new BlockStorage("myBlockstorage", BlockStorageArgs.builder()        
                .region("ewr")
                .sizeGb(10)
                .build());
    
        }
    }
    
    import pulumi
    import ediri_vultr as vultr
    
    my_blockstorage = vultr.BlockStorage("myBlockstorage",
        region="ewr",
        size_gb=10)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@ediri/vultr";
    
    const myBlockstorage = new vultr.BlockStorage("myBlockstorage", {
        region: "ewr",
        sizeGb: 10,
    });
    
    resources:
      myBlockstorage:
        type: vultr:BlockStorage
        properties:
          region: ewr
          sizeGb: 10
    

    Create BlockStorage Resource

    new BlockStorage(name: string, args: BlockStorageArgs, opts?: CustomResourceOptions);
    @overload
    def BlockStorage(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     attached_to_instance: Optional[str] = None,
                     block_type: Optional[str] = None,
                     label: Optional[str] = None,
                     live: Optional[bool] = None,
                     region: Optional[str] = None,
                     size_gb: Optional[int] = None)
    @overload
    def BlockStorage(resource_name: str,
                     args: BlockStorageArgs,
                     opts: Optional[ResourceOptions] = None)
    func NewBlockStorage(ctx *Context, name string, args BlockStorageArgs, opts ...ResourceOption) (*BlockStorage, error)
    public BlockStorage(string name, BlockStorageArgs args, CustomResourceOptions? opts = null)
    public BlockStorage(String name, BlockStorageArgs args)
    public BlockStorage(String name, BlockStorageArgs args, CustomResourceOptions options)
    
    type: vultr:BlockStorage
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args BlockStorageArgs
    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 BlockStorageArgs
    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 BlockStorageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BlockStorageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BlockStorageArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Region string

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    SizeGb int

    The size of the given block storage.

    AttachedToInstance string

    VPS ID that you want to have this block storage attached to.

    BlockType string

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    Label string

    Label that is given to your block storage.

    Live bool

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    Region string

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    SizeGb int

    The size of the given block storage.

    AttachedToInstance string

    VPS ID that you want to have this block storage attached to.

    BlockType string

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    Label string

    Label that is given to your block storage.

    Live bool

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    region String

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    sizeGb Integer

    The size of the given block storage.

    attachedToInstance String

    VPS ID that you want to have this block storage attached to.

    blockType String

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    label String

    Label that is given to your block storage.

    live Boolean

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    region string

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    sizeGb number

    The size of the given block storage.

    attachedToInstance string

    VPS ID that you want to have this block storage attached to.

    blockType string

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    label string

    Label that is given to your block storage.

    live boolean

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    region str

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    size_gb int

    The size of the given block storage.

    attached_to_instance str

    VPS ID that you want to have this block storage attached to.

    block_type str

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    label str

    Label that is given to your block storage.

    live bool

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    region String

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    sizeGb Number

    The size of the given block storage.

    attachedToInstance String

    VPS ID that you want to have this block storage attached to.

    blockType String

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    label String

    Label that is given to your block storage.

    live Boolean

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    Outputs

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

    Cost double

    The monthly cost of this block storage.

    DateCreated string

    The date this block storage was created.

    Id string

    The provider-assigned unique ID for this managed resource.

    MountId string

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    Status string

    Current status of your block storage.

    Cost float64

    The monthly cost of this block storage.

    DateCreated string

    The date this block storage was created.

    Id string

    The provider-assigned unique ID for this managed resource.

    MountId string

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    Status string

    Current status of your block storage.

    cost Double

    The monthly cost of this block storage.

    dateCreated String

    The date this block storage was created.

    id String

    The provider-assigned unique ID for this managed resource.

    mountId String

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    status String

    Current status of your block storage.

    cost number

    The monthly cost of this block storage.

    dateCreated string

    The date this block storage was created.

    id string

    The provider-assigned unique ID for this managed resource.

    mountId string

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    status string

    Current status of your block storage.

    cost float

    The monthly cost of this block storage.

    date_created str

    The date this block storage was created.

    id str

    The provider-assigned unique ID for this managed resource.

    mount_id str

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    status str

    Current status of your block storage.

    cost Number

    The monthly cost of this block storage.

    dateCreated String

    The date this block storage was created.

    id String

    The provider-assigned unique ID for this managed resource.

    mountId String

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    status String

    Current status of your block storage.

    Look up Existing BlockStorage Resource

    Get an existing BlockStorage 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?: BlockStorageState, opts?: CustomResourceOptions): BlockStorage
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            attached_to_instance: Optional[str] = None,
            block_type: Optional[str] = None,
            cost: Optional[float] = None,
            date_created: Optional[str] = None,
            label: Optional[str] = None,
            live: Optional[bool] = None,
            mount_id: Optional[str] = None,
            region: Optional[str] = None,
            size_gb: Optional[int] = None,
            status: Optional[str] = None) -> BlockStorage
    func GetBlockStorage(ctx *Context, name string, id IDInput, state *BlockStorageState, opts ...ResourceOption) (*BlockStorage, error)
    public static BlockStorage Get(string name, Input<string> id, BlockStorageState? state, CustomResourceOptions? opts = null)
    public static BlockStorage get(String name, Output<String> id, BlockStorageState 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:
    AttachedToInstance string

    VPS ID that you want to have this block storage attached to.

    BlockType string

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    Cost double

    The monthly cost of this block storage.

    DateCreated string

    The date this block storage was created.

    Label string

    Label that is given to your block storage.

    Live bool

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    MountId string

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    Region string

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    SizeGb int

    The size of the given block storage.

    Status string

    Current status of your block storage.

    AttachedToInstance string

    VPS ID that you want to have this block storage attached to.

    BlockType string

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    Cost float64

    The monthly cost of this block storage.

    DateCreated string

    The date this block storage was created.

    Label string

    Label that is given to your block storage.

    Live bool

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    MountId string

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    Region string

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    SizeGb int

    The size of the given block storage.

    Status string

    Current status of your block storage.

    attachedToInstance String

    VPS ID that you want to have this block storage attached to.

    blockType String

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    cost Double

    The monthly cost of this block storage.

    dateCreated String

    The date this block storage was created.

    label String

    Label that is given to your block storage.

    live Boolean

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    mountId String

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    region String

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    sizeGb Integer

    The size of the given block storage.

    status String

    Current status of your block storage.

    attachedToInstance string

    VPS ID that you want to have this block storage attached to.

    blockType string

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    cost number

    The monthly cost of this block storage.

    dateCreated string

    The date this block storage was created.

    label string

    Label that is given to your block storage.

    live boolean

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    mountId string

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    region string

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    sizeGb number

    The size of the given block storage.

    status string

    Current status of your block storage.

    attached_to_instance str

    VPS ID that you want to have this block storage attached to.

    block_type str

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    cost float

    The monthly cost of this block storage.

    date_created str

    The date this block storage was created.

    label str

    Label that is given to your block storage.

    live bool

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    mount_id str

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    region str

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    size_gb int

    The size of the given block storage.

    status str

    Current status of your block storage.

    attachedToInstance String

    VPS ID that you want to have this block storage attached to.

    blockType String

    Determines on the type of block storage volume that will be created. Soon to become a required parameter. Options are high_perf or storage_opt.

    cost Number

    The monthly cost of this block storage.

    dateCreated String

    The date this block storage was created.

    label String

    Label that is given to your block storage.

    live Boolean

    Boolean value that will allow attachment of the volume to an instance without a restart. Default is false.

    mountId String

    An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.

    region String

    Region in which this block storage will reside in. (Currently only NJ/NY supported region "ewr")

    sizeGb Number

    The size of the given block storage.

    status String

    Current status of your block storage.

    Import

    Block Storage can be imported using the Block Storage ID, e.g.

     $ pulumi import vultr:index/blockStorage:BlockStorage my_blockstorage e315835e-d466-4e89-9b4c-dfd8788d7685
    

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the vultr Terraform Provider.

    vultr logo
    Vultr v2.15.1 published on Friday, May 19, 2023 by dirien