-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for resource for storagepool tier (#265)
* Adding support for resource for storagepool tier * Adding support for resource for storagepool tier * Adding support for resource for storagepool tier
- Loading branch information
1 parent
ab3b2bc
commit 66bb009
Showing
12 changed files
with
913 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
--- | ||
# Copyright (c) 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. | ||
|
||
title: "powerscale_storagepool_tier resource" | ||
linkTitle: "powerscale_storagepool_tier" | ||
page_title: "powerscale_storagepool_tier Resource - terraform-provider-powerscale" | ||
subcategory: "" | ||
description: |- | ||
This resource is used to manage the storagepool tier entity of PowerScale Array. We can Create, Update and Delete the storagepool tiers using this resource. We can also import an existing storagepool tier from PowerScale array. | ||
--- | ||
|
||
# powerscale_storagepool_tier (Resource) | ||
|
||
This resource is used to manage the storagepool tier entity of PowerScale Array. We can Create, Update and Delete the storagepool tiers using this resource. We can also import an existing storagepool tier from PowerScale array. | ||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
/* | ||
Copyright (c) 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. | ||
*/ | ||
# Available actions: Create, Update, Delete and Import. | ||
# After `terraform apply` of this example file will create the storage pool tier on the PowerScale array with the attributes set in the config. | ||
# For update, name, children, transfer_limit_pct and transfer_limit_state are supported. transfer_limit_pct and transfer_limit_state are mutually exclusive | ||
resource "powerscale_storagepool_tier" "example" { | ||
# Required field both for creating and updating | ||
name = "Sample_terraform_tier_7" | ||
# Optional parameters | ||
children = [ | ||
"x410_34tb_1.6tb-ssd_64gb" | ||
] | ||
transfer_limit_pct = 40 | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Specifies the storagepool tier name. | ||
|
||
### Optional | ||
|
||
- `children` (List of String) An optional parameter which adds new nodepools to the storagepool tier. | ||
- `transfer_limit_pct` (Number) Stop moving files to this tier when this limit is met | ||
- `transfer_limit_state` (String) How the transfer limit value is being applied | ||
|
||
### Read-Only | ||
|
||
- `id` (Number) Specifies a string which represents the unique identifier of storagepool tier | ||
- `lnns` (List of Number) The nodes that are part of this tier. | ||
|
||
Unless specified otherwise, all fields of this resource can be updated. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# Copyright (c) 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. | ||
|
||
# The command is | ||
# terraform import powerscale_storagepool_tier.example id_of_storagepool_tier | ||
# Example: | ||
terraform import powerscale_storagepool_tier.example "tier" | ||
# after running this command, populate parameters in the config file to start managing this resource. | ||
# Note: running "terraform show" after importing shows the current config/state of the resource. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 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. | ||
|
||
# The command is | ||
# terraform import powerscale_storagepool_tier.example id_of_storagepool_tier | ||
# Example: | ||
terraform import powerscale_storagepool_tier.example "tier" | ||
# after running this command, populate parameters in the config file to start managing this resource. | ||
# Note: running "terraform show" after importing shows the current config/state of the resource. |
30 changes: 30 additions & 0 deletions
30
examples/resources/powerscale_storagepool_tier/provider.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
Copyright (c) 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. | ||
*/ | ||
terraform { | ||
required_providers { | ||
powerscale = { | ||
source = "registry.terraform.io/dell/powerscale" | ||
} | ||
} | ||
} | ||
|
||
provider "powerscale" { | ||
username = var.username | ||
password = var.password | ||
endpoint = var.endpoint | ||
insecure = var.insecure | ||
} |
31 changes: 31 additions & 0 deletions
31
examples/resources/powerscale_storagepool_tier/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright (c) 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. | ||
*/ | ||
|
||
# Available actions: Create, Update, Delete and Import. | ||
# After `terraform apply` of this example file will create the storage pool tier on the PowerScale array with the attributes set in the config. | ||
# For update, name, children, transfer_limit_pct and transfer_limit_state are supported. transfer_limit_pct and transfer_limit_state are mutually exclusive | ||
|
||
resource "powerscale_storagepool_tier" "example" { | ||
# Required field both for creating and updating | ||
name = "Sample_terraform_tier_7" | ||
|
||
# Optional parameters | ||
children = [ | ||
"x410_34tb_1.6tb-ssd_64gb" | ||
] | ||
transfer_limit_pct = 40 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.