-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #276 from NetApp/76-new-resource-storageqospolicies
new resource qos policies
- Loading branch information
Showing
22 changed files
with
1,743 additions
and
0 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
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,97 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "netapp-ontap_qos_policies Data Source - terraform-provider-netapp-ontap" | ||
subcategory: "Storage" | ||
description: |- | ||
QOSPolicies data source | ||
--- | ||
|
||
# netapp-ontap_qos_policies (Data Source) | ||
|
||
QOSPolicies data source | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "netapp-ontap_qos_policies" "qos_policies" { | ||
# required to know which system to interface with | ||
cx_profile_name = "cluster1" | ||
filter = { | ||
svm_name = "terraform" | ||
name = "test2" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `cx_profile_name` (String) Connection profile name | ||
|
||
### Optional | ||
|
||
- `filter` (Attributes) (see [below for nested schema](#nestedatt--filter)) | ||
|
||
### Read-Only | ||
|
||
- `qos_policies` (Attributes List) (see [below for nested schema](#nestedatt--qos_policies)) | ||
|
||
<a id="nestedatt--filter"></a> | ||
### Nested Schema for `filter` | ||
|
||
Optional: | ||
|
||
- `name` (String) QOSPolicy name | ||
- `svm_name` (String) QOSPolicy svm name | ||
|
||
|
||
<a id="nestedatt--qos_policies"></a> | ||
### Nested Schema for `qos_policies` | ||
|
||
Required: | ||
|
||
- `cx_profile_name` (String) Connection profile name | ||
- `name` (String) QOSPolicy name | ||
- `svm_name` (String) QOSPolicy svm name | ||
|
||
Optional: | ||
|
||
- `adaptive` (Attributes) Adaptive QoS policy (see [below for nested schema](#nestedatt--qos_policies--adaptive)) | ||
- `scope` (String) QoS policy scope | ||
|
||
Read-Only: | ||
|
||
- `fixed` (Attributes) Fixed QoS policy (see [below for nested schema](#nestedatt--qos_policies--fixed)) | ||
- `id` (String) QOSPolicies UUID | ||
|
||
<a id="nestedatt--qos_policies--adaptive"></a> | ||
### Nested Schema for `qos_policies.adaptive` | ||
|
||
Required: | ||
|
||
- `peak_iops` (Number) Peak IOPS | ||
|
||
Optional: | ||
|
||
- `absolute_min_iops` (Number) Absolute minimum IOPS | ||
|
||
Read-Only: | ||
|
||
- `block_size` (String) Block size | ||
- `expected_iops` (Number) Expected IOPS | ||
- `expected_iops_allocation` (String) Expected IOPS allocation | ||
- `peak_iops_allocation` (String) Peak IOPS allocation | ||
|
||
|
||
<a id="nestedatt--qos_policies--fixed"></a> | ||
### Nested Schema for `qos_policies.fixed` | ||
|
||
Read-Only: | ||
|
||
- `capacity_shared` (Boolean) Capacity shared | ||
- `max_throughput_iops` (Number) Maximum throughput in IOPS | ||
- `max_throughput_mbps` (Number) Maximum throughput in MBPS | ||
- `min_throughput_iops` (Number) Minimum throughput in IOPS | ||
- `min_throughput_mbps` (Number) Minimum throughput in MBPS |
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,71 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "netapp-ontap_qos_policy Data Source - terraform-provider-netapp-ontap" | ||
subcategory: "Storage" | ||
description: |- | ||
QOSPolicy data source | ||
--- | ||
|
||
# netapp-ontap_qos_policy (Data Source) | ||
|
||
QOSPolicy data source | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "netapp-ontap_qos_policy" "qos_policy" { | ||
# required to know which system to interface with | ||
cx_profile_name = "cluster1" | ||
name = "test" | ||
svm_name = "terraform" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `cx_profile_name` (String) Connection profile name | ||
- `name` (String) QOSPolicy name | ||
- `svm_name` (String) QOSPolicy svm name | ||
|
||
### Optional | ||
|
||
- `adaptive` (Attributes) Adaptive QoS policy (see [below for nested schema](#nestedatt--adaptive)) | ||
- `scope` (String) QoS policy scope | ||
|
||
### Read-Only | ||
|
||
- `fixed` (Attributes) Fixed QoS policy (see [below for nested schema](#nestedatt--fixed)) | ||
- `id` (String) QOSPolicies UUID | ||
|
||
<a id="nestedatt--adaptive"></a> | ||
### Nested Schema for `adaptive` | ||
|
||
Required: | ||
|
||
- `peak_iops` (Number) Peak IOPS | ||
|
||
Optional: | ||
|
||
- `absolute_min_iops` (Number) Absolute minimum IOPS | ||
|
||
Read-Only: | ||
|
||
- `block_size` (String) Block size | ||
- `expected_iops` (Number) Expected IOPS | ||
- `expected_iops_allocation` (String) Expected IOPS allocation | ||
- `peak_iops_allocation` (String) Peak IOPS allocation | ||
|
||
|
||
<a id="nestedatt--fixed"></a> | ||
### Nested Schema for `fixed` | ||
|
||
Read-Only: | ||
|
||
- `capacity_shared` (Boolean) Capacity shared | ||
- `max_throughput_iops` (Number) Maximum throughput in IOPS | ||
- `max_throughput_mbps` (Number) Maximum throughput in MBPS | ||
- `min_throughput_iops` (Number) Minimum throughput in IOPS | ||
- `min_throughput_mbps` (Number) Minimum throughput in MBPS |
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,140 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "netapp-ontap_qos_policies Resource - terraform-provider-netapp-ontap" | ||
subcategory: "Storage" | ||
description: |- | ||
QOSPolicies resource | ||
--- | ||
|
||
# netapp-ontap_qos_policies (Resource) | ||
|
||
Create/Modify/Delete a QOSPolicies resource | ||
|
||
### Related ONTAP commands | ||
```commandline | ||
* qos policy-group create | ||
* qos policy-group modify | ||
* qos policy-group delete | ||
* qos adaptive-policy-group create | ||
* qos adaptive-policy-group modify | ||
* qos adaptive-policy-group delete | ||
``` | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "netapp-ontap_qos_policies" "qos_policies" { | ||
# required to know which system to interface with | ||
cx_profile_name = "cluster1" | ||
name = "terraform2" | ||
svm_name = "terraform" | ||
fixed = { | ||
max_throughput_iops = 1 | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `cx_profile_name` (String) Connection profile name | ||
- `name` (String) QOSPolicies name | ||
- `svm_name` (String) QOSPolicies svm name | ||
|
||
### Optional | ||
|
||
- `adaptive` (Attributes) Adaptive QoS policy (see [below for nested schema](#nestedatt--adaptive)) | ||
- `fixed` (Attributes) Fixed QoS policy (see [below for nested schema](#nestedatt--fixed)) | ||
- `scope` (String) QoS policy scope | ||
|
||
### Read-Only | ||
|
||
- `id` (String) QOSPolicies UUID | ||
|
||
<a id="nestedatt--adaptive"></a> | ||
### Nested Schema for `adaptive` | ||
|
||
Required: | ||
|
||
- `expected_iops` (Number) Expected IOPS | ||
- `peak_iops` (Number) Peak IOPS | ||
|
||
Optional: | ||
|
||
- `absolute_min_iops` (Number) Absolute minimum IOPS | ||
- `block_size` (String) Block size | ||
- `expected_iops_allocation` (String) Expected IOPS allocation | ||
- `peak_iops_allocation` (String) Peak IOPS allocation | ||
|
||
|
||
<a id="nestedatt--fixed"></a> | ||
### Nested Schema for `fixed` | ||
|
||
Optional: | ||
|
||
- `capacity_shared` (Boolean) Capacity shared | ||
- `max_throughput_iops` (Number) Maximum throughput in IOPS | ||
- `max_throughput_mbps` (Number) Maximum throughput in MBPS | ||
- `min_throughput_iops` (Number) Minimum throughput in IOPS | ||
- `min_throughput_mbps` (Number) Minimum throughput in MBPS | ||
|
||
## Import | ||
This Resource supports import, which allows you to import existing qos policies into the state of this resoruce. | ||
Import require a unique ID composed of the name, svm name and cx_profile_name, separated by a comma. | ||
|
||
id = `name`, `svm_name`, `cx_profile_name` | ||
|
||
### Terraform Import | ||
|
||
For example | ||
```shell | ||
terraform import netapp-ontap_qos_policies.example name,svm,cluster4 | ||
``` | ||
|
||
!> The terraform import CLI command can only import resources into the state. Importing via the CLI does not generate configuration. If you want to generate the accompanying configuration for imported resources, use the import block instead. | ||
|
||
### Terraform Import Block | ||
This requires Terraform 1.5 or higher, and will auto create the configuration for you | ||
|
||
First create the block | ||
```terraform | ||
import { | ||
to = netapp-ontap_qos_policies.qos_policies | ||
id = "name,svm,cluster4" | ||
} | ||
``` | ||
Next run, this will auto create the configuration for you | ||
```shell | ||
terraform plan -generate-config-out=generated.tf | ||
``` | ||
This will generate a file called generated.tf, which will contain the configuration for the imported resource | ||
```terraform | ||
# __generated__ by Terraform | ||
# Please review these resources and move them into your main configuration files. | ||
# __generated__ by Terraform from "vol,svm,tree,test,cluster4" | ||
resource "netapp-ontap_qos_policies" "qos_policies" { | ||
cx_profile_name = "cluster4" | ||
id = "abcd" | ||
adaptive = { | ||
absolute_min_iops = 0 | ||
block_size = "" | ||
expected_iops = 0 | ||
expected_iops_allocation = "" | ||
peak_iops = 0 | ||
peak_iops_allocation = "" | ||
} | ||
fixed = { | ||
capacity_shared = true | ||
max_throughput_iops = 0 | ||
max_throughput_mbps = 0 | ||
min_throughput_iops = 0 | ||
min_throughput_mbps = 0 | ||
} | ||
name = "test" | ||
scope = "svm" | ||
svm_name = "terraform" | ||
} | ||
``` |
8 changes: 8 additions & 0 deletions
8
examples/data-sources/netapp-ontap_qos_policies/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,8 @@ | ||
data "netapp-ontap_qos_policies" "qos_policies" { | ||
# required to know which system to interface with | ||
cx_profile_name = "cluster1" | ||
filter = { | ||
svm_name = "terraform" | ||
name = "test2" | ||
} | ||
} |
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 @@ | ||
../../provider/provider.tf |
1 change: 1 addition & 0 deletions
1
examples/data-sources/netapp-ontap_qos_policies/terraform.tfvars
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 @@ | ||
../../provider/terraform.tfvars |
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 @@ | ||
../../provider/variables.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,6 @@ | ||
data "netapp-ontap_qos_policy" "qos_policy" { | ||
# required to know which system to interface with | ||
cx_profile_name = "cluster1" | ||
name = "test" | ||
svm_name = "terraform" | ||
} |
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 @@ | ||
../../provider/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 @@ | ||
../../provider/terraform.tfvars |
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 @@ | ||
../../provider/variables.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 @@ | ||
../../provider/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,9 @@ | ||
resource "netapp-ontap_qos_policies" "qos_policies" { | ||
# required to know which system to interface with | ||
cx_profile_name = "cluster1" | ||
name = "terraform2" | ||
svm_name = "terraform" | ||
fixed = { | ||
max_throughput_iops = 1 | ||
} | ||
} |
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 @@ | ||
../../provider/terraform.tfvars |
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 @@ | ||
../../provider/variables.tf |
Oops, something went wrong.