Skip to content

Commit 461275b

Browse files
committed
Updated the README to match the variables.tf file; Added port 443 to the security group.
1 parent 7cdbcb7 commit 461275b

File tree

2 files changed

+43
-6
lines changed

2 files changed

+43
-6
lines changed

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

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* [What to expect](#what-to-expect)
66
* [Prerequisites](#prerequisites)
77
* [Usage](#usage)
8+
* [Terraform Overview](#terraform-overview)
89
* [Author Information](#author-information)
910
* [License](#license)
1011

@@ -101,7 +102,7 @@ git clone https://github.com/NetApp/FSx-ONTAP-samples-scripts.git
101102

102103
### 2. Navigate to the directory
103104
```shell
104-
cd Terraform/fsx-ontap-filesystem/standalone-module
105+
cd FSx-ONTAP-samples-scripts/Terraform/deploy-fsx-ontap/standalone-module
105106
```
106107

107108
### 3. Initialize Terraform
@@ -137,35 +138,60 @@ You can see that Terraform recognizes the modules required by our configuration:
137138
preferences and save the file. This will ensure that the Terraform code deploys resources according to your specifications.
138139
139140
**Make sure to replace the values with ones that match your AWS environment and needs.**
141+
Modify the remaining optional variables (e.g. defining AD) in the **`main.tf`** file and remove commenting
142+
where needed according to the explanations in-line.
140143
141-
- Modify the remaining optional variables in the **`main.tf`** file and remove commenting where needed according to the explanations in-line.
144+
### 5. Update Security Group
145+
A default security group is defined in the "security_groups.tf" file. At the top of
146+
that file you can see where you can specify either a CIDR block or a security group ID
147+
to allow access to the FSxN file system. Do not specify both, as it will cause
148+
the terraform deployment to fail.
142149
143-
### 5. Create a Terraform plan
150+
If you decide you don't want to use the security group, you can either delete the security_groups.tf file,
151+
or just rename it such that it doesn't end with ".tf" (e.g. security_groups.tf.kep). You will also need
152+
to update the `security_group_ids = [aws_security_group.fsx_sg.id]` line in the main.tf file
153+
to reference the security group(s) you want to use.
154+
155+
### 6. Create a Terraform plan
144156
Run the following command to create an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure:
145157
```shell
146158
terraform plan
147159
```
148160
Ensure that the proposed changes match what you expected before you apply the changes!
149161
150-
### 6. Apply the Terraform plan
162+
### 7. Apply the Terraform plan
151163
Run the following command to execute the Terrafom code and apply the changes proposed in the `plan` step:
152164
```shell
153165
terraform apply
154166
```
155167
156168
<!-- BEGIN_TF_DOCS -->
157169
158-
## Repository Overview
170+
## Terraform Overview
159171
160172
### Providers
161173
162174
| Name | Version |
163175
|------|---------|
164176
| aws | 5.25.0 |
165-
| aws.secrets | 5.25.0 |
166177
167178
### Inputs
168179
180+
<<<<<<< HEAD
181+
| Name | Description | Type | Default | Must be changed |
182+
|------|-------------|------|---------|-----------------|
183+
| aws_secretsmanager_region | The AWS region where the secret is stored. | `string` | `"us-east-2"` | No |
184+
| fsx_capacity_size_gb | The storage capacity (GiB) of the FSxN file system. Valid values between 1024 and 196608. | `number` | `1024` | No |
185+
| fsx_deploy_type | The filesystem deployment type. Supports MULTI_AZ_1 and SINGLE_AZ_1 | `string` | `"MULTI_AZ_1"` | No |
186+
| fsx_name | The deployed filesystem name | `string` | `"terraform-fsxn"` | No |
187+
| fsx_region | The AWS region where the FSxN file system to be deployed. | `string` | `"us-west-2"` | No |
188+
| fsx_secret_name | The name of the AWS SecretManager secret that holds the ONTAP administrative password for the fsxadmin user that you can use to administer your file system using the ONTAP CLI and REST API. | `string` | `"fsx_secret"` | Yes |
189+
| fsx_subnets | A list of IDs for the subnets that the file system will be accessible from. Up to 2 subnets can be provided. | `map(any)` | <pre>{<br> "primarysub": "subnet-22222222",<br> "secondarysub": "subnet-22222222"<br>}</pre> | Yes |
190+
| fsx_tput_in_MBps | The throughput capacity (in MBps) for the file system. Valid values are 128, 256, 512, 1024, 2048, and 4096. | `number` | `128` | No |
191+
| svm_name | The name of the Storage Virtual Machine | `string` | `"first_svm"` | No |
192+
| vol_info | Details for the volume creation | `map(any)` | <pre>{<br> "cooling_period": 31,<br> "efficiency": true,<br> "junction_path": "/vol1",<br> "size_mg": 1024,<br> "tier_policy_name": "AUTO",<br> "vol_name": "vol1"<br>}</pre> | No |
193+
| vpc_id | The ID of the VPC in which the FSxN fikesystem should be deployed | `string` | `"vpc-11111111"` | Yes |
194+
=======
169195
| Name | Description | Type | Default | Required |
170196
|------|-------------|------|---------|:--------:|
171197
| aws_secretsmanager_region | The AWS region where the secret is stored. Can be different from the region where the FSxN file system is deployed. | `string` | `"us-east-2"` | no |
@@ -179,6 +205,7 @@ terraform apply
179205
| svm_name | The name of the Storage Virtual Machine | `string` | `"first_svm"` | no |
180206
| vol_info | Details for the volume creation | `map(any)` | <pre>{<br> "cooling_period": 31,<br> "efficiency": true,<br> "junction_path": "/vol1",<br> "size_mg": 1024,<br> "tier_policy_name": "AUTO",<br> "vol_name": "vol1"<br>}</pre> | no |
181207
| vpc_id | The ID of the VPC in which the FSxN fikesystem should be deployed | `string` | `"vpc-11111111"` | no |
208+
>>>>>>> db6ff98f8c57b29a0b7cfbeb1257e3580918651f
182209
183210
### Outputs
184211

Terraform/deploy-fsx-ontap/standalone-module/security_groups.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,16 @@ resource "aws_vpc_security_group_ingress_rule" "ssh" {
241241
ip_protocol = "tcp"
242242
}
243243

244+
resource "aws_vpc_security_group_ingress_rule" "s3_API" {
245+
security_group_id = aws_security_group.fsx_sg.id
246+
description = "Allow the s3 and ONTAP API traffic"
247+
cidr_ipv4 = (local.ciddr_block != "" ? local.ciddr_block : null)
248+
referenced_security_group_id = (local.security_group_id != "" ? local.security_group_id : null)
249+
from_port = 443
250+
to_port = 443
251+
ip_protocol = "tcp"
252+
}
253+
244254
resource "aws_vpc_security_group_egress_rule" "allow_all_traffic" {
245255
security_group_id = aws_security_group.fsx_sg.id
246256
cidr_ipv4 = "0.0.0.0/0" // Allow all output traffic.

0 commit comments

Comments
 (0)