-
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 Storagepool tier datasource (#259)
* Adding storagepool datasource
- Loading branch information
1 parent
9153356
commit d00a7cd
Showing
9 changed files
with
601 additions
and
5 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,104 @@ | ||
--- | ||
# 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 data source" | ||
linkTitle: "powerscale_storagepool_tier" | ||
page_title: "powerscale_storagepool_tier Data Source - terraform-provider-powerscale" | ||
subcategory: "" | ||
description: |- | ||
This datasource is used to query the Storagepool tiers from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. PowerScale Storagepool tiers provide the ability to configure Storagepool tiers on the cluster. | ||
--- | ||
|
||
# powerscale_storagepool_tier (Data Source) | ||
|
||
This datasource is used to query the Storagepool tiers from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. PowerScale Storagepool tiers provide the ability to configure Storagepool tiers on the cluster. | ||
|
||
## 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. | ||
*/ | ||
# Returns a list of PowerScale Storage pool tier | ||
data "powerscale_storagepool_tier" "example_storagepool_tier" { | ||
} | ||
output "powerscale_storagepool_tier" { | ||
value = data.powerscale_storagepool_tier.example_storagepool_tier | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Id of Storagepool tiers. Readonly. Fixed value of "storagepool_tiers" | ||
- `storagepool_tiers` (Attributes List) List of Storagepool tiers (see [below for nested schema](#nestedatt--storagepool_tiers)) | ||
|
||
<a id="nestedatt--storagepool_tiers"></a> | ||
### Nested Schema for `storagepool_tiers` | ||
|
||
Read-Only: | ||
|
||
- `children` (List of String) The names or IDs of the tier's children. | ||
- `id` (String) Id of storagepool tier. | ||
- `lnns` (List of Number) The nodes that are part of this tier. | ||
- `name` (String) Name of 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. | ||
- `usage` (Attributes) Usage. (see [below for nested schema](#nestedatt--storagepool_tiers--usage)) | ||
|
||
<a id="nestedatt--storagepool_tiers--usage"></a> | ||
### Nested Schema for `storagepool_tiers.usage` | ||
|
||
Read-Only: | ||
|
||
- `avail_bytes` (String) Available free bytes remaining in the pool when virtual hot spare is taken into account. | ||
- `avail_hdd_bytes` (String) Available free bytes remaining in the pool on HDD drives when virtual hot spare is taken into account. | ||
- `avail_ssd_bytes` (String) Available free bytes remaining in the pool on SSD drives when virtual hot spare is taken into account. | ||
- `balanced` (Boolean) Whether or not the pool usage is currently balanced. | ||
- `free_bytes` (String) Free bytes remaining in the pool. | ||
- `free_hdd_bytes` (String) Free bytes remaining in the pool on HDD drives. | ||
- `free_ssd_bytes` (String) Free bytes remaining in the pool on SSD drives. | ||
- `pct_used` (String) Percentage of usable space in the pool which is used. | ||
- `pct_used_hdd` (String) Percentage of usable space on HDD drives in the pool which is used. | ||
- `pct_used_ssd` (String) Percentage of usable space on SSD drives in the pool which is used. | ||
- `total_bytes` (String) Total bytes in the pool. | ||
- `total_hdd_bytes` (String) Total bytes in the pool on HDD drives. | ||
- `total_ssd_bytes` (String) Total bytes in the pool on SSD drives. | ||
- `usable_bytes` (String) Total bytes in the pool drives when virtual hot spare is taken into account. | ||
- `usable_hdd_bytes` (String) Total bytes in the pool on HDD drives when virtual hot spare is taken into account. | ||
- `usable_ssd_bytes` (String) Total bytes in the pool on SSD drives when virtual hot spare is taken into account. | ||
- `used_bytes` (String) Used bytes in the pool. | ||
- `used_hdd_bytes` (String) Used bytes in the pool on HDD drives. | ||
- `used_ssd_bytes` (String) Used bytes in the pool on SSD drives. | ||
- `virtual_hot_spare_bytes` (String) Bytes reserved for virtual hot spare in the pool. |
25 changes: 25 additions & 0 deletions
25
examples/data-sources/powerscale_storagepool_tier/data-source.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,25 @@ | ||
/* | ||
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. | ||
*/ | ||
|
||
# Returns a list of PowerScale Storage pool tier | ||
data "powerscale_storagepool_tier" "example_storagepool_tier" { | ||
|
||
} | ||
|
||
output "powerscale_storagepool_tier" { | ||
value = data.powerscale_storagepool_tier.example_storagepool_tier | ||
} |
30 changes: 30 additions & 0 deletions
30
examples/data-sources/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 | ||
} |
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
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
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
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.