1. Packages
  2. OpenStack
  3. API Docs
  4. blockstorage
  5. VolumeTypeV3
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

openstack.blockstorage.VolumeTypeV3

Explore with Pulumi AI

openstack logo
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

    Manages a V3 block storage volume type resource within OpenStack.

    Note: This usually requires admin privileges.

    Example Usage

    Basic Volume Type

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const volumeType1 = new openstack.blockstorage.VolumeTypeV3("volume_type_1", {
        name: "volume_type_1",
        description: "Volume type 1",
        extraSpecs: {
            capabilities: "gpu",
            volume_backend_name: "ssd",
        },
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    volume_type1 = openstack.blockstorage.VolumeTypeV3("volume_type_1",
        name="volume_type_1",
        description="Volume type 1",
        extra_specs={
            "capabilities": "gpu",
            "volume_backend_name": "ssd",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/blockstorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := blockstorage.NewVolumeTypeV3(ctx, "volume_type_1", &blockstorage.VolumeTypeV3Args{
    			Name:        pulumi.String("volume_type_1"),
    			Description: pulumi.String("Volume type 1"),
    			ExtraSpecs: pulumi.Map{
    				"capabilities":        pulumi.Any("gpu"),
    				"volume_backend_name": pulumi.Any("ssd"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var volumeType1 = new OpenStack.BlockStorage.VolumeTypeV3("volume_type_1", new()
        {
            Name = "volume_type_1",
            Description = "Volume type 1",
            ExtraSpecs = 
            {
                { "capabilities", "gpu" },
                { "volume_backend_name", "ssd" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.blockstorage.VolumeTypeV3;
    import com.pulumi.openstack.blockstorage.VolumeTypeV3Args;
    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 volumeType1 = new VolumeTypeV3("volumeType1", VolumeTypeV3Args.builder()        
                .name("volume_type_1")
                .description("Volume type 1")
                .extraSpecs(Map.ofEntries(
                    Map.entry("capabilities", "gpu"),
                    Map.entry("volume_backend_name", "ssd")
                ))
                .build());
    
        }
    }
    
    resources:
      volumeType1:
        type: openstack:blockstorage:VolumeTypeV3
        name: volume_type_1
        properties:
          name: volume_type_1
          description: Volume type 1
          extraSpecs:
            capabilities: gpu
            volume_backend_name: ssd
    

    Volume Type with multiattach enabled

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const multiattach = new openstack.blockstorage.VolumeTypeV3("multiattach", {
        name: "multiattach",
        description: "Multiattach-enabled volume type",
        extraSpecs: {
            multiattach: "<is> True",
        },
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    multiattach = openstack.blockstorage.VolumeTypeV3("multiattach",
        name="multiattach",
        description="Multiattach-enabled volume type",
        extra_specs={
            "multiattach": "<is> True",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/blockstorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := blockstorage.NewVolumeTypeV3(ctx, "multiattach", &blockstorage.VolumeTypeV3Args{
    			Name:        pulumi.String("multiattach"),
    			Description: pulumi.String("Multiattach-enabled volume type"),
    			ExtraSpecs: pulumi.Map{
    				"multiattach": pulumi.Any("<is> True"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var multiattach = new OpenStack.BlockStorage.VolumeTypeV3("multiattach", new()
        {
            Name = "multiattach",
            Description = "Multiattach-enabled volume type",
            ExtraSpecs = 
            {
                { "multiattach", "<is> True" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.blockstorage.VolumeTypeV3;
    import com.pulumi.openstack.blockstorage.VolumeTypeV3Args;
    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 multiattach = new VolumeTypeV3("multiattach", VolumeTypeV3Args.builder()        
                .name("multiattach")
                .description("Multiattach-enabled volume type")
                .extraSpecs(Map.of("multiattach", "<is> True"))
                .build());
    
        }
    }
    
    resources:
      multiattach:
        type: openstack:blockstorage:VolumeTypeV3
        properties:
          name: multiattach
          description: Multiattach-enabled volume type
          extraSpecs:
            multiattach: <is> True
    

    Create VolumeTypeV3 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VolumeTypeV3(name: string, args?: VolumeTypeV3Args, opts?: CustomResourceOptions);
    @overload
    def VolumeTypeV3(resource_name: str,
                     args: Optional[VolumeTypeV3Args] = None,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def VolumeTypeV3(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     description: Optional[str] = None,
                     extra_specs: Optional[Mapping[str, Any]] = None,
                     is_public: Optional[bool] = None,
                     name: Optional[str] = None,
                     region: Optional[str] = None)
    func NewVolumeTypeV3(ctx *Context, name string, args *VolumeTypeV3Args, opts ...ResourceOption) (*VolumeTypeV3, error)
    public VolumeTypeV3(string name, VolumeTypeV3Args? args = null, CustomResourceOptions? opts = null)
    public VolumeTypeV3(String name, VolumeTypeV3Args args)
    public VolumeTypeV3(String name, VolumeTypeV3Args args, CustomResourceOptions options)
    
    type: openstack:blockstorage:VolumeTypeV3
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VolumeTypeV3Args
    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 VolumeTypeV3Args
    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 VolumeTypeV3Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VolumeTypeV3Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VolumeTypeV3Args
    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 volumeTypeV3Resource = new OpenStack.BlockStorage.VolumeTypeV3("volumeTypeV3Resource", new()
    {
        Description = "string",
        ExtraSpecs = 
        {
            { "string", "any" },
        },
        IsPublic = false,
        Name = "string",
        Region = "string",
    });
    
    example, err := blockstorage.NewVolumeTypeV3(ctx, "volumeTypeV3Resource", &blockstorage.VolumeTypeV3Args{
    	Description: pulumi.String("string"),
    	ExtraSpecs: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	IsPublic: pulumi.Bool(false),
    	Name:     pulumi.String("string"),
    	Region:   pulumi.String("string"),
    })
    
    var volumeTypeV3Resource = new VolumeTypeV3("volumeTypeV3Resource", VolumeTypeV3Args.builder()
        .description("string")
        .extraSpecs(Map.of("string", "any"))
        .isPublic(false)
        .name("string")
        .region("string")
        .build());
    
    volume_type_v3_resource = openstack.blockstorage.VolumeTypeV3("volumeTypeV3Resource",
        description="string",
        extra_specs={
            "string": "any",
        },
        is_public=False,
        name="string",
        region="string")
    
    const volumeTypeV3Resource = new openstack.blockstorage.VolumeTypeV3("volumeTypeV3Resource", {
        description: "string",
        extraSpecs: {
            string: "any",
        },
        isPublic: false,
        name: "string",
        region: "string",
    });
    
    type: openstack:blockstorage:VolumeTypeV3
    properties:
        description: string
        extraSpecs:
            string: any
        isPublic: false
        name: string
        region: string
    

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

    Description string
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    ExtraSpecs Dictionary<string, object>
    Key/Value pairs of metadata for the volume type.
    IsPublic bool
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    Name string
    Name of the volume type. Changing this updates the name of an existing volume type.
    Region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    Description string
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    ExtraSpecs map[string]interface{}
    Key/Value pairs of metadata for the volume type.
    IsPublic bool
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    Name string
    Name of the volume type. Changing this updates the name of an existing volume type.
    Region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    description String
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    extraSpecs Map<String,Object>
    Key/Value pairs of metadata for the volume type.
    isPublic Boolean
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    name String
    Name of the volume type. Changing this updates the name of an existing volume type.
    region String
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    description string
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    extraSpecs {[key: string]: any}
    Key/Value pairs of metadata for the volume type.
    isPublic boolean
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    name string
    Name of the volume type. Changing this updates the name of an existing volume type.
    region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    description str
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    extra_specs Mapping[str, Any]
    Key/Value pairs of metadata for the volume type.
    is_public bool
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    name str
    Name of the volume type. Changing this updates the name of an existing volume type.
    region str
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    description String
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    extraSpecs Map<Any>
    Key/Value pairs of metadata for the volume type.
    isPublic Boolean
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    name String
    Name of the volume type. Changing this updates the name of an existing volume type.
    region String
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VolumeTypeV3 Resource

    Get an existing VolumeTypeV3 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?: VolumeTypeV3State, opts?: CustomResourceOptions): VolumeTypeV3
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            extra_specs: Optional[Mapping[str, Any]] = None,
            is_public: Optional[bool] = None,
            name: Optional[str] = None,
            region: Optional[str] = None) -> VolumeTypeV3
    func GetVolumeTypeV3(ctx *Context, name string, id IDInput, state *VolumeTypeV3State, opts ...ResourceOption) (*VolumeTypeV3, error)
    public static VolumeTypeV3 Get(string name, Input<string> id, VolumeTypeV3State? state, CustomResourceOptions? opts = null)
    public static VolumeTypeV3 get(String name, Output<String> id, VolumeTypeV3State 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:
    Description string
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    ExtraSpecs Dictionary<string, object>
    Key/Value pairs of metadata for the volume type.
    IsPublic bool
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    Name string
    Name of the volume type. Changing this updates the name of an existing volume type.
    Region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    Description string
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    ExtraSpecs map[string]interface{}
    Key/Value pairs of metadata for the volume type.
    IsPublic bool
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    Name string
    Name of the volume type. Changing this updates the name of an existing volume type.
    Region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    description String
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    extraSpecs Map<String,Object>
    Key/Value pairs of metadata for the volume type.
    isPublic Boolean
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    name String
    Name of the volume type. Changing this updates the name of an existing volume type.
    region String
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    description string
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    extraSpecs {[key: string]: any}
    Key/Value pairs of metadata for the volume type.
    isPublic boolean
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    name string
    Name of the volume type. Changing this updates the name of an existing volume type.
    region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    description str
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    extra_specs Mapping[str, Any]
    Key/Value pairs of metadata for the volume type.
    is_public bool
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    name str
    Name of the volume type. Changing this updates the name of an existing volume type.
    region str
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    description String
    Human-readable description of the port. Changing this updates the description of an existing volume type.
    extraSpecs Map<Any>
    Key/Value pairs of metadata for the volume type.
    isPublic Boolean
    Whether the volume type is public. Changing this updates the is_public of an existing volume type.
    name String
    Name of the volume type. Changing this updates the name of an existing volume type.
    region String
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.

    Import

    Volume types can be imported using the volume_type_id, e.g.

    $ pulumi import openstack:blockstorage/volumeTypeV3:VolumeTypeV3 volume_type_1 941793f0-0a34-4bc4-b72e-a6326ae58283
    

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

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi