Skip to content

Commit

Permalink
Merge pull request #134 from NetApp/46-new-resource-storageflexcachef…
Browse files Browse the repository at this point in the history
…lexcaches

added flexcache resource, data source and data sources.
  • Loading branch information
wenjun666 authored Apr 5, 2024
2 parents 0870526 + 46c87f5 commit 887384a
Show file tree
Hide file tree
Showing 21 changed files with 2,128 additions and 9 deletions.
11 changes: 9 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,6 +19,8 @@ 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 Data Source:** `netapp-ontap_name_services_ldap_data_source` ([#26](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/26))
* **New Data Source:** `netapp-ontap_name_services_ldaps_data_source` ([#26](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/26))
* **New Data Source:** `netapp-ontap_protocols_san_lun-map_data_source` ([#14](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/14))
Expand All @@ -28,7 +30,12 @@ FEATURES:
* **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))
<<<<<<< HEAD
* **New Resource:** `netapp-ontap_storage_flexcache_resource` ([#46](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/46))
* **New Resource:** `netapp-protocols_san_lun-maps_resource` ([#13](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/13))
=======
* **New Resource:** `netapp-ontap_protocols_san_lun-maps_resource` ([#13](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/13))
>>>>>>> 08705260ad53b105d048877da271567bc286b2fb
* **New Resource:** `netapp-ontap_name_services_ldap_resource` ([#25](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/25))
* **New Resource:** `netapp-ontap_protocols_cifs_service_resource` ([#23](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/23))

Expand Down
92 changes: 92 additions & 0 deletions docs/data-sources/storage_flexcache_data_source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netapp-ontap_storage_flexcache_data_source Data Source - terraform-provider-netapp-ontap"
subcategory: "storage"
description: |-
Flexcache data source
---

# netapp-ontap_storage_flexcache_data_source (Data Source)

Retrieves the details of a flexcache.

### Related ONTAP commands
* volume flexcache show

## Example Usage
```terraform
data "netapp-ontap_storage_flexcache_data_source" "storage_flexcache" {
# required to know which system to interface with
cx_profile_name = "cluster1"
name = "fc1"
svm_name = "automation"
}
```


<!-- 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


118 changes: 118 additions & 0 deletions docs/data-sources/storage_flexcaches_data_source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netapp-ontap_storage_flexcaches_data_source Data Source - terraform-provider-netapp-ontap"
subcategory: "storage"
description: |-
Flexcaches data source
---

# netapp-ontap_storage_flexcaches_data_source (Data Source)

Retrieves the details of one or more flexcaches by filter.

### Related ONTAP commands
* volume flexcache show

## Example Usage
data "netapp-ontap_storage_flexcaches_data_source" "storage_flexcache" {
# required to know which system to interface with
cx_profile_name = "cluster1"
filter = {
name = "fc*"
svm_name = "automation"
}
}
```
<!-- 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
- `storage_flexcaches` (Attributes List) (see [below for nested schema](#nestedatt--storage_flexcaches))
<a id="nestedatt--filter"></a>
### Nested Schema for `filter`
Optional:
- `name` (String) StorageFlexcache name
- `svm_name` (String) StorageFlexcache svm name
<a id="nestedatt--storage_flexcaches"></a>
### Nested Schema for `storage_flexcaches`
Required:
- `cx_profile_name` (String) Connection profile name
- `name` (String) The name of the flexcache volume to manage
- `svm_name` (String) Name of the svm to use
Read-Only:
- `aggregates` (Attributes Set) (see [below for nested schema](#nestedatt--storage_flexcaches--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--storage_flexcaches--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--storage_flexcaches--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--storage_flexcaches--aggregates"></a>
### Nested Schema for `storage_flexcaches.aggregates`
Read-Only:
- `id` (String) ID of the aggregate
- `name` (String) Name of the aggregate
<a id="nestedatt--storage_flexcaches--guarantee"></a>
### Nested Schema for `storage_flexcaches.guarantee`
Read-Only:
- `type` (String) The type of the guarantee
<a id="nestedatt--storage_flexcaches--origins"></a>
### Nested Schema for `storage_flexcaches.origins`
Required:
- `svm` (Attributes) Origin volume SVM (see [below for nested schema](#nestedatt--storage_flexcaches--origins--svm))
- `volume` (Attributes) Origin volume (see [below for nested schema](#nestedatt--storage_flexcaches--origins--volume))
<a id="nestedatt--storage_flexcaches--origins--svm"></a>
### Nested Schema for `storage_flexcaches.origins.svm`
Read-Only:
- `id` (String) ID of the origin volume SVM
- `name` (String) Name of the origin volume SVM
<a id="nestedatt--storage_flexcaches--origins--volume"></a>
### Nested Schema for `storage_flexcaches.origins.volume`
Read-Only:
- `id` (String) ID of the origin volume
- `name` (String) Name of the origin volume
118 changes: 118 additions & 0 deletions docs/resources/storage_flexcache_resource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
# 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

### Related ONTAP commands
* volume flexcache create
* volume flexcache prepopulate start

## Example Usage
resource "netapp-ontap_storage_flexcache_resource" "storage_flexcache" {
# required to know which system to interface with
cx_profile_name = "cluster1"
name = "fc1"
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"
}
]
}
```
<!-- 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"
}
11 changes: 11 additions & 0 deletions examples/data-sources/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
}
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"
}
}
Loading

0 comments on commit 887384a

Please sign in to comment.