Skip to content

Commit d90e53e

Browse files
committed
Modified based on Gen 2 support.
1 parent 4ea028e commit d90e53e

File tree

2 files changed

+38
-72
lines changed

2 files changed

+38
-72
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sort:
2+
enabled: false
3+
4+
settings:
5+
default: true
6+
description: true
7+
required: false

Terraform/deploy-fsx-ontap/module/README.md

Lines changed: 31 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
This is a Terraform module which creates an FSx for NetApp ONTAP file system in a multi-AZ fashion, including an SVM, a Security-Group and a FlexVolume in that file system, using AWS Terraform provider.
33
This repo should be sourced as a terraform module, and does not need to be cloned locally!
44
Follow the instructions below to use this sample in your environment.
5-
> [!NOTE]
6-
> This module does not support scale-out! One ha pair per deployment.
75

86
## Table of Contents
97
* [Introduction](#introduction)
@@ -35,22 +33,24 @@ Calling this terraform module will result the following:
3533
- **Ingress** allow https port 443
3634
- **Egress** allow all traffic
3735

38-
* Two new AWS secrets. One that contains the fsxadmin password and another that contains the SVM admin password.
36+
* Create two new AWS secrets. One that contains the fsxadmin password and another that contains the SVM admin password.
3937

40-
* Create a new FSx for Netapp ONTAP file-system in your AWS account named "_terraform-fsxn_". The file-system will be created with the following configuration parameters:
38+
* Create a new FSx for Netapp ONTAP file-system. Much of the configuration has default values, but can be modified to your preference by providing your own values in the module block. The default configuration includes:
4139
* 1024Gb of storage capacity
42-
* Multi AZ deployment type
43-
* 128Mbps of throughput capacity
44-
45-
* Create a Storage Virtual Maching (SVM) in this new file-system named "_first_svm_"
46-
47-
* Create a new FlexVol volume in this SVM named "_vol1_" with the following configuration parameters:
48-
* Size of 1024Mb
49-
* Storage efficiencies mechanism enabled
50-
* Auto tiering policy with 31 cooling days
40+
* Generation 1 Multi AZ deployment type
41+
* 128Mbps of throughput capacity
42+
* 1 HA pair
43+
* 1 Storage Virtual Machine (SVM)
44+
* 1 FlexVol volume with the following configuration parameters:
45+
* Size of 2TB - Thin provisioned
46+
* Junction path of /vol1
47+
* Security style of UNIX
48+
* Storage efficiencies enabled
49+
* Auto tiering policy with 31 cooling days
50+
* post-delete backup disabled
5151

5252
> [!NOTE]
53-
> All of the above configuration parameters can be modified for your preference by assigning your own values in the module block!
53+
> All of the above configuration parameters can be modified for your preference by assigning your own values in the module block! See below for more information.
5454
5555
## Prerequisites
5656

@@ -113,7 +113,7 @@ terraform {
113113
required_providers {
114114
aws = {
115115
source = "hashicorp/aws"
116-
version = "5.25"
116+
version >= "5.25"
117117
}
118118
}
119119
}
@@ -126,78 +126,37 @@ provider "aws" {
126126
### Reference this module
127127

128128
Add the following module block to your local `main.tf` file.
129-
Make sure to replace all values within `< >` with your own variables.
129+
Of course changing the subnets, route_table_ids, and other variables to match your environment.
130+
You will find below a complete list of all the parameters that can be passed to the module block.
130131

131132
```hcl
132133
module "fsxontap" {
133-
source = "github.com/Netapp/FSx-ONTAP-samples-scripts/Terraform/deploy-fsx-ontap/module"
134+
source = "/home/ckeith/DevelopersAdocacy/FSx-ONTAP-samples-scripts/Terraform/deploy-fsx-ontap/module"
134135
135-
vpc_id = "<YOUR-VPC-ID>"
136-
fsx_subnets = {
137-
primarysub = "<YOUR-PRIMARY-SUBNET>"
138-
secondarysub = "<YOUR-SECONDAY-SUBNET>"
139-
}
140-
create_sg = true // true to create Security Group for the Fs / false otherwise
141-
cidr_for_sg = "<YOUR-CIDR-BLOCK>"
142-
fsx_secret_name = "<YOUR_SECRET>" // The name of a secret in AWS Secrets Manager that contains the FSxN admin password.
143-
tags = {
144-
Terraform = "true"
145-
Environment = "dev"
146-
}
147-
}
148-
```
136+
name = "Development"
149137
150-
> [!NOTE]
151-
> To Override default values assigned to other variables in this module, add them to this source block as well. The above source block includes the minimum requirements only.
138+
deployment_type = "MULTI_AZ_2"
139+
ha_pairs = 1
140+
throughput_in_MBps = 384
152141
153-
> [!NOTE]
154-
> The default deployment type is: MULTI_AZ_1. For SINGLE AZ deployment, set the `fsx_deploy_type` variable to SINGLE_AZ_1 in the module block.
155-
156-
Please read the vriables descriptions in `variables.tf` file for more information regarding the variables passed to the module block.
157-
158-
### Example main.tf file
159-
160-
For a quick and easy start, copy and paste the below example to your main.tf file and modify the variables with your enviroonment's values.
161-
162-
```hcl
163-
terraform {
164-
required_providers {
165-
aws = {
166-
source = "hashicorp/aws"
167-
version = "5.25"
142+
subnets = {
143+
"primarysub" = "subnet-11111111"
144+
"secondarysub" = "subnet-22222222"
168145
}
169-
}
170-
}
171-
172-
provider "aws" {
173-
region = "us-west-2"
174-
}
175-
176-
177-
module "fsxontap" {
178-
source = "github.com/Netapp/FSx-ONTAP-samples-scripts/Terraform/deploy-fsx-ontap/module"
146+
route_table_ids = ["rtb-abcd1234"]
179147
180-
name = "fsxontap"
181-
182-
vpc_id = "vpc-111111111"
183-
fsx_subnets = {
184-
"primarysub" = "subnet-11111111"
185-
"secondarysub" = "subnet-2222222"
186-
}
187148
create_sg = true
149+
security_group_name_prefix = "fsxn-sg"
150+
vpc_id = "vpc-88888888"
188151
cidr_for_sg = "10.0.0.0/8"
189-
fsx_secret_name = "fsx_secret"
190-
route_table_ids = ["rtb-111111"]
191-
tags = {
192-
Terraform = "true"
193-
Environment = "dev"
194-
}
195152
}
196153
```
197154

198155
### Install the module
199156

200-
Whenever you add a new module to a configuration, Terraform must install the module before it can be used. Both the `terraform get` and `terraform init` commands will install and update modules. The `terraform init` command will also initialize backends and install plugins.
157+
Whenever you add a new module to a configuration, Terraform must install the module before
158+
it can be used. Both the `terraform get` and `terraform init` commands will install and
159+
update modules. The `terraform init` command will also initialize backends and install plugins.
201160

202161
Command:
203162
```shell

0 commit comments

Comments
 (0)