1. Packages
  2. Rancher2
  3. API Docs
  4. StorageClassV2
Rancher 2 v6.1.1 published on Friday, May 10, 2024 by Pulumi

rancher2.StorageClassV2

Explore with Pulumi AI

rancher2 logo
Rancher 2 v6.1.1 published on Friday, May 10, 2024 by Pulumi

    Provides a Rancher Storage Class v2 resource. This can be used to manage k8s storage classes for Rancher v2 clusters and retrieve their information. Storage Class v2 resource is available at Rancher v2.5.x and above.

    Create StorageClassV2 Resource

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

    Constructor syntax

    new StorageClassV2(name: string, args: StorageClassV2Args, opts?: CustomResourceOptions);
    @overload
    def StorageClassV2(resource_name: str,
                       args: StorageClassV2Args,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def StorageClassV2(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       cluster_id: Optional[str] = None,
                       k8s_provisioner: Optional[str] = None,
                       allow_volume_expansion: Optional[bool] = None,
                       annotations: Optional[Mapping[str, Any]] = None,
                       labels: Optional[Mapping[str, Any]] = None,
                       mount_options: Optional[Sequence[str]] = None,
                       name: Optional[str] = None,
                       parameters: Optional[Mapping[str, Any]] = None,
                       reclaim_policy: Optional[str] = None,
                       volume_binding_mode: Optional[str] = None)
    func NewStorageClassV2(ctx *Context, name string, args StorageClassV2Args, opts ...ResourceOption) (*StorageClassV2, error)
    public StorageClassV2(string name, StorageClassV2Args args, CustomResourceOptions? opts = null)
    public StorageClassV2(String name, StorageClassV2Args args)
    public StorageClassV2(String name, StorageClassV2Args args, CustomResourceOptions options)
    
    type: rancher2:StorageClassV2
    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 StorageClassV2Args
    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 StorageClassV2Args
    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 StorageClassV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StorageClassV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StorageClassV2Args
    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 storageClassV2Resource = new Rancher2.StorageClassV2("storageClassV2Resource", new()
    {
        ClusterId = "string",
        K8sProvisioner = "string",
        AllowVolumeExpansion = false,
        Annotations = 
        {
            { "string", "any" },
        },
        Labels = 
        {
            { "string", "any" },
        },
        MountOptions = new[]
        {
            "string",
        },
        Name = "string",
        Parameters = 
        {
            { "string", "any" },
        },
        ReclaimPolicy = "string",
        VolumeBindingMode = "string",
    });
    
    example, err := rancher2.NewStorageClassV2(ctx, "storageClassV2Resource", &rancher2.StorageClassV2Args{
    	ClusterId:            pulumi.String("string"),
    	K8sProvisioner:       pulumi.String("string"),
    	AllowVolumeExpansion: pulumi.Bool(false),
    	Annotations: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Labels: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	MountOptions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	Parameters: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	ReclaimPolicy:     pulumi.String("string"),
    	VolumeBindingMode: pulumi.String("string"),
    })
    
    var storageClassV2Resource = new StorageClassV2("storageClassV2Resource", StorageClassV2Args.builder()
        .clusterId("string")
        .k8sProvisioner("string")
        .allowVolumeExpansion(false)
        .annotations(Map.of("string", "any"))
        .labels(Map.of("string", "any"))
        .mountOptions("string")
        .name("string")
        .parameters(Map.of("string", "any"))
        .reclaimPolicy("string")
        .volumeBindingMode("string")
        .build());
    
    storage_class_v2_resource = rancher2.StorageClassV2("storageClassV2Resource",
        cluster_id="string",
        k8s_provisioner="string",
        allow_volume_expansion=False,
        annotations={
            "string": "any",
        },
        labels={
            "string": "any",
        },
        mount_options=["string"],
        name="string",
        parameters={
            "string": "any",
        },
        reclaim_policy="string",
        volume_binding_mode="string")
    
    const storageClassV2Resource = new rancher2.StorageClassV2("storageClassV2Resource", {
        clusterId: "string",
        k8sProvisioner: "string",
        allowVolumeExpansion: false,
        annotations: {
            string: "any",
        },
        labels: {
            string: "any",
        },
        mountOptions: ["string"],
        name: "string",
        parameters: {
            string: "any",
        },
        reclaimPolicy: "string",
        volumeBindingMode: "string",
    });
    
    type: rancher2:StorageClassV2
    properties:
        allowVolumeExpansion: false
        annotations:
            string: any
        clusterId: string
        k8sProvisioner: string
        labels:
            string: any
        mountOptions:
            - string
        name: string
        parameters:
            string: any
        reclaimPolicy: string
        volumeBindingMode: string
    

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

    ClusterId string
    The cluster id of the storageClass V2 (string)
    K8sProvisioner string
    The provisioner of the storageClass v2 (string)
    AllowVolumeExpansion bool
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    Annotations Dictionary<string, object>
    Annotations for the storageClass v2 (map)
    Labels Dictionary<string, object>
    Labels for the storageClass v2 (map)
    MountOptions List<string>
    The mount options for storageClass v2 (list)
    Name string
    The name of the storageClass v2 (string)
    Parameters Dictionary<string, object>
    The parameters for storageClass v2 (string)
    ReclaimPolicy string
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    VolumeBindingMode string
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    ClusterId string
    The cluster id of the storageClass V2 (string)
    K8sProvisioner string
    The provisioner of the storageClass v2 (string)
    AllowVolumeExpansion bool
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    Annotations map[string]interface{}
    Annotations for the storageClass v2 (map)
    Labels map[string]interface{}
    Labels for the storageClass v2 (map)
    MountOptions []string
    The mount options for storageClass v2 (list)
    Name string
    The name of the storageClass v2 (string)
    Parameters map[string]interface{}
    The parameters for storageClass v2 (string)
    ReclaimPolicy string
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    VolumeBindingMode string
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    clusterId String
    The cluster id of the storageClass V2 (string)
    k8sProvisioner String
    The provisioner of the storageClass v2 (string)
    allowVolumeExpansion Boolean
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    annotations Map<String,Object>
    Annotations for the storageClass v2 (map)
    labels Map<String,Object>
    Labels for the storageClass v2 (map)
    mountOptions List<String>
    The mount options for storageClass v2 (list)
    name String
    The name of the storageClass v2 (string)
    parameters Map<String,Object>
    The parameters for storageClass v2 (string)
    reclaimPolicy String
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    volumeBindingMode String
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    clusterId string
    The cluster id of the storageClass V2 (string)
    k8sProvisioner string
    The provisioner of the storageClass v2 (string)
    allowVolumeExpansion boolean
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    annotations {[key: string]: any}
    Annotations for the storageClass v2 (map)
    labels {[key: string]: any}
    Labels for the storageClass v2 (map)
    mountOptions string[]
    The mount options for storageClass v2 (list)
    name string
    The name of the storageClass v2 (string)
    parameters {[key: string]: any}
    The parameters for storageClass v2 (string)
    reclaimPolicy string
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    volumeBindingMode string
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    cluster_id str
    The cluster id of the storageClass V2 (string)
    k8s_provisioner str
    The provisioner of the storageClass v2 (string)
    allow_volume_expansion bool
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    annotations Mapping[str, Any]
    Annotations for the storageClass v2 (map)
    labels Mapping[str, Any]
    Labels for the storageClass v2 (map)
    mount_options Sequence[str]
    The mount options for storageClass v2 (list)
    name str
    The name of the storageClass v2 (string)
    parameters Mapping[str, Any]
    The parameters for storageClass v2 (string)
    reclaim_policy str
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    volume_binding_mode str
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    clusterId String
    The cluster id of the storageClass V2 (string)
    k8sProvisioner String
    The provisioner of the storageClass v2 (string)
    allowVolumeExpansion Boolean
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    annotations Map<Any>
    Annotations for the storageClass v2 (map)
    labels Map<Any>
    Labels for the storageClass v2 (map)
    mountOptions List<String>
    The mount options for storageClass v2 (list)
    name String
    The name of the storageClass v2 (string)
    parameters Map<Any>
    The parameters for storageClass v2 (string)
    reclaimPolicy String
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    volumeBindingMode String
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceVersion string
    (Computed) The k8s resource version (string)
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceVersion string
    (Computed) The k8s resource version (string)
    id String
    The provider-assigned unique ID for this managed resource.
    resourceVersion String
    (Computed) The k8s resource version (string)
    id string
    The provider-assigned unique ID for this managed resource.
    resourceVersion string
    (Computed) The k8s resource version (string)
    id str
    The provider-assigned unique ID for this managed resource.
    resource_version str
    (Computed) The k8s resource version (string)
    id String
    The provider-assigned unique ID for this managed resource.
    resourceVersion String
    (Computed) The k8s resource version (string)

    Look up Existing StorageClassV2 Resource

    Get an existing StorageClassV2 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?: StorageClassV2State, opts?: CustomResourceOptions): StorageClassV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_volume_expansion: Optional[bool] = None,
            annotations: Optional[Mapping[str, Any]] = None,
            cluster_id: Optional[str] = None,
            k8s_provisioner: Optional[str] = None,
            labels: Optional[Mapping[str, Any]] = None,
            mount_options: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            parameters: Optional[Mapping[str, Any]] = None,
            reclaim_policy: Optional[str] = None,
            resource_version: Optional[str] = None,
            volume_binding_mode: Optional[str] = None) -> StorageClassV2
    func GetStorageClassV2(ctx *Context, name string, id IDInput, state *StorageClassV2State, opts ...ResourceOption) (*StorageClassV2, error)
    public static StorageClassV2 Get(string name, Input<string> id, StorageClassV2State? state, CustomResourceOptions? opts = null)
    public static StorageClassV2 get(String name, Output<String> id, StorageClassV2State 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:
    AllowVolumeExpansion bool
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    Annotations Dictionary<string, object>
    Annotations for the storageClass v2 (map)
    ClusterId string
    The cluster id of the storageClass V2 (string)
    K8sProvisioner string
    The provisioner of the storageClass v2 (string)
    Labels Dictionary<string, object>
    Labels for the storageClass v2 (map)
    MountOptions List<string>
    The mount options for storageClass v2 (list)
    Name string
    The name of the storageClass v2 (string)
    Parameters Dictionary<string, object>
    The parameters for storageClass v2 (string)
    ReclaimPolicy string
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    ResourceVersion string
    (Computed) The k8s resource version (string)
    VolumeBindingMode string
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    AllowVolumeExpansion bool
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    Annotations map[string]interface{}
    Annotations for the storageClass v2 (map)
    ClusterId string
    The cluster id of the storageClass V2 (string)
    K8sProvisioner string
    The provisioner of the storageClass v2 (string)
    Labels map[string]interface{}
    Labels for the storageClass v2 (map)
    MountOptions []string
    The mount options for storageClass v2 (list)
    Name string
    The name of the storageClass v2 (string)
    Parameters map[string]interface{}
    The parameters for storageClass v2 (string)
    ReclaimPolicy string
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    ResourceVersion string
    (Computed) The k8s resource version (string)
    VolumeBindingMode string
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    allowVolumeExpansion Boolean
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    annotations Map<String,Object>
    Annotations for the storageClass v2 (map)
    clusterId String
    The cluster id of the storageClass V2 (string)
    k8sProvisioner String
    The provisioner of the storageClass v2 (string)
    labels Map<String,Object>
    Labels for the storageClass v2 (map)
    mountOptions List<String>
    The mount options for storageClass v2 (list)
    name String
    The name of the storageClass v2 (string)
    parameters Map<String,Object>
    The parameters for storageClass v2 (string)
    reclaimPolicy String
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    resourceVersion String
    (Computed) The k8s resource version (string)
    volumeBindingMode String
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    allowVolumeExpansion boolean
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    annotations {[key: string]: any}
    Annotations for the storageClass v2 (map)
    clusterId string
    The cluster id of the storageClass V2 (string)
    k8sProvisioner string
    The provisioner of the storageClass v2 (string)
    labels {[key: string]: any}
    Labels for the storageClass v2 (map)
    mountOptions string[]
    The mount options for storageClass v2 (list)
    name string
    The name of the storageClass v2 (string)
    parameters {[key: string]: any}
    The parameters for storageClass v2 (string)
    reclaimPolicy string
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    resourceVersion string
    (Computed) The k8s resource version (string)
    volumeBindingMode string
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    allow_volume_expansion bool
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    annotations Mapping[str, Any]
    Annotations for the storageClass v2 (map)
    cluster_id str
    The cluster id of the storageClass V2 (string)
    k8s_provisioner str
    The provisioner of the storageClass v2 (string)
    labels Mapping[str, Any]
    Labels for the storageClass v2 (map)
    mount_options Sequence[str]
    The mount options for storageClass v2 (list)
    name str
    The name of the storageClass v2 (string)
    parameters Mapping[str, Any]
    The parameters for storageClass v2 (string)
    reclaim_policy str
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    resource_version str
    (Computed) The k8s resource version (string)
    volume_binding_mode str
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)
    allowVolumeExpansion Boolean
    Is the provisioner of the storageClass v2 allowing volume expansion? (bool)
    annotations Map<Any>
    Annotations for the storageClass v2 (map)
    clusterId String
    The cluster id of the storageClass V2 (string)
    k8sProvisioner String
    The provisioner of the storageClass v2 (string)
    labels Map<Any>
    Labels for the storageClass v2 (map)
    mountOptions List<String>
    The mount options for storageClass v2 (list)
    name String
    The name of the storageClass v2 (string)
    parameters Map<Any>
    The parameters for storageClass v2 (string)
    reclaimPolicy String
    The reclaim policy for storageClass v2. Delete, Recycle and Retain values are allowed. Default: Delete (string)
    resourceVersion String
    (Computed) The k8s resource version (string)
    volumeBindingMode String
    The volume binding mode for storageClass v2. Immediate and WaitForFirstConsumer values are allowed. Default: Immediate (string)

    Import

    V2 storage classs can be imported using the Rancher cluster ID and StorageClass V2 name.

    $ pulumi import rancher2:index/storageClassV2:StorageClassV2 foo &lt;CLUSTER_ID&gt;.&lt;STORAGE_CLASS_V2_NAME&gt;
    

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

    Package Details

    Repository
    Rancher2 pulumi/pulumi-rancher2
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rancher2 Terraform Provider.
    rancher2 logo
    Rancher 2 v6.1.1 published on Friday, May 10, 2024 by Pulumi