Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added flexcache resource, data source and data sources. #134

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7c8f83a
added flexcache resource, data source and data sources.
wenjun666 Feb 15, 2024
1f1ba5b
fix build fails.
wenjun666 Feb 15, 2024
d9738d4
pull intergration/main
wenjun666 Feb 23, 2024
adbd057
added missing files
wenjun666 Feb 23, 2024
41d43ff
Add edited files.
wenjun666 Feb 23, 2024
6c25289
fix build
wenjun666 Feb 23, 2024
462679c
fix flexcaches data source.
wenjun666 Feb 24, 2024
9ef5dc7
Lint.
wenjun666 Feb 28, 2024
a100454
Merge branch 'integration/main' of https://github.com/NetApp/terrafor…
wenjun666 Mar 1, 2024
87c8ffe
added import.
wenjun666 Mar 11, 2024
8bc4911
Edited docs for flexcache data source and resource
wenjun666 Mar 26, 2024
4397187
Added test for import in acc test.
wenjun666 Mar 26, 2024
1272f53
Edit generate_docs.py
wenjun666 Mar 26, 2024
9293dbc
edit flexcache acc test.
wenjun666 Apr 1, 2024
8825b54
edit flexcache example.
wenjun666 Apr 1, 2024
0eda414
edit flexcache acc test.
wenjun666 Apr 2, 2024
7826854
edit acc test.
wenjun666 Apr 2, 2024
a6465a4
edit acc test.
wenjun666 Apr 2, 2024
6990201
resolve conflict.
wenjun666 Apr 2, 2024
af2bf27
Edit test.
wenjun666 Apr 2, 2024
c2abe50
edit acc test.
wenjun666 Apr 2, 2024
f509bac
added id in read function.
wenjun666 Apr 2, 2024
f02e01c
edit acc test and reportcard.yml
wenjun666 Apr 2, 2024
db763ba
edit acc test.
wenjun666 Apr 2, 2024
1d25ce8
Edited examples/resources/netapp-ontap_storage_flexcache/resource.tf
wenjun666 Apr 3, 2024
4800da6
resolve conflict.
wenjun666 Apr 4, 2024
46c87f5
added if statements for size and size_unit
wenjun666 Apr 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ FEATURES:
* **New Data Source:** `netapp_ontap_cluster_peers_data_source` ([#50](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/50))
* **New Data Source:** `netapp-ontap_protocols_cifs_local_user_data_source` ([#55](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/55))
* **New Data Source:** `netapp-ontap_protocols_cifs_local_users_data_source` ([#55](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/55))
* **New Data Source** `netapp-ontap_security_account_data_source` ([#22](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/22))
* **New Data Source** `netapp-ontap_security_accounts_data_source` ([#22](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/22))
* **New Data Source:** `netapp-ontap_security_account_data_source` ([#22](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/22))
* **New Data Source:** `netapp-ontap_security_accounts_data_source` ([#22](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/22))
* **New Data Source:** `netapp-ontap_protocols_cifs_user_group_privilege_data_source` ([#57](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/57))
* **New Data Source:** `netapp-ontap_protocols_cifs_user_group_privileges_data_source` ([#57](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/57))
* **New Data Source:** `netapp-ontap_storage_lun_data_source` ([#12](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/12))
Expand All @@ -19,11 +19,14 @@ FEATURES:
* **New Data Source:** `netapp-ontap_svm_peers_data_source` ([#52](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/52))
* **New Data Source:** `netapp_ontap_protocols_cifs_server_data_source` ([#24](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/24))
* **New Data Source:** `netapp_ontap_protocols_cifs_servers_data_source` ([#24](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/24))
* **New Data Source:** `netapp_ontap_storage_flexcache_data_source` ([#47](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/47))
* **New Data Source:** `netapp_ontap_storage_flexcaches_data_source` ([#47](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/47))
* **New Resource:** `netapp-ontap_protocols_cifs_local_group_resource` ([#53](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/53))
* **New Resource:** `netapp-ontap_protocols_cifs_local_user_resource` ([#56](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/56))
* **New Resource:** `netapp-ontap_protocols_cifs_user_group_privilege_resource` ([#58](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/58))
* **New Resource:** `netapp-ontap_svm_peers_resource` ([#51](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/51))
* **New Resource:** `netapp-ontap_protocols_cifs_user_group_member_resource` ([#123](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/123))
* **New Resource:** `netapp-ontap_storage_flexcache_resource` ([#46](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/46))

ENHANCEMENTS:
* **netapp-ontap_protocols_nfs_export_policy_resource**: Add support for import ([#34](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/34))
Expand Down
80 changes: 80 additions & 0 deletions docs/data-sources/storage_flexcache_data_source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netapp-ontap_storage_flexcache_data_source Data Source - terraform-provider-netapp-ontap"
subcategory: ""
wenjun666 marked this conversation as resolved.
Show resolved Hide resolved
description: |-
Flexcache resource
---

# netapp-ontap_storage_flexcache_data_source (Data Source)

Flexcache resource
wenjun666 marked this conversation as resolved.
Show resolved Hide resolved

wenjun666 marked this conversation as resolved.
Show resolved Hide resolved


<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `cx_profile_name` (String) Connection profile name
- `name` (String) The name of the flexcache volume
- `svm_name` (String) Name of the svm to use

### Read-Only

- `aggregates` (Attributes Set) (see [below for nested schema](#nestedatt--aggregates))
- `constituents_per_aggregate` (Number) The number of constituents per aggregate
- `dr_cache` (Boolean) The state of the dr cache
- `global_file_locking_enabled` (Boolean) The state of the global file locking
- `guarantee` (Attributes) The guarantee of the volume (see [below for nested schema](#nestedatt--guarantee))
- `id` (String) The UUID of the flexcache volume
- `junction_path` (String) Name of the junction path
- `origins` (Attributes Set) Set of the origin volumes (see [below for nested schema](#nestedatt--origins))
- `size` (Number) The size of the flexcache volume
- `size_unit` (String) The unit used to interpret the size parameter
- `use_tiered_aggregate` (Boolean) The state of the use tiered aggregates

<a id="nestedatt--aggregates"></a>
### Nested Schema for `aggregates`

Read-Only:

- `id` (String) UUID of the aggregate
- `name` (String) Name of the aggregate


<a id="nestedatt--guarantee"></a>
### Nested Schema for `guarantee`

Read-Only:

- `type` (String) The type of guarantee


<a id="nestedatt--origins"></a>
### Nested Schema for `origins`

Required:

- `svm` (Attributes) Origin volume SVM (see [below for nested schema](#nestedatt--origins--svm))
- `volume` (Attributes) Origin volume (see [below for nested schema](#nestedatt--origins--volume))

<a id="nestedatt--origins--svm"></a>
### Nested Schema for `origins.svm`

Read-Only:

- `id` (String) ID of the origin volume
- `name` (String) Name of the origin volume


<a id="nestedatt--origins--volume"></a>
### Nested Schema for `origins.volume`

Read-Only:

- `id` (String) ID of the origin volume
- `name` (String) Name of the origin volume


80 changes: 80 additions & 0 deletions docs/data-sources/storage_flexcaches_data_source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netapp-ontap_storage_flexcaches_data_source Data Source - terraform-provider-netapp-ontap"
subcategory: ""
wenjun666 marked this conversation as resolved.
Show resolved Hide resolved
description: |-
Flexcache resource
---

# netapp-ontap_storage_flexcaches_data_source (Data Source)

Flexcache resource

wenjun666 marked this conversation as resolved.
Show resolved Hide resolved
wenjun666 marked this conversation as resolved.
Show resolved Hide resolved


<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `cx_profile_name` (String) Connection profile name
- `name` (String) The name of the flexcache volume
- `svm_name` (String) Name of the svm to use

### Read-Only

- `aggregates` (Attributes Set) (see [below for nested schema](#nestedatt--aggregates))
- `constituents_per_aggregate` (Number) The number of constituents per aggregate
- `dr_cache` (Boolean) The state of the dr cache
- `global_file_locking_enabled` (Boolean) The state of the global file locking
- `guarantee` (Attributes) The guarantee of the volume (see [below for nested schema](#nestedatt--guarantee))
- `id` (String) The UUID of the flexcache volume
- `junction_path` (String) Name of the junction path
- `origins` (Attributes Set) Set of the origin volumes (see [below for nested schema](#nestedatt--origins))
- `size` (Number) The size of the flexcache volume
- `size_unit` (String) The unit used to interpret the size parameter
- `use_tiered_aggregate` (Boolean) The state of the use tiered aggregates

<a id="nestedatt--aggregates"></a>
### Nested Schema for `aggregates`

Read-Only:

- `id` (String) UUID of the aggregate
- `name` (String) Name of the aggregate


<a id="nestedatt--guarantee"></a>
### Nested Schema for `guarantee`

Read-Only:

- `type` (String) The type of guarantee


<a id="nestedatt--origins"></a>
### Nested Schema for `origins`

Required:

- `svm` (Attributes) Origin volume SVM (see [below for nested schema](#nestedatt--origins--svm))
- `volume` (Attributes) Origin volume (see [below for nested schema](#nestedatt--origins--volume))

<a id="nestedatt--origins--svm"></a>
### Nested Schema for `origins.svm`

Read-Only:

- `id` (String) ID of the origin volume
- `name` (String) Name of the origin volume


<a id="nestedatt--origins--volume"></a>
### Nested Schema for `origins.volume`

Read-Only:

- `id` (String) ID of the origin volume
- `name` (String) Name of the origin volume


84 changes: 84 additions & 0 deletions docs/resources/storage_flexcache_resource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netapp-ontap_storage_flexcache_resource Resource - terraform-provider-netapp-ontap"
subcategory: "storage"
description: |-
Flexcache resource
---

# netapp-ontap_storage_flexcache_resource (Resource)

Flexcache resource

wenjun666 marked this conversation as resolved.
Show resolved Hide resolved

wenjun666 marked this conversation as resolved.
Show resolved Hide resolved

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `cx_profile_name` (String) Connection profile name
- `name` (String) The name of the flexcache volume to manage
- `origins` (Attributes Set) Set of the origin volumes (see [below for nested schema](#nestedatt--origins))
- `svm_name` (String) Name of the svm to use

### Optional

- `aggregates` (Attributes Set) Set of the aggregates to use (see [below for nested schema](#nestedatt--aggregates))
- `constituents_per_aggregate` (Number) The number of constituents per aggregate
- `dr_cache` (Boolean) The state of the dr cache
- `global_file_locking_enabled` (Boolean) The state of the global file locking
- `guarantee` (Attributes) The guarantee of the volume (see [below for nested schema](#nestedatt--guarantee))
- `junction_path` (String) Name of the junction path
- `size` (Number) The size of the flexcache volume
- `size_unit` (String) The unit used to interpret the size parameter
- `use_tiered_aggregate` (Boolean) The state of the use tiered aggregates

### Read-Only

- `id` (String) The ID of the volume

<a id="nestedatt--origins"></a>
### Nested Schema for `origins`

Required:

- `svm` (Attributes) origin volume SVM (see [below for nested schema](#nestedatt--origins--svm))
- `volume` (Attributes) origin volume (see [below for nested schema](#nestedatt--origins--volume))

<a id="nestedatt--origins--svm"></a>
### Nested Schema for `origins.svm`

Optional:

- `id` (String) ID of the origin volume SVM
- `name` (String) Name of the origin volume SVM


<a id="nestedatt--origins--volume"></a>
### Nested Schema for `origins.volume`

Optional:

- `id` (String) ID of the origin volume
- `name` (String) Name of the origin volume



<a id="nestedatt--aggregates"></a>
### Nested Schema for `aggregates`

Optional:

- `id` (String) UUID of the aggregate
- `name` (String) Name of the aggregate


<a id="nestedatt--guarantee"></a>
### Nested Schema for `guarantee`

Optional:

- `type` (String) The type of guarantee


Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
data "netapp-ontap_storage_flexcache_data_source" "storage_flexcache" {
# required to know which system to interface with
cx_profile_name = "cluster5"
name = "fc5"
svm_name = "automation"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Terraform will prompt for values, unless a tfvars file is present.
variable "username" {
type = string
}
variable "password" {
type = string
sensitive = true
}
variable "validate_certs" {
type = bool
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
data "netapp-ontap_storage_flexcaches_data_source" "storage_flexcache" {
# required to know which system to interface with
cx_profile_name = "cluster4"
filter = {
name = "f*"
svm_name = "automation"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Terraform will prompt for values, unless a tfvars file is present.
variable "username" {
type = string
}
variable "password" {
type = string
sensitive = true
}
variable "validate_certs" {
type = bool
}
28 changes: 28 additions & 0 deletions examples/resources/netapp-ontap_storage_flexcache/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
resource "netapp-ontap_storage_flexcache_resource" "storage_flexcache" {
# required to know which system to interface with
cx_profile_name = "cluster5"
name = "fc10"
svm_name = "automation"
origins = [
{
volume = {
name = "vol1"
},
svm = {
name = "automation"
}
}
]
size = 400
size_unit = "mb"
guarantee = {
type = "none"
}
dr_cache = false
global_file_locking_enabled = false
aggregates = [
{
name = "aggr1"
}
]
}
11 changes: 11 additions & 0 deletions examples/resources/netapp-ontap_storage_flexcache/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Terraform will prompt for values, unless a tfvars file is present.
variable "username" {
type = string
}
variable "password" {
type = string
sensitive = true
}
variable "validate_certs" {
type = bool
}
Loading
Loading