This module makes it easy to setup NetApp Volumes. It is designed to deploy Stroage Pool and Storage Volume(s). Creation of Storage Pool is optional. Module can create Storage Volme(s) in an existing storage pool.
This module is meant for use with Terraform 1.3+ and tested using Terraform 1.3+. If you find incompatibilities using Terraform >=1.3, please open an issue.
Current version is 0.X. Upgrade guides:
Functional examples are included in the examples directory. Basic usage of this module is as follows:
- Create a Storage Pool and Storage Volumes
module "netapp_pool_volume" {
source = "GoogleCloudPlatform/netapp-volumes/google"
version = "~> 0.3"
project_id = "test-project-id"
location = "us-central1"
storage_pool = {
create_pool = true
name = "test-pool"
size = "2048"
service_level = "PREMIUM"
ldap_enabled = false
network_name = "test-network"
labels = {
pool_env = "test"
}
description = "test pool"
}
storage_volumes = [
{
name = "test-volume-1"
share_name = "test-volume-1"
size = "100"
protocols = ["NFSV3"]
snapshot_policy = {
enabled = true
daily_schedule = {
snapshots_to_keep = 1
minute = 45
hour = 23
}
}
export_policy_rules = {
test = {
allowed_clients = "10.0.0.0/24,10.100.0.0/24"
access_type = "READ_WRITE"
nfsv3 = true
has_root_access = true
}
}
},
{
name = "test-volume-2"
share_name = "test-volume-2"
size = "200"
protocols = ["NFSV3"]
snapshot_policy = {
enabled = true
daily_schedule = {
snapshots_to_keep = 1
hour = 22
}
}
},
]
}
- Create storage volumes in an existing storage pool
module "volumes_only" {
source = "GoogleCloudPlatform/netapp-volumes/google"
version = "~> 0.1"
project_id = "my-project-id"
location = "us-central1"
# name of an existing storage pool
storage_pool = {
create_pool = false
name = "storage-pool-name"
}
storage_volumes = [
{
name = "test-volume-3"
share_name = "test-volume-3"
size = "100"
protocols = ["NFSV3"]
snapshot_policy = {
enabled = true
daily_schedule = {
snapshots_to_keep = 1
minute = 21
hour = 21
}
weekly_schedule = {
snapshots_to_keep = 1
minute = 1
hour = 1
day = "Monday"
}
}
export_policy_rules = {
test = {
allowed_clients = "10.0.0.0/24,10.100.0.0/24"
access_type = "READ_WRITE"
nfsv3 = true
has_root_access = true
}
}
},
]
depends_on = [
module.netapp_volumes,
]
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
common_labels | Common Labels as key value pairs. Applies to all the resources. If labels are provided in storege_pool or storage_volumes then they are merged with common labels before being applied to the resources | map(any) |
{} |
no |
location | Name of the location. Usually a region name, expect for some STANDARD service level pools which require a zone name | string |
n/a | yes |
project_id | The ID of the project in which the resource belongs | string |
n/a | yes |
storage_pool | Storage pool details | object({ |
n/a | yes |
storage_volumes | List of Storage Volumes | list(object({ |
n/a | yes |
Name | Description |
---|---|
storage_pool | Storage Pool created |
storage_volumes | Storage Volume(s) created |
In order to create Storage Pool set create_pool
to true
, provide values for name
, network_name
, service_level
and size
. Other fields are optional.
If you already have a Storage Pool created, set create_pool
to false
and provide name
of an existing Storage Pool.
Provide list of storage volumes to create. Each volume requires name
, size
, share_name
and protocols. Other fields are optional.
These sections describe requirements for using this module.
The following dependencies must be available:
- [Terraform][terraform] v1.3+
- [Terraform Provider for GCP][terraform-provider-gcp] plugin v5.15+
A service account with the following roles must be used to provision the resources of this module:
- Google Cloud NetApp Volumes Admin:
roles/netapp.admin
A project with the following APIs enabled must be used to host the resources of this module:
- Google Cloud NetApp Volumes API:
netapp.googleapis.com
The Project Factory module can be used to provision a project with the necessary APIs enabled.
Refer to the contribution guidelines for information on contributing to this module.
Please see our security disclosure process.