powerflex.Volume
Explore with Pulumi AI
Import
/*
Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.
Licensed under the Mozilla Public License Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://mozilla.org/MPL/2.0/
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import volume by it’s id
$ pulumi import powerflex:index/volume:Volume volume_import_by_id "<id>"
This will import the volume instance with specified ID into your Terraform state.
After successful import, you can run terraform state list to ensure the resource has been imported successfully.
Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource’s real-world configuration.
Execute pulumi preview to see if your configuration and the imported resource are in sync. Make adjustments if needed.
Finally, execute pulumi up to bring the resource fully under Terraform’s management.
Now, the resource which was not part of terraform became part of Terraform managed infrastructure.
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,
size: Optional[float] = None,
access_mode: Optional[str] = None,
capacity_unit: Optional[str] = None,
compression_method: Optional[str] = None,
name: Optional[str] = None,
protection_domain_id: Optional[str] = None,
protection_domain_name: Optional[str] = None,
remove_mode: Optional[str] = None,
storage_pool_id: Optional[str] = None,
storage_pool_name: Optional[str] = None,
use_rm_cache: Optional[bool] = None,
volume_type: Optional[str] = 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: powerflex:Volume
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 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.
- args 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 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.
- name String
- The unique name of the resource.
- args 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 Powerflex.Volume("volumeResource", new()
{
Size = 0,
AccessMode = "string",
CapacityUnit = "string",
CompressionMethod = "string",
Name = "string",
ProtectionDomainId = "string",
ProtectionDomainName = "string",
RemoveMode = "string",
StoragePoolId = "string",
StoragePoolName = "string",
UseRmCache = false,
VolumeType = "string",
});
example, err := powerflex.NewVolume(ctx, "volumeResource", &powerflex.VolumeArgs{
Size: pulumi.Float64(0),
AccessMode: pulumi.String("string"),
CapacityUnit: pulumi.String("string"),
CompressionMethod: pulumi.String("string"),
Name: pulumi.String("string"),
ProtectionDomainId: pulumi.String("string"),
ProtectionDomainName: pulumi.String("string"),
RemoveMode: pulumi.String("string"),
StoragePoolId: pulumi.String("string"),
StoragePoolName: pulumi.String("string"),
UseRmCache: pulumi.Bool(false),
VolumeType: pulumi.String("string"),
})
var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
.size(0)
.accessMode("string")
.capacityUnit("string")
.compressionMethod("string")
.name("string")
.protectionDomainId("string")
.protectionDomainName("string")
.removeMode("string")
.storagePoolId("string")
.storagePoolName("string")
.useRmCache(false)
.volumeType("string")
.build());
volume_resource = powerflex.Volume("volumeResource",
size=0,
access_mode="string",
capacity_unit="string",
compression_method="string",
name="string",
protection_domain_id="string",
protection_domain_name="string",
remove_mode="string",
storage_pool_id="string",
storage_pool_name="string",
use_rm_cache=False,
volume_type="string")
const volumeResource = new powerflex.Volume("volumeResource", {
size: 0,
accessMode: "string",
capacityUnit: "string",
compressionMethod: "string",
name: "string",
protectionDomainId: "string",
protectionDomainName: "string",
removeMode: "string",
storagePoolId: "string",
storagePoolName: "string",
useRmCache: false,
volumeType: "string",
});
type: powerflex:Volume
properties:
accessMode: string
capacityUnit: string
compressionMethod: string
name: string
protectionDomainId: string
protectionDomainName: string
removeMode: string
size: 0
storagePoolId: string
storagePoolName: string
useRmCache: false
volumeType: string
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:
- Size double
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - Access
Mode string - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - Capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - Compression
Method string - Compression Method of the volume. Valid values are
None
andNormal
. - Name string
- The name of the volume.
- Protection
Domain stringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - Protection
Domain stringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - Remove
Mode string - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - Storage
Pool stringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - Storage
Pool stringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - Use
Rm boolCache - use rm cache
- Volume
Type string - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- Size float64
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - Access
Mode string - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - Capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - Compression
Method string - Compression Method of the volume. Valid values are
None
andNormal
. - Name string
- The name of the volume.
- Protection
Domain stringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - Protection
Domain stringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - Remove
Mode string - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - Storage
Pool stringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - Storage
Pool stringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - Use
Rm boolCache - use rm cache
- Volume
Type string - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- size Double
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - access
Mode String - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit String - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - compression
Method String - Compression Method of the volume. Valid values are
None
andNormal
. - name String
- The name of the volume.
- protection
Domain StringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - protection
Domain StringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - remove
Mode String - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - storage
Pool StringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - storage
Pool StringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - use
Rm BooleanCache - use rm cache
- volume
Type String - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- size number
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - access
Mode string - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - compression
Method string - Compression Method of the volume. Valid values are
None
andNormal
. - name string
- The name of the volume.
- protection
Domain stringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - protection
Domain stringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - remove
Mode string - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - storage
Pool stringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - storage
Pool stringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - use
Rm booleanCache - use rm cache
- volume
Type string - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- size float
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - access_
mode str - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity_
unit str - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - compression_
method str - Compression Method of the volume. Valid values are
None
andNormal
. - name str
- The name of the volume.
- protection_
domain_ strid - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - protection_
domain_ strname - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - remove_
mode str - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - storage_
pool_ strid - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - storage_
pool_ strname - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - use_
rm_ boolcache - use rm cache
- volume_
type str - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- size Number
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - access
Mode String - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit String - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - compression
Method String - Compression Method of the volume. Valid values are
None
andNormal
. - name String
- The name of the volume.
- protection
Domain StringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - protection
Domain StringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - remove
Mode String - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - storage
Pool StringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - storage
Pool StringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - use
Rm BooleanCache - use rm cache
- volume
Type String - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Volume resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- size_
in_ floatkb - Size in KB
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,
access_mode: Optional[str] = None,
capacity_unit: Optional[str] = None,
compression_method: Optional[str] = None,
name: Optional[str] = None,
protection_domain_id: Optional[str] = None,
protection_domain_name: Optional[str] = None,
remove_mode: Optional[str] = None,
size: Optional[float] = None,
size_in_kb: Optional[float] = None,
storage_pool_id: Optional[str] = None,
storage_pool_name: Optional[str] = None,
use_rm_cache: Optional[bool] = None,
volume_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: powerflex:Volume get: id: ${id}
- 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.
- Access
Mode string - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - Capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - Compression
Method string - Compression Method of the volume. Valid values are
None
andNormal
. - Name string
- The name of the volume.
- Protection
Domain stringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - Protection
Domain stringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - Remove
Mode string - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - Size double
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - Size
In doubleKb - Size in KB
- Storage
Pool stringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - Storage
Pool stringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - Use
Rm boolCache - use rm cache
- Volume
Type string - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- Access
Mode string - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - Capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - Compression
Method string - Compression Method of the volume. Valid values are
None
andNormal
. - Name string
- The name of the volume.
- Protection
Domain stringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - Protection
Domain stringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - Remove
Mode string - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - Size float64
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - Size
In float64Kb - Size in KB
- Storage
Pool stringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - Storage
Pool stringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - Use
Rm boolCache - use rm cache
- Volume
Type string - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- access
Mode String - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit String - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - compression
Method String - Compression Method of the volume. Valid values are
None
andNormal
. - name String
- The name of the volume.
- protection
Domain StringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - protection
Domain StringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - remove
Mode String - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - size Double
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - size
In DoubleKb - Size in KB
- storage
Pool StringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - storage
Pool StringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - use
Rm BooleanCache - use rm cache
- volume
Type String - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- access
Mode string - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - compression
Method string - Compression Method of the volume. Valid values are
None
andNormal
. - name string
- The name of the volume.
- protection
Domain stringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - protection
Domain stringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - remove
Mode string - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - size number
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - size
In numberKb - Size in KB
- storage
Pool stringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - storage
Pool stringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - use
Rm booleanCache - use rm cache
- volume
Type string - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- access_
mode str - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity_
unit str - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - compression_
method str - Compression Method of the volume. Valid values are
None
andNormal
. - name str
- The name of the volume.
- protection_
domain_ strid - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - protection_
domain_ strname - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - remove_
mode str - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - size float
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - size_
in_ floatkb - Size in KB
- storage_
pool_ strid - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - storage_
pool_ strname - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - use_
rm_ boolcache - use rm cache
- volume_
type str - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
- access
Mode String - The Access mode of the volume. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit String - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - compression
Method String - Compression Method of the volume. Valid values are
None
andNormal
. - name String
- The name of the volume.
- protection
Domain StringId - ID of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_name
. Cannot be updated. - protection
Domain StringName - Name of the Protection Domain under which the volume will be created. Conflicts with
protection_domain_id
. Cannot be updated. - remove
Mode String - Remove mode of the volume. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - size Number
- Size of the volume. The unit of size is defined by
capacity_unit
. The storage capacity of a volume must be a multiple of 8GB and cannot be decreased. - size
In NumberKb - Size in KB
- storage
Pool StringId - ID of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_name
. Cannot be updated. - storage
Pool StringName - Name of the Storage Pool under which the volume will be created. Conflicts with
storage_pool_id
. Cannot be updated. - use
Rm BooleanCache - use rm cache
- volume
Type String - Volume type. Valid values are
ThickProvisioned
andThinProvisioned
. Default value isThinProvisioned
.
Package Details
- Repository
- powerflex dell/terraform-provider-powerflex
- License
- Notes
- This Pulumi package is based on the
powerflex
Terraform Provider.