From a167bbf07cc37d57f5ae4640104b428bed3ca7bc Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Tue, 17 Feb 2026 18:22:56 -0600 Subject: [PATCH 01/17] Updated to make the prerequisites more clear. --- .../Workload-Factory-API-Samples/README.md | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/Management-Utilities/Workload-Factory-API-Samples/README.md b/Management-Utilities/Workload-Factory-API-Samples/README.md index f147d32..c9c804f 100644 --- a/Management-Utilities/Workload-Factory-API-Samples/README.md +++ b/Management-Utilities/Workload-Factory-API-Samples/README.md @@ -1,25 +1,34 @@ # Workload Factory API Samples -The idea behind this folder is to show examples of how to use the [BlueXP Workload Factory APIs](https://console.workloads.netapp.com/api-doc). -Not every API is covered, but the ones required to get you started (get a refresh token, get the BlueXP accountID, -get BlueXP credentials ID) are included. Once you have the information provided from these APIs are ready to start +The idea behind this folder is to show examples of how to use the [Workload Factory APIs](https://console.workloads.netapp.com/api-doc). +Not every API is covered, but the ones required to get you started (i.e. get a refresh token, get the BlueXP accountID, +get BlueXP credentials ID) are included. Once you have the information provided from these APIs you are ready to start calling the others. While these examples are implemented as bash shell scripts you should be able to translate them to the programming language that you prefer, such as Python, Go, or JavaScript. -Note that all these scripts depend on the [wf_utils](wf_utils) file that contains common functions used by all the -scripts. One function in particular, `get_token()`, is used to get an authentication token from the BlueXP Workload -Factory API. So, if you copy just some of the files from this repository, make sure to copy the `wf_utils` file as well. +You authenticate to the Workload Factory APIs with an "Bearer Token." You generate a bearer token +by running a specific API using your "Refresh Token." Instructions on how to obtain your "Refresh Token" and generate an bearer token can be found +in the [NetApp Console documentation](https://docs.netapp.com/us-en/bluexp-automation/platform/create_user_token.html#1-generate-a-netapp-refresh-token). +Note that the bearer tokens expires after 24 hours whereas the Refresh Token does not expire until you revoke from the NetApp Console. + +Also note that all these scripts depend on the [wf_utils](wf_utils) file that contains common functions used by all of them. +So, if you copy just one of these scripts, make sure to also copy the `wf_utils` file as well. + +To make it easier to run the scripts, a `get_token()` function is included in the `wf_utils` file +that retrieves an bearer token for you. So, you don't have to worry about manually generating an bearer token +everyday instead, you just pass the "Refresh Token" to the scripts, they will call the `get_token()` function and +generate an bearer token for you. ## Prerequisites To run these scripts, you need to have the following prerequisites: -- A bash shell. +- A NetApp Console refresh token. You can generate one by visiting [Refresh Token Generator](https://services.cloud.netapp.com/refresh-token) page and following the instructions there. +- A bash shell. If you want to run from a Windows environment, you can use the Windows Subsystem for Linux (WSL). - The `curl` command-line tool installed. - The `jq` command-line JSON processor installed. You can install it using your package manager, e.g., `apt-get install jq` on Debian/Ubuntu or `brew install jq` on macOS. ## Notes: - All scripts allow you to set environment variables to pass options instead of having to use the -command line options. For example, instead of using the `-t` option to pass the -[BlueXP Refresh Token](https://docs.netapp.com/us-en/bluexp-automation/platform/create_user_token.html#1-generate-a-netapp-refresh-token), +command line options. For example, instead of using the `-t` option to pass the Refresh Token you can set the `REFRESH_TOKEN` environment variable. - All scripts accept the `-h` option to display the help message, which includes the available options and their descriptions. From 39d9b112f6cefd95f162b1aad5431018a096f186 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Tue, 17 Feb 2026 18:35:07 -0600 Subject: [PATCH 02/17] Updated to make the prerequisites more clear. --- .../Workload-Factory-API-Samples/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Management-Utilities/Workload-Factory-API-Samples/README.md b/Management-Utilities/Workload-Factory-API-Samples/README.md index c9c804f..9e6411e 100644 --- a/Management-Utilities/Workload-Factory-API-Samples/README.md +++ b/Management-Utilities/Workload-Factory-API-Samples/README.md @@ -1,23 +1,23 @@ # Workload Factory API Samples The idea behind this folder is to show examples of how to use the [Workload Factory APIs](https://console.workloads.netapp.com/api-doc). -Not every API is covered, but the ones required to get you started (i.e. get a refresh token, get the BlueXP accountID, +Not every API is covered, but the ones required to get you started (i.e. get a bearer token, get the BlueXP accountID, get BlueXP credentials ID) are included. Once you have the information provided from these APIs you are ready to start calling the others. While these examples are implemented as bash shell scripts you should be able to translate them to the programming language that you prefer, such as Python, Go, or JavaScript. -You authenticate to the Workload Factory APIs with an "Bearer Token." You generate a bearer token +You authenticate to the Workload Factory APIs with a "Bearer Token." You generate a bearer token by running a specific API using your "Refresh Token." Instructions on how to obtain your "Refresh Token" and generate an bearer token can be found in the [NetApp Console documentation](https://docs.netapp.com/us-en/bluexp-automation/platform/create_user_token.html#1-generate-a-netapp-refresh-token). -Note that the bearer tokens expires after 24 hours whereas the Refresh Token does not expire until you revoke from the NetApp Console. +Note that a bearer token expires after 24 hours whereas the Refresh Token does not expire until you revoke it from the NetApp Console. Also note that all these scripts depend on the [wf_utils](wf_utils) file that contains common functions used by all of them. So, if you copy just one of these scripts, make sure to also copy the `wf_utils` file as well. To make it easier to run the scripts, a `get_token()` function is included in the `wf_utils` file -that retrieves an bearer token for you. So, you don't have to worry about manually generating an bearer token +that retrieves a bearer token for you. So, you don't have to worry about manually generating a bearer token everyday instead, you just pass the "Refresh Token" to the scripts, they will call the `get_token()` function and -generate an bearer token for you. +generate a bearer token for you. ## Prerequisites To run these scripts, you need to have the following prerequisites: @@ -33,7 +33,7 @@ you can set the `REFRESH_TOKEN` environment variable. - All scripts accept the `-h` option to display the help message, which includes the available options and their descriptions. -Hopefully with these samples you'll be able to create your own scripts that use any the Workload Factory APIs. +Hopefully with these samples you'll be able to create your own scripts that use any of the Workload Factory APIs. If you do create a new script, please consider contributing it back to this repository so that others can benefit from it. ## Available Scripts From e2c1fb97b54cff6d9b816d0d3574272adae71151 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Tue, 17 Feb 2026 18:41:00 -0600 Subject: [PATCH 03/17] Reorganized the IaC directories --- .../Ansible}/README.md | 0 .../Ansible}/fsx_inventory_report/README.md | 0 .../fsx_inventory_report/generate_report.yaml | 0 .../fsx_inventory_report/get_fsxn_regions.yaml | 0 .../fsx_inventory_report/process_region.yaml | 0 .../Ansible}/snapmirror_report/README.md | 0 .../Ansible}/snapmirror_report/generate_report.yaml | 0 .../snapmirror_report/get_fsxn_regions.yaml | 0 .../Ansible}/snapmirror_report/process_region.yaml | 0 .../NetApp-FSxN-Custom-Resources-Samples/README.md | 0 .../create_clone.yaml | 0 .../create_export_policy.yaml | 0 .../create_sm_with_peering.yaml | 0 .../create_sm_without_peering.yaml | 0 .../create_snapshot.yaml | 0 .../create_volume.yaml | 0 .../scripts/README.md | 0 .../scripts/activate_extensions | 0 .../scripts/createClone.py | 0 .../scripts/create_SM_relationship | 0 .../scripts/create_clone | 0 .../scripts/create_export_policy | 0 .../scripts/create_snapshot | 0 .../scripts/create_volume | 0 .../scripts/deactivate_extensions | 0 .../scripts/deploy_link | 0 .../CloudFormation}/README.md | 0 .../CloudFormation}/deploy-fsx-ontap/README.md | 0 .../deploy-fsx-ontap/images/create_stack-01.png | Bin .../deploy-fsx-ontap/images/create_stack-02.png | Bin .../deploy-fsx-ontap/images/create_stack-03.png | Bin .../CloudFormation}/deploy-fsx-ontap/template.yaml | 0 .../Terraform}/README.md | 0 .../deploy-fsx-ontap-fileshare-access/README.md | 0 .../images/EC2-AD-Check.png | Bin .../images/FSxN+ClientVPN.png | Bin .../images/FSxN-AD-Check.png | Bin .../images/FSxN-FS-Check.png | Bin .../images/IAM_Policy.png | Bin .../images/MacOS-Finder-Connect.png | Bin .../images/VPN-Client-Setup.png | Bin .../deploy-fsx-ontap-fileshare-access/main.tf | 0 .../modules/ec2ad/ec2-ad.tf | 0 .../modules/ec2ad/ec2-ami.tf | 0 .../modules/ec2ad/outputs.tf | 0 .../modules/ec2ad/variables.tf | 0 .../modules/fsxn/fsx-fs.tf | 0 .../modules/fsxn/fsx-svm.tf | 0 .../modules/fsxn/fsx-volume.tf | 0 .../modules/fsxn/outputs.tf | 0 .../modules/fsxn/variables.tf | 0 .../modules/vpn/README.md | 0 .../modules/vpn/certs/README.md | 0 .../modules/vpn/certs/ca.crt | 0 .../modules/vpn/certs/ca.pem | 0 .../modules/vpn/certs/client.fsxn.crt | 0 .../modules/vpn/certs/client.fsxn.key | 0 .../modules/vpn/certs/client.fsxn.pem | 0 .../modules/vpn/certs/server.crt | 0 .../modules/vpn/certs/server.fsxn.crt | 0 .../modules/vpn/certs/server.fsxn.key | 0 .../modules/vpn/certs/server.fsxn.pem | 0 .../modules/vpn/certs/server.key | 0 .../modules/vpn/main.tf | 0 .../modules/vpn/securitygroups.tf | 0 .../modules/vpn/variables.tf | 0 .../deploy-fsx-ontap-fileshare-access/networking.tf | 0 .../deploy-fsx-ontap-fileshare-access/outputs.tf | 0 .../deploy-fsx-ontap-fileshare-access/ssm.tf | 0 .../terraform.sample.tfvars | 0 .../deploy-fsx-ontap-fileshare-access/variables.tf | 0 .../Terraform}/deploy-fsx-ontap-sqlserver/README.md | 0 .../Terraform}/deploy-fsx-ontap-sqlserver/main.tf | 0 .../modules/ec2/ec2-ami.tf | 0 .../modules/ec2/ec2-sql.tf | 0 .../modules/ec2/outputs.tf | 0 .../modules/ec2/variables.tf | 0 .../modules/fsxn/fsx-fs.tf | 0 .../modules/fsxn/fsx-svm.tf | 0 .../modules/fsxn/fsx-volume.tf | 0 .../modules/fsxn/outputs.tf | 0 .../modules/fsxn/variables.tf | 0 .../deploy-fsx-ontap-sqlserver/networking.tf | 0 .../deploy-fsx-ontap-sqlserver/outputs.tf | 0 .../Terraform}/deploy-fsx-ontap-sqlserver/ssm.tf | 0 .../terraform.sample.tfvars | 0 .../deploy-fsx-ontap-sqlserver/variables.tf | 0 .../Terraform}/deploy-fsx-ontap/README.md | 0 .../Terraform}/deploy-fsx-ontap/module/README.md | 0 .../Terraform}/deploy-fsx-ontap/module/main.tf | 0 .../Terraform}/deploy-fsx-ontap/module/output.tf | 0 .../deploy-fsx-ontap/module/security_groups.tf | 0 .../Terraform}/deploy-fsx-ontap/module/variables.tf | 0 .../deploy-fsx-ontap/standalone-module/README.md | 0 .../deploy-fsx-ontap/standalone-module/main.tf | 0 .../deploy-fsx-ontap/standalone-module/output.tf | 0 .../standalone-module/security_groups.tf | 0 .../deploy-fsx-ontap/standalone-module/variables.tf | 0 .../Terraform}/fsxn-replicate/DR_FSxN_variables.tf | 0 .../fsxn-replicate/Primary_FSxN_variables.tf | 0 .../Terraform}/fsxn-replicate/README.md | 0 .../Terraform}/fsxn-replicate/main.tf | 0 .../Terraform}/fsxn-replicate/output.tf | 0 .../Terraform}/fsxn-replicate/security_groups.tf | 0 .../fsxn-replicate/terraform.sample.tfvars | 0 105 files changed, 0 insertions(+), 0 deletions(-) rename {Ansible => Infrastructure_as_Code/Ansible}/README.md (100%) rename {Ansible => Infrastructure_as_Code/Ansible}/fsx_inventory_report/README.md (100%) rename {Ansible => Infrastructure_as_Code/Ansible}/fsx_inventory_report/generate_report.yaml (100%) rename {Ansible => Infrastructure_as_Code/Ansible}/fsx_inventory_report/get_fsxn_regions.yaml (100%) rename {Ansible => Infrastructure_as_Code/Ansible}/fsx_inventory_report/process_region.yaml (100%) rename {Ansible => Infrastructure_as_Code/Ansible}/snapmirror_report/README.md (100%) rename {Ansible => Infrastructure_as_Code/Ansible}/snapmirror_report/generate_report.yaml (100%) rename {Ansible => Infrastructure_as_Code/Ansible}/snapmirror_report/get_fsxn_regions.yaml (100%) rename {Ansible => Infrastructure_as_Code/Ansible}/snapmirror_report/process_region.yaml (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/README.md (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/create_clone.yaml (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/create_export_policy.yaml (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/create_sm_with_peering.yaml (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/create_sm_without_peering.yaml (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/create_snapshot.yaml (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/create_volume.yaml (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/README.md (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/activate_extensions (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/createClone.py (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/create_SM_relationship (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/create_clone (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/create_export_policy (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/create_snapshot (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/create_volume (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/deactivate_extensions (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/NetApp-FSxN-Custom-Resources-Samples/scripts/deploy_link (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/README.md (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/deploy-fsx-ontap/README.md (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/deploy-fsx-ontap/images/create_stack-01.png (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/deploy-fsx-ontap/images/create_stack-02.png (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/deploy-fsx-ontap/images/create_stack-03.png (100%) rename {CloudFormation => Infrastructure_as_Code/CloudFormation}/deploy-fsx-ontap/template.yaml (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/README.md (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/README.md (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/images/EC2-AD-Check.png (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/images/FSxN+ClientVPN.png (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/images/FSxN-AD-Check.png (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/images/FSxN-FS-Check.png (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/images/IAM_Policy.png (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/images/MacOS-Finder-Connect.png (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/images/VPN-Client-Setup.png (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/main.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ad.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ami.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/ec2ad/outputs.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/ec2ad/variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-fs.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-svm.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-volume.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/fsxn/outputs.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/fsxn/variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/README.md (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/README.md (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.crt (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.pem (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.crt (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.key (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.pem (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.crt (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.crt (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.key (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.pem (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.key (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/main.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/securitygroups.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/modules/vpn/variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/networking.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/outputs.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/ssm.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/terraform.sample.tfvars (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-fileshare-access/variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/README.md (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/main.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-ami.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-sql.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/modules/ec2/outputs.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/modules/ec2/variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-fs.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-svm.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-volume.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/modules/fsxn/outputs.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/modules/fsxn/variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/networking.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/outputs.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/ssm.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/terraform.sample.tfvars (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap-sqlserver/variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/README.md (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/module/README.md (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/module/main.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/module/output.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/module/security_groups.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/module/variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/standalone-module/README.md (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/standalone-module/main.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/standalone-module/output.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/standalone-module/security_groups.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/deploy-fsx-ontap/standalone-module/variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/fsxn-replicate/DR_FSxN_variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/fsxn-replicate/Primary_FSxN_variables.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/fsxn-replicate/README.md (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/fsxn-replicate/main.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/fsxn-replicate/output.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/fsxn-replicate/security_groups.tf (100%) rename {Terraform => Infrastructure_as_Code/Terraform}/fsxn-replicate/terraform.sample.tfvars (100%) diff --git a/Ansible/README.md b/Infrastructure_as_Code/Ansible/README.md similarity index 100% rename from Ansible/README.md rename to Infrastructure_as_Code/Ansible/README.md diff --git a/Ansible/fsx_inventory_report/README.md b/Infrastructure_as_Code/Ansible/fsx_inventory_report/README.md similarity index 100% rename from Ansible/fsx_inventory_report/README.md rename to Infrastructure_as_Code/Ansible/fsx_inventory_report/README.md diff --git a/Ansible/fsx_inventory_report/generate_report.yaml b/Infrastructure_as_Code/Ansible/fsx_inventory_report/generate_report.yaml similarity index 100% rename from Ansible/fsx_inventory_report/generate_report.yaml rename to Infrastructure_as_Code/Ansible/fsx_inventory_report/generate_report.yaml diff --git a/Ansible/fsx_inventory_report/get_fsxn_regions.yaml b/Infrastructure_as_Code/Ansible/fsx_inventory_report/get_fsxn_regions.yaml similarity index 100% rename from Ansible/fsx_inventory_report/get_fsxn_regions.yaml rename to Infrastructure_as_Code/Ansible/fsx_inventory_report/get_fsxn_regions.yaml diff --git a/Ansible/fsx_inventory_report/process_region.yaml b/Infrastructure_as_Code/Ansible/fsx_inventory_report/process_region.yaml similarity index 100% rename from Ansible/fsx_inventory_report/process_region.yaml rename to Infrastructure_as_Code/Ansible/fsx_inventory_report/process_region.yaml diff --git a/Ansible/snapmirror_report/README.md b/Infrastructure_as_Code/Ansible/snapmirror_report/README.md similarity index 100% rename from Ansible/snapmirror_report/README.md rename to Infrastructure_as_Code/Ansible/snapmirror_report/README.md diff --git a/Ansible/snapmirror_report/generate_report.yaml b/Infrastructure_as_Code/Ansible/snapmirror_report/generate_report.yaml similarity index 100% rename from Ansible/snapmirror_report/generate_report.yaml rename to Infrastructure_as_Code/Ansible/snapmirror_report/generate_report.yaml diff --git a/Ansible/snapmirror_report/get_fsxn_regions.yaml b/Infrastructure_as_Code/Ansible/snapmirror_report/get_fsxn_regions.yaml similarity index 100% rename from Ansible/snapmirror_report/get_fsxn_regions.yaml rename to Infrastructure_as_Code/Ansible/snapmirror_report/get_fsxn_regions.yaml diff --git a/Ansible/snapmirror_report/process_region.yaml b/Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml similarity index 100% rename from Ansible/snapmirror_report/process_region.yaml rename to Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/README.md b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/README.md similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/README.md rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/README.md diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_clone.yaml b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_clone.yaml similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_clone.yaml rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_clone.yaml diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_export_policy.yaml b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_export_policy.yaml similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_export_policy.yaml rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_export_policy.yaml diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_sm_with_peering.yaml b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_sm_with_peering.yaml similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_sm_with_peering.yaml rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_sm_with_peering.yaml diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_sm_without_peering.yaml b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_sm_without_peering.yaml similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_sm_without_peering.yaml rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_sm_without_peering.yaml diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_snapshot.yaml b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_snapshot.yaml similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_snapshot.yaml rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_snapshot.yaml diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_volume.yaml b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_volume.yaml similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_volume.yaml rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/create_volume.yaml diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/README.md b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/README.md similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/README.md rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/README.md diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/activate_extensions b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/activate_extensions similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/activate_extensions rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/activate_extensions diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/createClone.py b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/createClone.py similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/createClone.py rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/createClone.py diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_SM_relationship b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_SM_relationship similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_SM_relationship rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_SM_relationship diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_clone b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_clone similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_clone rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_clone diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_export_policy b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_export_policy similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_export_policy rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_export_policy diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_snapshot b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_snapshot similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_snapshot rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_snapshot diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_volume b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_volume similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_volume rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_volume diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/deactivate_extensions b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/deactivate_extensions similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/deactivate_extensions rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/deactivate_extensions diff --git a/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/deploy_link b/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/deploy_link similarity index 100% rename from CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/deploy_link rename to Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/deploy_link diff --git a/CloudFormation/README.md b/Infrastructure_as_Code/CloudFormation/README.md similarity index 100% rename from CloudFormation/README.md rename to Infrastructure_as_Code/CloudFormation/README.md diff --git a/CloudFormation/deploy-fsx-ontap/README.md b/Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/README.md similarity index 100% rename from CloudFormation/deploy-fsx-ontap/README.md rename to Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/README.md diff --git a/CloudFormation/deploy-fsx-ontap/images/create_stack-01.png b/Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/images/create_stack-01.png similarity index 100% rename from CloudFormation/deploy-fsx-ontap/images/create_stack-01.png rename to Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/images/create_stack-01.png diff --git a/CloudFormation/deploy-fsx-ontap/images/create_stack-02.png b/Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/images/create_stack-02.png similarity index 100% rename from CloudFormation/deploy-fsx-ontap/images/create_stack-02.png rename to Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/images/create_stack-02.png diff --git a/CloudFormation/deploy-fsx-ontap/images/create_stack-03.png b/Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/images/create_stack-03.png similarity index 100% rename from CloudFormation/deploy-fsx-ontap/images/create_stack-03.png rename to Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/images/create_stack-03.png diff --git a/CloudFormation/deploy-fsx-ontap/template.yaml b/Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/template.yaml similarity index 100% rename from CloudFormation/deploy-fsx-ontap/template.yaml rename to Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap/template.yaml diff --git a/Terraform/README.md b/Infrastructure_as_Code/Terraform/README.md similarity index 100% rename from Terraform/README.md rename to Infrastructure_as_Code/Terraform/README.md diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/README.md b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/README.md similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/README.md rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/README.md diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/images/EC2-AD-Check.png b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/EC2-AD-Check.png similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/images/EC2-AD-Check.png rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/EC2-AD-Check.png diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN+ClientVPN.png b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN+ClientVPN.png similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN+ClientVPN.png rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN+ClientVPN.png diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN-AD-Check.png b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN-AD-Check.png similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN-AD-Check.png rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN-AD-Check.png diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN-FS-Check.png b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN-FS-Check.png similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN-FS-Check.png rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/FSxN-FS-Check.png diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/images/IAM_Policy.png b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/IAM_Policy.png similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/images/IAM_Policy.png rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/IAM_Policy.png diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/images/MacOS-Finder-Connect.png b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/MacOS-Finder-Connect.png similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/images/MacOS-Finder-Connect.png rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/MacOS-Finder-Connect.png diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/images/VPN-Client-Setup.png b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/VPN-Client-Setup.png similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/images/VPN-Client-Setup.png rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/images/VPN-Client-Setup.png diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/main.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/main.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/main.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/main.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ad.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ad.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ad.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ad.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ami.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ami.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ami.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/ec2-ami.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/outputs.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/outputs.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/outputs.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/outputs.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/variables.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/variables.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/variables.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/ec2ad/variables.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-fs.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-fs.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-fs.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-fs.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-svm.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-svm.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-svm.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-svm.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-volume.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-volume.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-volume.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/fsx-volume.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/outputs.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/outputs.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/outputs.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/outputs.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/variables.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/variables.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/variables.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/fsxn/variables.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/README.md b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/README.md similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/README.md rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/README.md diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/README.md b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/README.md similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/README.md rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/README.md diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.crt b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.crt similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.crt rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.crt diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.pem b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.pem similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.pem rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/ca.pem diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.crt b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.crt similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.crt rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.crt diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.key b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.key similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.key rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.key diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.pem b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.pem similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.pem rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/client.fsxn.pem diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.crt b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.crt similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.crt rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.crt diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.crt b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.crt similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.crt rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.crt diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.key b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.key similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.key rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.key diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.pem b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.pem similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.pem rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.fsxn.pem diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.key b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.key similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.key rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/certs/server.key diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/main.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/main.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/main.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/main.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/securitygroups.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/securitygroups.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/securitygroups.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/securitygroups.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/variables.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/variables.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/variables.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/modules/vpn/variables.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/networking.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/networking.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/networking.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/networking.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/outputs.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/outputs.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/outputs.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/outputs.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/ssm.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/ssm.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/ssm.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/ssm.tf diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/terraform.sample.tfvars b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/terraform.sample.tfvars similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/terraform.sample.tfvars rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/terraform.sample.tfvars diff --git a/Terraform/deploy-fsx-ontap-fileshare-access/variables.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/variables.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-fileshare-access/variables.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access/variables.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/README.md b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/README.md similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/README.md rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/README.md diff --git a/Terraform/deploy-fsx-ontap-sqlserver/main.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/main.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/main.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/main.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-ami.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-ami.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-ami.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-ami.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-sql.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-sql.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-sql.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/ec2-sql.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/outputs.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/outputs.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/outputs.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/outputs.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/variables.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/variables.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/variables.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/ec2/variables.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-fs.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-fs.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-fs.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-fs.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-svm.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-svm.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-svm.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-svm.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-volume.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-volume.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-volume.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/fsx-volume.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/outputs.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/outputs.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/outputs.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/outputs.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/variables.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/variables.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/variables.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/modules/fsxn/variables.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/networking.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/networking.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/networking.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/networking.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/outputs.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/outputs.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/outputs.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/outputs.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/ssm.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/ssm.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/ssm.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/ssm.tf diff --git a/Terraform/deploy-fsx-ontap-sqlserver/terraform.sample.tfvars b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/terraform.sample.tfvars similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/terraform.sample.tfvars rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/terraform.sample.tfvars diff --git a/Terraform/deploy-fsx-ontap-sqlserver/variables.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/variables.tf similarity index 100% rename from Terraform/deploy-fsx-ontap-sqlserver/variables.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver/variables.tf diff --git a/Terraform/deploy-fsx-ontap/README.md b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/README.md similarity index 100% rename from Terraform/deploy-fsx-ontap/README.md rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/README.md diff --git a/Terraform/deploy-fsx-ontap/module/README.md b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/README.md similarity index 100% rename from Terraform/deploy-fsx-ontap/module/README.md rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/README.md diff --git a/Terraform/deploy-fsx-ontap/module/main.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/main.tf similarity index 100% rename from Terraform/deploy-fsx-ontap/module/main.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/main.tf diff --git a/Terraform/deploy-fsx-ontap/module/output.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/output.tf similarity index 100% rename from Terraform/deploy-fsx-ontap/module/output.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/output.tf diff --git a/Terraform/deploy-fsx-ontap/module/security_groups.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/security_groups.tf similarity index 100% rename from Terraform/deploy-fsx-ontap/module/security_groups.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/security_groups.tf diff --git a/Terraform/deploy-fsx-ontap/module/variables.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/variables.tf similarity index 100% rename from Terraform/deploy-fsx-ontap/module/variables.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module/variables.tf diff --git a/Terraform/deploy-fsx-ontap/standalone-module/README.md b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/README.md similarity index 100% rename from Terraform/deploy-fsx-ontap/standalone-module/README.md rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/README.md diff --git a/Terraform/deploy-fsx-ontap/standalone-module/main.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/main.tf similarity index 100% rename from Terraform/deploy-fsx-ontap/standalone-module/main.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/main.tf diff --git a/Terraform/deploy-fsx-ontap/standalone-module/output.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/output.tf similarity index 100% rename from Terraform/deploy-fsx-ontap/standalone-module/output.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/output.tf diff --git a/Terraform/deploy-fsx-ontap/standalone-module/security_groups.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/security_groups.tf similarity index 100% rename from Terraform/deploy-fsx-ontap/standalone-module/security_groups.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/security_groups.tf diff --git a/Terraform/deploy-fsx-ontap/standalone-module/variables.tf b/Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/variables.tf similarity index 100% rename from Terraform/deploy-fsx-ontap/standalone-module/variables.tf rename to Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module/variables.tf diff --git a/Terraform/fsxn-replicate/DR_FSxN_variables.tf b/Infrastructure_as_Code/Terraform/fsxn-replicate/DR_FSxN_variables.tf similarity index 100% rename from Terraform/fsxn-replicate/DR_FSxN_variables.tf rename to Infrastructure_as_Code/Terraform/fsxn-replicate/DR_FSxN_variables.tf diff --git a/Terraform/fsxn-replicate/Primary_FSxN_variables.tf b/Infrastructure_as_Code/Terraform/fsxn-replicate/Primary_FSxN_variables.tf similarity index 100% rename from Terraform/fsxn-replicate/Primary_FSxN_variables.tf rename to Infrastructure_as_Code/Terraform/fsxn-replicate/Primary_FSxN_variables.tf diff --git a/Terraform/fsxn-replicate/README.md b/Infrastructure_as_Code/Terraform/fsxn-replicate/README.md similarity index 100% rename from Terraform/fsxn-replicate/README.md rename to Infrastructure_as_Code/Terraform/fsxn-replicate/README.md diff --git a/Terraform/fsxn-replicate/main.tf b/Infrastructure_as_Code/Terraform/fsxn-replicate/main.tf similarity index 100% rename from Terraform/fsxn-replicate/main.tf rename to Infrastructure_as_Code/Terraform/fsxn-replicate/main.tf diff --git a/Terraform/fsxn-replicate/output.tf b/Infrastructure_as_Code/Terraform/fsxn-replicate/output.tf similarity index 100% rename from Terraform/fsxn-replicate/output.tf rename to Infrastructure_as_Code/Terraform/fsxn-replicate/output.tf diff --git a/Terraform/fsxn-replicate/security_groups.tf b/Infrastructure_as_Code/Terraform/fsxn-replicate/security_groups.tf similarity index 100% rename from Terraform/fsxn-replicate/security_groups.tf rename to Infrastructure_as_Code/Terraform/fsxn-replicate/security_groups.tf diff --git a/Terraform/fsxn-replicate/terraform.sample.tfvars b/Infrastructure_as_Code/Terraform/fsxn-replicate/terraform.sample.tfvars similarity index 100% rename from Terraform/fsxn-replicate/terraform.sample.tfvars rename to Infrastructure_as_Code/Terraform/fsxn-replicate/terraform.sample.tfvars From e939a3946be03aed525d1771680e23192a940a1a Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Tue, 17 Feb 2026 18:48:33 -0600 Subject: [PATCH 04/17] Reorganized the IaC directories --- Infrastructure_as_Code/README.md | 32 ++++++++++++++++++++++++++++++++ README.md | 25 +++++++++++++------------ 2 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 Infrastructure_as_Code/README.md diff --git a/Infrastructure_as_Code/README.md b/Infrastructure_as_Code/README.md new file mode 100644 index 0000000..7a09b50 --- /dev/null +++ b/Infrastructure_as_Code/README.md @@ -0,0 +1,32 @@ +# Infrastructure as Code + +This folder contains code samples and automation scripts for FSx for NetApp ONTAP operations using the various Infrastructure as Code (IAC) tools. + +* [Anisble](Ansible) + * [FSx ONTAP inventory report](Ansible/fsx_inventory_report) + * [SnapMirror report](Ansible/snapmirror_report) +* [CloudFormation](CloudFormation) + * [NetApp-FSxN-Custom-Resources-Samples](CloudFormation/NetApp-FSxN-Custom-Resources-Samples) + * [deploy-fsx-ontap](CloudFormation/deploy-fsx-ontap) +* [Terraform](Terraform) + * [FSx ONTAP deployment using Terraform](Terraform/deploy-fsx-ontap) + * [FSx ONTAP Replication](Terraform/fsxn-replicate) + * [Deployment of SQL Server on EC2 with FSx ONTAP](Terraform/deploy-fsx-ontap-sqlserver) + * [Deployment of FSx ONTAP with VPN for File Share Access](Terraform/deploy-fsx-ontap-fileshare-access) + +## Author Information + +This repository is maintained by the contributors listed on [GitHub](https://github.com/NetApp/FSx-ONTAP-samples-scripts/graphs/contributors). + +## License + +Licensed under the Apache License, Version 2.0 (the "License"). + +You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). + +Unless required by applicable law or agreed to in writing, software distributed under the License +is distributed on an _"AS IS"_ basis, without WARRANTIES or conditions of any kind, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + +© 2024 NetApp, Inc. All Rights Reserved. diff --git a/README.md b/README.md index 8e06315..0e28d92 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ built to maximize cost performance, resilience, and accessibility in business-cr This GitHub repository contains comprehensive code samples and automation scripts for FSx for Netapp ONTAP operations, promoting the use of Infrastructure as Code (IAC) tools and encouraging developers to extend the product's functionalities through code. The samples here go alongside the automation, management and monitoring that -[BlueXP Workload Factory](https://console.workloads.netapp.com) provides. +[Workload Factory](https://console.workloads.netapp.com) provides. We welcome contributions from the community! Please read our [contribution guidelines](CONTRIBUTING.md) before getting started. @@ -16,12 +16,18 @@ Have a great idea? We'd love to hear it! Please email us at [ng-fsxn-github-samp ## Table of Contents -* [Anisble](/Ansible) - * [FSx ONTAP inventory report](/Ansible/fsx_inventory_report) - * [SnapMirror report](/Ansible/snapmirror_report) -* [CloudFormation](/CloudFormation) - * [NetApp-FSxN-Custom-Resources-Samples](/CloudFormation/NetApp-FSxN-Custom-Resources-Samples) - * [deploy-fsx-ontap](/CloudFormation/deploy-fsx-ontap) +* [Infrastructure as Code](/Infrastructure_as_Code) + * [Anisble](Ansible) + * [FSx ONTAP inventory report](Ansible/fsx_inventory_report) + * [SnapMirror report](Ansible/snapmirror_report) + * [CloudFormation](CloudFormation) + * [NetApp-FSxN-Custom-Resources-Samples](CloudFormation/NetApp-FSxN-Custom-Resources-Samples) + * [deploy-fsx-ontap](CloudFormation/deploy-fsx-ontap) + * [Terraform](Terraform) + * [FSx ONTAP deployment using Terraform](Terraform/deploy-fsx-ontap) + * [FSx ONTAP Replication](Terraform/fsxn-replicate) + * [Deployment of SQL Server on EC2 with FSx ONTAP](Terraform/deploy-fsx-ontap-sqlserver) + * [Deployment of FSx ONTAP with VPN for File Share Access](Terraform/deploy-fsx-ontap-fileshare-access) * [EKS](/EKS) * [Backup-EKS-Applications-with-Trident-Protect](/EKS/Backup-EKS-Applications-with-Trident-Protect) * [FSx for NetApp ONTAP as persistent storage for EKS](/EKS/FSxN-as-PVC-for-EKS) @@ -43,11 +49,6 @@ Have a great idea? We'd love to hear it! Please email us at [ng-fsxn-github-samp * [Monitor FSx for ONTAP with Harvest on EKS](/Monitoring/monitor_fsxn_with_harvest_on_eks) * [Solutions](/Solutions) * [k8s applications non-stdout logs collection into ELK](/Solutions/EKS-logs-to-ELK) -* [Terraform](/Terraform) - * [FSx ONTAP deployment using Terraform](/Terraform/deploy-fsx-ontap) - * [FSx ONTAP Replication](/Terraform/fsxn-replicate) - * [Deployment of SQL Server on EC2 with FSx ONTAP](/Terraform/deploy-fsx-ontap-sqlserver) - * [Deployment of FSx ONTAP with VPN for File Share Access](/Terraform/deploy-fsx-ontap-fileshare-access) ## Author Information From 225a8ca7d604406dab8045303830cf6dd0982fa4 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Tue, 17 Feb 2026 18:52:23 -0600 Subject: [PATCH 05/17] Reorganized the IaC directories --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0e28d92..404ae8f 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,17 @@ Have a great idea? We'd love to hear it! Please email us at [ng-fsxn-github-samp ## Table of Contents * [Infrastructure as Code](/Infrastructure_as_Code) - * [Anisble](Ansible) - * [FSx ONTAP inventory report](Ansible/fsx_inventory_report) - * [SnapMirror report](Ansible/snapmirror_report) - * [CloudFormation](CloudFormation) - * [NetApp-FSxN-Custom-Resources-Samples](CloudFormation/NetApp-FSxN-Custom-Resources-Samples) - * [deploy-fsx-ontap](CloudFormation/deploy-fsx-ontap) - * [Terraform](Terraform) - * [FSx ONTAP deployment using Terraform](Terraform/deploy-fsx-ontap) - * [FSx ONTAP Replication](Terraform/fsxn-replicate) - * [Deployment of SQL Server on EC2 with FSx ONTAP](Terraform/deploy-fsx-ontap-sqlserver) - * [Deployment of FSx ONTAP with VPN for File Share Access](Terraform/deploy-fsx-ontap-fileshare-access) + * [Ansible](/Infrastructure_as_Code/Ansible) + * [FSx ONTAP inventory report](/Infrastructure_as_Code/Ansible/fsx_inventory_report) + * [SnapMirror report](/Infrastructure_as_Code/Ansible/snapmirror_report) + * [CloudFormation](/Infrastructure_as_Code/CloudFormation) + * [NetApp-FSxN-Custom-Resources-Samples](/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples) + * [deploy-fsx-ontap](/Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap) + * [Terraform](/Infrastructure_as_Code/Terraform) + * [FSx ONTAP deployment using Terraform](/Infrastructure_as_Code/Terraform/deploy-fsx-ontap) + * [FSx ONTAP Replication](/Infrastructure_as_Code/Terraform/fsxn-replicate) + * [Deployment of SQL Server on EC2 with FSx ONTAP](/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver) + * [Deployment of FSx ONTAP with VPN for File Share Access](/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access) * [EKS](/EKS) * [Backup-EKS-Applications-with-Trident-Protect](/EKS/Backup-EKS-Applications-with-Trident-Protect) * [FSx for NetApp ONTAP as persistent storage for EKS](/EKS/FSxN-as-PVC-for-EKS) From 05ae1190154edcfb38a5fb71d00030ed8618e474 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Tue, 17 Feb 2026 18:52:57 -0600 Subject: [PATCH 06/17] Reorganized the IaC directories --- Infrastructure_as_Code/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Infrastructure_as_Code/README.md b/Infrastructure_as_Code/README.md index 7a09b50..118b43e 100644 --- a/Infrastructure_as_Code/README.md +++ b/Infrastructure_as_Code/README.md @@ -2,7 +2,7 @@ This folder contains code samples and automation scripts for FSx for NetApp ONTAP operations using the various Infrastructure as Code (IAC) tools. -* [Anisble](Ansible) +* [Ansible](Ansible) * [FSx ONTAP inventory report](Ansible/fsx_inventory_report) * [SnapMirror report](Ansible/snapmirror_report) * [CloudFormation](CloudFormation) From 93fcd9aeab2daff712db7267da003b305fef5671 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Tue, 17 Feb 2026 18:54:52 -0600 Subject: [PATCH 07/17] Reorganized the IaC directories --- Infrastructure_as_Code/Terraform/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Infrastructure_as_Code/Terraform/README.md b/Infrastructure_as_Code/Terraform/README.md index 61df744..bcc46e6 100644 --- a/Infrastructure_as_Code/Terraform/README.md +++ b/Infrastructure_as_Code/Terraform/README.md @@ -3,10 +3,10 @@ This subfolder contains various examples of how you can use Terraform to deploy | Tool | Description | | --- | --- | -| [Deploy FSx ONTAP File Share](/Terraform/deploy-fsx-ontap-fileshare-access) | This sample shows how to deploy an FSx for ONTAP file system and access it from a remote system using OpenVPN. | -| [Deploy FSx ONTAP SQL Server](/Terraform/deploy-fsx-ontap-sqlserver) | This sample shows how to deploy on FSx for ONTAP file system and use it as a shared storage for a SQL Server. | -| [Deploy FSx ONTAP](/Terraform/deploy-fsx-ontap) | This sample shows how to deploy an FSx for ONTAP file system using Terraform. | -| [FSx ONTAP Replicate](/Terraform/fsxn-replicate)| This sample shows how to use Terraform to replicate an FSx for ONTAP file system for disaster recovery purposes. | +| [Deploy FSx ONTAP File Share](deploy-fsx-ontap-fileshare-access) | This sample shows how to deploy an FSx for ONTAP file system and access it from a remote system using OpenVPN. | +| [Deploy FSx ONTAP SQL Server](deploy-fsx-ontap-sqlserver) | This sample shows how to deploy on FSx for ONTAP file system and use it as a shared storage for a SQL Server. | +| [Deploy FSx ONTAP](deploy-fsx-ontap) | This sample shows how to deploy an FSx for ONTAP file system using Terraform. | +| [FSx ONTAP Replicate](fsxn-replicate)| This sample shows how to use Terraform to replicate an FSx for ONTAP file system for disaster recovery purposes. | ## Author Information From 06d3b9a09801bea80454cc50880e4b820635e236 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Tue, 17 Feb 2026 19:02:39 -0600 Subject: [PATCH 08/17] Reorganized the IaC directories --- .github/workflows/terraform-docs.yml | 8 ++++---- .github/workflows/terraform.yml | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/terraform-docs.yml b/.github/workflows/terraform-docs.yml index cd6d07b..8a1c7d9 100644 --- a/.github/workflows/terraform-docs.yml +++ b/.github/workflows/terraform-docs.yml @@ -7,10 +7,10 @@ name: "Documentation: terraform-docs" on: pull_request: paths: - - 'Terraform/**' + - 'Infrastructure_as_Code/Terraform/**' push: paths: - - 'Terraform/**' + - 'Infrastructure_as_Code/Terraform/**' branches: - main @@ -20,8 +20,8 @@ jobs: strategy: matrix: directory: - - 'Terraform/deploy-fsx-ontap/module' - - 'Terraform/deploy-fsx-ontap/standalone-module' + - 'Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module' + - 'Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module' steps: - name: Checkout pull request uses: actions/checkout@v3.5.0 diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 8b9ed55..6e74c3b 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -7,10 +7,10 @@ name: "Code Quality: Terraform" on: pull_request: paths: - - 'Terraform/**' + - 'Infrastructure_as_Code/Terraform/**' push: paths: - - 'Terraform/**' + - 'Infrastructure_as_Code/Terraform/**' branches: - main @@ -21,8 +21,8 @@ jobs: strategy: matrix: directory: - - 'Terraform/deploy-fsx-ontap/module' - - 'Terraform/deploy-fsx-ontap/standalone-module' + - 'Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module' + - 'Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module' defaults: run: working-directory: ${{ matrix.directory }} @@ -47,4 +47,4 @@ jobs: # run: terraform fmt -diff -check -no-color -recursive - name: Validate Terraform configuration - run: terraform validate \ No newline at end of file + run: terraform validate From 624309a95d0e243862c3e4ec3ae0d62dda0e0e2e Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Thu, 19 Feb 2026 18:51:51 -0600 Subject: [PATCH 09/17] Updated it to use the ONTAP Ansible collection as opposed to invoking 'curl' commands to get the SnapMirror information. --- .../Ansible/snapmirror_report/README.md | 12 ++-- .../snapmirror_report/generate_report.yaml | 38 +++++++++-- .../snapmirror_report/get_fsxn_regions.yaml | 7 ++- .../snapmirror_report/process_region.yaml | 63 ++++++++++++------- 4 files changed, 84 insertions(+), 36 deletions(-) diff --git a/Infrastructure_as_Code/Ansible/snapmirror_report/README.md b/Infrastructure_as_Code/Ansible/snapmirror_report/README.md index 3e15f94..95ba468 100644 --- a/Infrastructure_as_Code/Ansible/snapmirror_report/README.md +++ b/Infrastructure_as_Code/Ansible/snapmirror_report/README.md @@ -15,16 +15,18 @@ the number of hours. If the letter is 'M' then the number before it represents t the number before it represents the number of seconds. For example, 'P1DT2H3M4S' represents 1 day, 2 hours, 3 minutes, and 4 seconds. ## Requirements -- jq - A lightweight and flexible command-line JSON processor. Installation instructions can be found [here](https://jqlang.github.io/jq/download/) - Ansible 2.9 or later. Installation instructions can be found [here](https://docs.ansible.com/ansible/latest/installation_guide/index.html) -- AWS Ansible collection. This should be included with the base installation of Ansible. +- NetApp ONTAP Ansible collection. +- AWS Ansible collection. - AWS secret(s) with the credentials necessary to run SnapMirror ONTAP APIs against the FSx for ONTAP file systems. The required format of the secret is described below. +- The `aws` cli installed and configured. Installation instructions can be found [here](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html). +- A file with a list of the FSx for ONTAP file systems and their corresponding secrets. The format of the file is described below. ## Installation There are three files used to create the report: -- `generate_report.yaml`: The Ansible playbook that generates the report. -- `processs_region.yaml`: A collection of tasks that will process all the FSxNs in a region. -- `get_all_fsxn_regions.yaml`: A collection of tasks that retrieves all the regions, that are enabled for the account, where FSx for ONTAP is available. +- `generate_report.yaml`: The main Ansible playbook that generates the report. +- `get_all_fsxn_regions.yaml`: A collection of tasks that retrieves all the regions, that are enabled for the account, where FSx for ONTAP is also available. +- `processs_region.yaml`: A collection of tasks that will process all the FSxNs within a region. You will also need to create a file named (by default) `secrets_list.csv` that list the secret name for each FSx file systems. The format of the file should be: diff --git a/Infrastructure_as_Code/Ansible/snapmirror_report/generate_report.yaml b/Infrastructure_as_Code/Ansible/snapmirror_report/generate_report.yaml index 306ceab..ca13e03 100644 --- a/Infrastructure_as_Code/Ansible/snapmirror_report/generate_report.yaml +++ b/Infrastructure_as_Code/Ansible/snapmirror_report/generate_report.yaml @@ -1,11 +1,40 @@ +################################################################################# +# This Ansible playbook generates a csv file that contains the following +# information for each SnapMirror relationship in all of the FSxNs in all +# of the AWS regions: +# +# FilesystemID +# source +# destination +# state +# healthy +# lag_time +# +# This playbook is dependent on the 'aws' cli being installed and configured +# (i.e. authenticated.) It is need to list all the FSxNs within a region +# since there isn't an amazon.aws.fsx_info module that can do that. +# +# It is also dependent on a csv file that should contain the AWS +# secret for each FSxNs. The format of the secrets.csv file is as follows: +# +# FilesystemID,serect_name +# +# Each secret should have two keys 'username' and 'password'. +# +# The name of the file is set vai the "secrets_list_file" variable below. +# +# It is assumed that all secrets will be in the same region, which is defined +# in the secrets_region variable below. +# +# The output of the playbook is a CSV file that contains the following columns: +# +# fs,source,destination,state,healthy,lag_time # -# This Ansible playbook generates a SnapMirrorreport for all the -# SnapMirror relationships, in all the FSxNs, in all regions, ################################################################################# --- - vars: report_name: output.csv - secrets_list_file: secrets_list.csv + secrets_list_file: secrets.csv secrets_region: us-west-2 ################################################################################# # @@ -19,6 +48,7 @@ hosts: localhost collections: - amazon.aws + - netapp.ontap gather_facts: false tasks: @@ -26,7 +56,7 @@ ansible.builtin.shell: cmd: echo fs,source,destination,state,healthy,lag_time > {{ report_name }} - - name: Get all the regions that support FSxN that I am opted into. + - name: Get all the regions that support FSxN that are opted into. include_tasks: get_fsxn_regions.yaml - name: Generate the report for all the FSxNs. diff --git a/Infrastructure_as_Code/Ansible/snapmirror_report/get_fsxn_regions.yaml b/Infrastructure_as_Code/Ansible/snapmirror_report/get_fsxn_regions.yaml index 06270df..7086cbb 100644 --- a/Infrastructure_as_Code/Ansible/snapmirror_report/get_fsxn_regions.yaml +++ b/Infrastructure_as_Code/Ansible/snapmirror_report/get_fsxn_regions.yaml @@ -1,7 +1,8 @@ -# -# These tasks are used to set a variable named 'fsnx_regions' that contains a -# list of regions that support FSxN and are opted-in. ################################################################################ +# This Ansiable playbook it used to return all of the regions that support FSxN +# and are opted-in. It stores the list of regions in the fsxn_regions variable. +################################################################################ +# - name: Get all the opted-in regions amazon.aws.aws_region_info: register: region_info diff --git a/Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml b/Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml index aecce2c..b707c60 100644 --- a/Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml +++ b/Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml @@ -1,36 +1,51 @@ +################################################################################ +# Since Ansible can't handle nested loops, this is a block of tasks that is run +# for each region. It assumes that the calling playbook used 'region' as its +# loop variable. # -# Since Ansible can't handle nested loops, this is a block of tasked that is -# run for each region. It assume that the calling playbook used 'region' as its loop variable. -################################################################################# +# It gathers all the snapmirror information for all the FSxNs with a region +# that a secret is defined for in the secrets.csv file. Once it has gathered +# all the information, it writes it to an output.csv file in the format: +# +# source_cluster::source_path,destination_cluster::destination_path,state,healthy,lag_time +# +################################################################################ --- +- name: + debug: + msg: "Processing region {{ region }}" + - name: Get all the FSxNs for the specified region. ansible.builtin.shell: - cmd: aws fsx describe-file-systems --region {{ region }} --query 'FileSystems[*].{FileSystemId:FileSystemId}' --output text | sed -e '/^$/d' + cmd: aws fsx describe-file-systems --region {{ region }} --query 'FileSystems[*].{ID:FileSystemId,IP:OntapConfiguration.Endpoints.Management.IpAddresses[0]}' --output text | sed -e '/^$/d' register: fsxn_ids_per_region - name: Get the SnapMirror relationships for each FSxN. when: secret != 'n/a' - ansible.builtin.shell: - cmd: | - fs={{ item }}; - username="{{ lookup('amazon.aws.aws_secret', '{{ secret }}.username', region=secrets_region, nested=true, on_missing='skip') }}"; - password="{{ lookup('amazon.aws.aws_secret', '{{ secret }}.password', region=secrets_region, nested=true, on_missing='skip') }}"; - if [ "$username" = '[]' -o "$password" = '[]' ]; then - echo "Missing secret for file system $fs" 1>&2; - exit 0; - fi; - ip=$(aws fsx describe-file-systems --region {{ region }} --file-system-ids $fs --query 'FileSystems[0].OntapConfiguration.Endpoints.Management.IpAddresses[0]' --output=text); - curl -s -u "${username}:${password}" -k https://$ip/api/snapmirror/relationships?fields=source,destination,lag_time,state,healthy | jq -r '.records[] | "'${fs}',\(.source.path),\(.destination.path),\(.state),\(.healthy),\(.lag_time)"' + netapp.ontap.na_ontap_rest_info: + username: "{{ lookup('amazon.aws.aws_secret', '{{ secret }}.username', region=secrets_region, nested=true, on_missing='skip') }}" + password: "{{ lookup('amazon.aws.aws_secret', '{{ secret }}.password', region=secrets_region, nested=true, on_missing='skip') }}" + hostname: "{{ item.split('\t')[1] }}" + validate_certs: false + fields: + - source + - destination + - healthy + - lag_time + - state + gather_subset: + - snapmirror/relationships loop: "{{ fsxn_ids_per_region.stdout_lines }}" register: snapmirror_relationships vars: - secret: "{{ lookup('ansible.builtin.csvfile', item, file=secrets_list_file, delimiter=',', default='n/a') }}" + secret: "{{ lookup('ansible.builtin.csvfile', item.split('\t')[0], file=secrets_list_file, delimiter=',', default='n/a') }}" -- name: Write the SnapMirror relationships to a file. - when: item.stdout is defined - ansible.builtin.shell: - cmd: | - if [ "{{ item.stdout }}" != "" ]; then - echo "{{ item.stdout }}" >> {{ report_name }}; - fi - loop: "{{ snapmirror_relationships.results }}" +- name: Write the SnapMirror relationship infor to a file. + ansible.builtin.lineinfile: + insertafter: EOF + path: output.csv + line: "{{ item.source.cluster.name }}::{{ item.source.path }},{{ item.destination.cluster.name }}::{{ item.destination.path }},{{ item.state }},{{ item.healthy }},{{ lag_time }}" + loop: "{{ snapmirror_relationships.results[0].ontap_info['snapmirror/relationships'].records }}" + when: snapmirror_relationships.results | length > 0 and snapmirror_relationships.results[0].ontap_info is defined + vars: + lag_time: "{{ item.lag_time if item.lag_time is defined else 'n/a' }}" From 32ac6825a89897f009437054f4fa7b3ba7faf79e Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Thu, 19 Feb 2026 18:56:12 -0600 Subject: [PATCH 10/17] Updated it to use the ONTAP Ansible collection as opposed to invoking 'curl' commands to get the SnapMirror information. --- Infrastructure_as_Code/Ansible/snapmirror_report/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Infrastructure_as_Code/Ansible/snapmirror_report/README.md b/Infrastructure_as_Code/Ansible/snapmirror_report/README.md index 95ba468..1f2cb2c 100644 --- a/Infrastructure_as_Code/Ansible/snapmirror_report/README.md +++ b/Infrastructure_as_Code/Ansible/snapmirror_report/README.md @@ -19,7 +19,7 @@ the number before it represents the number of seconds. For example, 'P1DT2H3M4S' - NetApp ONTAP Ansible collection. - AWS Ansible collection. - AWS secret(s) with the credentials necessary to run SnapMirror ONTAP APIs against the FSx for ONTAP file systems. The required format of the secret is described below. -- The `aws` cli installed and configured. Installation instructions can be found [here](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html). +- The `aws` cli installed and configured. Installation instructions can be found [here](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html). This is required to get all the FSxNs within a region, since there isn't an AWS Ansible module that can do that. - A file with a list of the FSx for ONTAP file systems and their corresponding secrets. The format of the file is described below. ## Installation From 85413e03b139a024965eb956ea1be84a22720742 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Thu, 19 Feb 2026 19:00:59 -0600 Subject: [PATCH 11/17] Updated it to use the ONTAP Ansible collection as opposed to invoking 'curl' commands to get the SnapMirror information. --- .../Ansible/snapmirror_report/process_region.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml b/Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml index b707c60..b2afe78 100644 --- a/Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml +++ b/Infrastructure_as_Code/Ansible/snapmirror_report/process_region.yaml @@ -17,7 +17,7 @@ - name: Get all the FSxNs for the specified region. ansible.builtin.shell: - cmd: aws fsx describe-file-systems --region {{ region }} --query 'FileSystems[*].{ID:FileSystemId,IP:OntapConfiguration.Endpoints.Management.IpAddresses[0]}' --output text | sed -e '/^$/d' + cmd: aws fsx describe-file-systems --region {{ region }} --query 'FileSystems[*].{ID:FileSystemId,IP:OntapConfiguration.Endpoints.Management.IpAddresses[0]}' --output text | sed -e '/^$/d' register: fsxn_ids_per_region - name: Get the SnapMirror relationships for each FSxN. @@ -28,11 +28,11 @@ hostname: "{{ item.split('\t')[1] }}" validate_certs: false fields: - - source - - destination - - healthy - - lag_time - - state + - source + - destination + - healthy + - lag_time + - state gather_subset: - snapmirror/relationships loop: "{{ fsxn_ids_per_region.stdout_lines }}" From bafdd8a8a0411750bea1f074332a74ea0f679530 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Thu, 19 Feb 2026 19:49:34 -0600 Subject: [PATCH 12/17] Initial Version --- .../Ansible/Volume_Management/README.md | 68 +++++++++++++ .../Volume_Management/create_snapshot.yaml | 72 ++++++++++++++ .../Volume_Management/create_volume.yaml | 96 +++++++++++++++++++ .../Volume_Management/delete_snapshot.yaml | 72 ++++++++++++++ .../Volume_Management/delete_volume.yaml | 70 ++++++++++++++ .../Ansible/Volume_Management/variables.yaml | 8 ++ 6 files changed, 386 insertions(+) create mode 100644 Infrastructure_as_Code/Ansible/Volume_Management/README.md create mode 100644 Infrastructure_as_Code/Ansible/Volume_Management/create_snapshot.yaml create mode 100644 Infrastructure_as_Code/Ansible/Volume_Management/create_volume.yaml create mode 100644 Infrastructure_as_Code/Ansible/Volume_Management/delete_snapshot.yaml create mode 100644 Infrastructure_as_Code/Ansible/Volume_Management/delete_volume.yaml create mode 100644 Infrastructure_as_Code/Ansible/Volume_Management/variables.yaml diff --git a/Infrastructure_as_Code/Ansible/Volume_Management/README.md b/Infrastructure_as_Code/Ansible/Volume_Management/README.md new file mode 100644 index 0000000..202a0a1 --- /dev/null +++ b/Infrastructure_as_Code/Ansible/Volume_Management/README.md @@ -0,0 +1,68 @@ +# Ansible Volume Management samples +This folder contains to Ansible playbooks that can be used to manage volumes within a FSx for ONTAP file system. + +They have been configured to use the new `use_lambda` feature that allows it to leverage an Workload Factory Link +to issue the API calls to the FSx for ONTAP file system which alleviate the requirement of the Ansible control +node to have network connectivity to the FSx for ONTAP file system. For more information on how to set up a +Workload Factory Link, please refer to the [NetApp Workload Factory documentation](https://docs.netapp.com/us-en/workload-fsx-ontap/links-overview.html). + +The list of playbooks included in this folder is as follows: +- create\_volume.yaml +- delete\_volume.yaml +- create\_snapshot.yaml +- delete\_snapshot.yaml + +## Requirements +- Ansible 2.9 or later. Installation instructions can be found [here](https://docs.ansible.com/ansible/latest/installation_guide/index.html) +- NetApp ONTAP Ansible collection. +- AWS Ansible collection. +- An AWS secret with the credentials necessary to run the required volume APIs against the FSx for ONTAP file system. The required format of the secret is described below. + +## Configuration +Each playbook requires various variables to be set in order to run. +| Variable | Used By Playbook | Required | Default | Description | +|:-------- |:----------------:|:--------:|:-------:|:-----------| +| volume\_name| All | Yes | None | The name of the volume you want to act one.| +| volume\_size| create\_volume | Yes | None | The size, in MiBs, of the volume to create.| +| vserver | All | Yes | None | The name of the vserver where the volume resides.| +| fsxn\_hostname| All | Yes | None | The hostname or IP address of the FSxN where the volume resides.| +| lambda\_function\_name| All | No | None | The name of the Workload Factory Link to use when issuing API calls to the FSx for ONTAP file system.| +| aws\_region | All | No | None | The AWS region where the Link lambda function resides.| +| secret\_name | Yes | All | The name of the AWS secret that contains the credentials to authenticate with the FSx for ONTAP file system.| +| snapshot\_name | create\_snapshot | Yes | None | The name of the snapshot to create.| +| security\_style | create\_volume | No | UNIX | The security style to use when creating the volume. Valid options are UNIX or NTFS.| +| aggr | create\_volume | No | aggr1 | The name of the aggregate to create the volume on.| +| volume\_type | create\_volume | No | RW | The type of volume to create. Valid options are RW and DP.| +| junction\_path | create\_volume | No | `/` | The junction path to use when creating the volume.| + +A convenient way to set all the required variable is to put them into a file named `varabless.yaml`. +All the playbooks will attempt to load this file and use any variables defined in it. Otherwise, +you can set them by using the `--extra-vars` flag when running the playbook. + +So that you don't have to hardcode secrets into the playbook, or variable files, all the playbooks +will leverage an AWS Secrets Manager secret to retrieve the credentials for FSx for ONTAP file system. + +Each secret should have two `keys`: +| Key | Value | +| --- |:--- | +| `username` | The username to use to authenticate with the FSx for ONTAP file system. | +| `password` | The password to use to authenticate with the FSx for ONTAP file system. | + +Since this script leverages the AWS Ansible collection you will need to provide authentication credentials for it. +You can read more about how to do that [here](https://docs.ansible.com/ansible/latest/collections/amazon/aws/docsite/aws_ec2_guide.html#authentication). + +## Author Information + +This repository is maintained by the contributors listed on [GitHub](https://github.com/NetApp/FSx-ONTAP-samples-scripts/graphs/contributors). + +## License + +Licensed under the Apache License, Version 2.0 (the "License"). + +You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an _"AS IS"_ basis, without WARRANTIES or conditions of any kind, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + +© 2026 NetApp, Inc. All Rights Reserved. diff --git a/Infrastructure_as_Code/Ansible/Volume_Management/create_snapshot.yaml b/Infrastructure_as_Code/Ansible/Volume_Management/create_snapshot.yaml new file mode 100644 index 0000000..707388f --- /dev/null +++ b/Infrastructure_as_Code/Ansible/Volume_Management/create_snapshot.yaml @@ -0,0 +1,72 @@ +# Title: snapshot_volume.yaml + +--- +- name: Playbook to create a snapshot on a volume on an FSx for ONTAP file system. + hosts: localhost + collections: + - netapp.ontap + - amazon.aws + gather_facts: false + vars: + use_lambda: false + vars_files: + - variables.yaml + + tasks: + - name: Ensure required variables are set. + fail: + msg: "Required variable '{{ item }}' has not been provided." + when: vars[item] is undefined + loop: + - volume_name + - snapshot_name + - vserver + - fsxn_hostname + - secret_name + + - name: Set use_lambda to true if lambda_function_name is provided. + set_fact: + use_lambda: true + when: lambda_function_name is defined + + - name: Set aws_profile to its default value of 'default' if not provided. + set_fact: + aws_profile: "default" + when: aws_profile is not defined + + - name: Ensure that aws_region has been provided if use_lambda is true. + fail: + msg: "aws_region must be defined when use_lambda is true." + when: use_lambda and aws_region is not defined + + - name: Set aws_region to "" if not set at this point. + set_fact: + aws_region: "" + when: aws_region is not defined + + - name: Set lambda_function_name to "" if not set at this point. + set_fact: + lambda_function_name: "" + when: lambda_function_name is not defined + + - name: Get username and password from AWS secret + set_fact: + username: "{{ lookup('amazon.aws.aws_secret', '{{ secret_name }}.username', nested=true) }}" + password: "{{ lookup('amazon.aws.aws_secret', '{{ secret_name }}.password', nested=true) }}" + no_log: true + + - name: Create snapshot on volume + netapp.ontap.na_ontap_snapshot: + state: present + volume: "{{ volume_name }}" + vserver: "{{ vserver }}" + snapshot: "{{ snapshot_name }}" + use_lambda: "{{ use_lambda }}" + lambda_config: + aws_profile: "{{ aws_profile }}" + aws_region: "{{ aws_region }}" + function_name: "{{ lambda_function_name }}" + hostname: "{{ fsxn_hostname }}" + username: "{{ username }}" + password: "{{ password }}" + validate_certs: false diff --git a/Infrastructure_as_Code/Ansible/Volume_Management/create_volume.yaml b/Infrastructure_as_Code/Ansible/Volume_Management/create_volume.yaml new file mode 100644 index 0000000..451139a --- /dev/null +++ b/Infrastructure_as_Code/Ansible/Volume_Management/create_volume.yaml @@ -0,0 +1,96 @@ +# Title: create_volume.yaml + +--- +- name: Playbook to create a volumes on an FSx for ONTAP file system. + hosts: localhost + collections: + - netapp.ontap + - amazon.aws + gather_facts: false + vars_files: + - variables.yaml + vars: + use_lambda: false + + tasks: + - name: Ensure required variables are set. + fail: + msg: "Required variable {{item}} has not been provided." + when: vars[item] is undefined + loop: + - volume_name + - volume_size + - vserver + - secret_name + # + # Give default values to optional variables if they are not defined + - name: Set security_style to unix if not provide. + set_fact: + security_style: "unix" + when: security_style is not defined + + - name: Set aggr to 'aggr1' if not provided. + set_fact: + aggr: "aggr1" + when: aggr is not defined + + - name: Set volume_type to "rw" if not provided. + set_fact: + volume_type: "rw" + when: volume_type is not defined + + - name: Set use_lambda to true if lambda_function_name is provided. + set_fact: + use_lambda: true + when: lambda_function_name is defined + + - name: Set aws_provide to "default" if not provided. + set_fact: + aws_profile: "default" + when: aws_profile is not defined + + - name: Set junction path to "/" if not provided. + set_fact: + junction_path: "/{{ volume_name }}" + when: junction_path is not defined + + - name: Ensure that aws_region has been provided if use_lambda is true. + fail: + msg: "aws_region must be defined when use_lambda is true." + when: use_lambda and aws_region is not defined + + - name: Set aws_region to "" if not set at this point. + set_fact: + aws_region: "" + when: aws_region is not defined + + - name: Set lambda_function_name to "" if not set at this point. + set_fact: + lambda_function_name: "" + when: lambda_function_name is not defined + + - name: Get username and password from AWS secret. + set_fact: + username: "{{ lookup('amazon.aws.aws_secret', '{{ secret_name }}.username', nested=true) }}" + password: "{{ lookup('amazon.aws.aws_secret', '{{ secret_name }}.password', nested=true) }}" + no_log: true + + - name: Create the volume + netapp.ontap.na_ontap_volume: + state: present + name: "{{ volume_name }}" + size: "{{ volume_size }}" + vserver: "{{ vserver }}" + aggregate_name: "{{ aggr }}" + junction_path: "{{ junction_path }}" + use_lambda: "{{ use_lambda }}" + lambda_config: + aws_profile: "{{ aws_profile }}" + aws_region: "{{ aws_region }}" + function_name: "{{ lambda_function_name }}" + type: "{{ volume_type }}" + size_unit: "mb" + hostname: "{{ fsxn_hostname }}" + username: "{{ username }}" + password: "{{ password }}" + validate_certs: false diff --git a/Infrastructure_as_Code/Ansible/Volume_Management/delete_snapshot.yaml b/Infrastructure_as_Code/Ansible/Volume_Management/delete_snapshot.yaml new file mode 100644 index 0000000..90a2e6e --- /dev/null +++ b/Infrastructure_as_Code/Ansible/Volume_Management/delete_snapshot.yaml @@ -0,0 +1,72 @@ +# Title: delete_snapshot.yaml + +--- +- name: Playbook to delete a snapshot from a volume on an FSx for ONTAP file system. + hosts: localhost + collections: + - netapp.ontap + - amazon.aws + gather_facts: false + vars: + use_lambda: false + vars_files: + - variables.yaml + + tasks: + - name: Ensure required variables are set. + fail: + msg: "Required variable '{{ item }}' has not been provided." + when: vars[item] is undefined + loop: + - volume_name + - snapshot_name + - vserver + - fsxn_hostname + - secret_name + + - name: Set use_lambda to true if lambda_function_name is provided. + set_fact: + use_lambda: true + when: lambda_function_name is defined + + - name: Set aws_profile to its default value of 'default' if not provided. + set_fact: + aws_profile: "default" + when: aws_profile is not defined + + - name: Ensure that aws_region has been provided if use_lambda is true. + fail: + msg: "aws_region must be defined when use_lambda is true." + when: use_lambda and aws_region is not defined + + - name: Set aws_region to "" if not set at this point. + set_fact: + aws_region: "" + when: aws_region is not defined + + - name: Set lambda_function_name to "" if not set at this point. + set_fact: + lambda_function_name: "" + when: lambda_function_name is not defined + + - name: Get username and password from AWS secret + set_fact: + username: "{{ lookup('amazon.aws.aws_secret', '{{ secret_name }}.username', nested=true) }}" + password: "{{ lookup('amazon.aws.aws_secret', '{{ secret_name }}.password', nested=true) }}" + no_log: true + + - name: Create snapshot on volume + netapp.ontap.na_ontap_snapshot: + state: absent + volume: "{{ volume_name }}" + vserver: "{{ vserver }}" + snapshot: "{{ snapshot_name }}" + use_lambda: "{{ use_lambda }}" + lambda_config: + aws_profile: "{{ aws_profile }}" + aws_region: "{{ aws_region }}" + function_name: "{{ lambda_function_name }}" + hostname: "{{ fsxn_hostname }}" + username: "{{ username }}" + password: "{{ password }}" + validate_certs: false diff --git a/Infrastructure_as_Code/Ansible/Volume_Management/delete_volume.yaml b/Infrastructure_as_Code/Ansible/Volume_Management/delete_volume.yaml new file mode 100644 index 0000000..83f2933 --- /dev/null +++ b/Infrastructure_as_Code/Ansible/Volume_Management/delete_volume.yaml @@ -0,0 +1,70 @@ +# Title: delete_volume.yaml + +--- +- name: Playbook to delete a volume on an FSx for ONTAP file system. + hosts: localhost + collections: + - netapp.ontap + - amazon.aws + gather_facts: false + vars: + use_lambda: false + vars_files: + - variables.yaml + + tasks: + - name: Ensure required variables are set. + fail: + msg: "Required variable {{item}} has not been provided." + when: vars[item] is undefined + loop: + - volume_name + - vserver + - fsxn_hostname + - secret_name + + - name: Set use_lambda to true if lambda_function_name is provided. + set_fact: + use_lambda: true + when: lambda_function_name is defined + + - name: Set aws_profile to its default value of 'default' if not provided. + set_fact: + aws_profile: "default" + when: aws_profile is not defined + + - name: Ensure that aws_region has been provided if use_lambda is true. + fail: + msg: "aws_region must be defined when use_lambda is true." + when: use_lambda and aws_region is not defined + + - name: Set aws_region to "" if not set at this point. + set_fact: + aws_region: "" + when: aws_region is not defined + + - name: Set lambda_function_name to "" if not set at this point. + set_fact: + lambda_function_name: "" + when: lambda_function_name is not defined + + - name: Get username and password from AWS secret + set_fact: + username: "{{ lookup('amazon.aws.aws_secret', '{{ secret_name }}.username', nested=true) }}" + password: "{{ lookup('amazon.aws.aws_secret', '{{ secret_name }}.password', nested=true) }}" + no_log: true + + - name: Delete the volume + netapp.ontap.na_ontap_volume: + state: absent + name: "{{ volume_name }}" + vserver: "{{ vserver }}" + use_lambda: "{{ use_lambda }}" + lambda_config: + aws_profile: "{{ aws_profile }}" + aws_region: "{{ aws_region }}" + function_name: "{{ lambda_function_name }}" + hostname: "{{ fsxn_hostname }}" + username: "{{ username }}" + password: "{{ password }}" + validate_certs: false diff --git a/Infrastructure_as_Code/Ansible/Volume_Management/variables.yaml b/Infrastructure_as_Code/Ansible/Volume_Management/variables.yaml new file mode 100644 index 0000000..62016e8 --- /dev/null +++ b/Infrastructure_as_Code/Ansible/Volume_Management/variables.yaml @@ -0,0 +1,8 @@ +volume_name: "vol1" +volume_size: 100 +vserver: "fsx" +fsxn_hostname: "10.0.0.13" +lambda_function_name: "lambda-8nlmlCR" +aws_region: "us-west-2" +secret_name: "fsxn/default" +snapshot_name: "snapshot1" From ee2521fdbd66235419aa4e5bafbbb0dfa09f0a7d Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Thu, 19 Feb 2026 19:50:03 -0600 Subject: [PATCH 13/17] Updated it to use the ONTAP Ansible collection as opposed to invoking 'curl' commands to get the SnapMirror information. --- Infrastructure_as_Code/Ansible/snapmirror_report/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Infrastructure_as_Code/Ansible/snapmirror_report/README.md b/Infrastructure_as_Code/Ansible/snapmirror_report/README.md index 1f2cb2c..36c1dc9 100644 --- a/Infrastructure_as_Code/Ansible/snapmirror_report/README.md +++ b/Infrastructure_as_Code/Ansible/snapmirror_report/README.md @@ -28,7 +28,7 @@ There are three files used to create the report: - `get_all_fsxn_regions.yaml`: A collection of tasks that retrieves all the regions, that are enabled for the account, where FSx for ONTAP is also available. - `processs_region.yaml`: A collection of tasks that will process all the FSxNs within a region. -You will also need to create a file named (by default) `secrets_list.csv` that list the secret name for each FSx file systems. +You will also need to create a file named (by default) `secrets.csv` that list the secret name for each FSx file systems. The format of the file should be: ``` file_system_id,secret_name @@ -71,4 +71,4 @@ Unless required by applicable law or agreed to in writing, software distributed See the License for the specific language governing permissions and limitations under the License. -© 2024 NetApp, Inc. All Rights Reserved. +© 2026 NetApp, Inc. All Rights Reserved. From 207e4d5e6204ab1dfeea6ef510f857c3af4569b9 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Thu, 19 Feb 2026 19:53:33 -0600 Subject: [PATCH 14/17] Added Volume Management Samples --- Infrastructure_as_Code/Ansible/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Infrastructure_as_Code/Ansible/README.md b/Infrastructure_as_Code/Ansible/README.md index aedd3e4..a79aea0 100644 --- a/Infrastructure_as_Code/Ansible/README.md +++ b/Infrastructure_as_Code/Ansible/README.md @@ -8,6 +8,7 @@ Click here for more information on [Ansible](https://www.ansible.com/). | --- | --- | | [Inventory Report](./fsx_inventory_report) | Creates a report of all the FSxN file systems within an AWS account.| | [SnapMirror Report](./snapmirror_report) | Creates a report of all SnapMirror relationships within all the FSxN file systems within an AWS account.| +| [Volume Management](./Volume_Management) | A collection of playbooks to manage volumes on FSxN file systems.| ## Author Information From c141cd1144435bffbce8b598d979373298ace4f3 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Thu, 19 Feb 2026 19:53:59 -0600 Subject: [PATCH 15/17] Added Volume Management Samples. --- Infrastructure_as_Code/Ansible/Volume_Management/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Infrastructure_as_Code/Ansible/Volume_Management/README.md b/Infrastructure_as_Code/Ansible/Volume_Management/README.md index 202a0a1..c6f42da 100644 --- a/Infrastructure_as_Code/Ansible/Volume_Management/README.md +++ b/Infrastructure_as_Code/Ansible/Volume_Management/README.md @@ -28,7 +28,7 @@ Each playbook requires various variables to be set in order to run. | fsxn\_hostname| All | Yes | None | The hostname or IP address of the FSxN where the volume resides.| | lambda\_function\_name| All | No | None | The name of the Workload Factory Link to use when issuing API calls to the FSx for ONTAP file system.| | aws\_region | All | No | None | The AWS region where the Link lambda function resides.| -| secret\_name | Yes | All | The name of the AWS secret that contains the credentials to authenticate with the FSx for ONTAP file system.| +| secret\_name | Yes | All | None | The name of the AWS secret that contains the credentials to authenticate with the FSx for ONTAP file system.| | snapshot\_name | create\_snapshot | Yes | None | The name of the snapshot to create.| | security\_style | create\_volume | No | UNIX | The security style to use when creating the volume. Valid options are UNIX or NTFS.| | aggr | create\_volume | No | aggr1 | The name of the aggregate to create the volume on.| From f2f7621c20bdb9e74e4b554c74524be2c2581f82 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Fri, 20 Feb 2026 07:29:01 -0600 Subject: [PATCH 16/17] Initial Version --- .../Ansible/Volume_Management/README.md | 84 ++++++++++++++++--- .../Ansible/snapmirror_report/README.md | 4 +- 2 files changed, 75 insertions(+), 13 deletions(-) diff --git a/Infrastructure_as_Code/Ansible/Volume_Management/README.md b/Infrastructure_as_Code/Ansible/Volume_Management/README.md index c6f42da..db16a99 100644 --- a/Infrastructure_as_Code/Ansible/Volume_Management/README.md +++ b/Infrastructure_as_Code/Ansible/Volume_Management/README.md @@ -1,8 +1,8 @@ # Ansible Volume Management samples -This folder contains to Ansible playbooks that can be used to manage volumes within a FSx for ONTAP file system. +This folder contains Ansible playbooks that can be used to manage volumes within a FSx for ONTAP file system. They have been configured to use the new `use_lambda` feature that allows it to leverage an Workload Factory Link -to issue the API calls to the FSx for ONTAP file system which alleviate the requirement of the Ansible control +to issue the API calls to the FSx for ONTAP file system which alleviates the requirement of the Ansible control node to have network connectivity to the FSx for ONTAP file system. For more information on how to set up a Workload Factory Link, please refer to the [NetApp Workload Factory documentation](https://docs.netapp.com/us-en/workload-fsx-ontap/links-overview.html). @@ -22,23 +22,25 @@ The list of playbooks included in this folder is as follows: Each playbook requires various variables to be set in order to run. | Variable | Used By Playbook | Required | Default | Description | |:-------- |:----------------:|:--------:|:-------:|:-----------| -| volume\_name| All | Yes | None | The name of the volume you want to act one.| -| volume\_size| create\_volume | Yes | None | The size, in MiBs, of the volume to create.| +| fsxn\_hostname| All | Yes | None | The hostname, or IP address, of the FSxN where the volume resides.| | vserver | All | Yes | None | The name of the vserver where the volume resides.| -| fsxn\_hostname| All | Yes | None | The hostname or IP address of the FSxN where the volume resides.| -| lambda\_function\_name| All | No | None | The name of the Workload Factory Link to use when issuing API calls to the FSx for ONTAP file system.| -| aws\_region | All | No | None | The AWS region where the Link lambda function resides.| -| secret\_name | Yes | All | None | The name of the AWS secret that contains the credentials to authenticate with the FSx for ONTAP file system.| -| snapshot\_name | create\_snapshot | Yes | None | The name of the snapshot to create.| +| secret\_name | All | Yes | None | The name of the AWS secret that contains the credentials to authenticate with the FSx for ONTAP file system.| +| volume\_name| All | Yes | None | The name of the volume you want to act on.| +| lambda\_function\_name| All | No | None | The name of the Workload Factory Link Lambda function to use when issuing API calls to the FSx for ONTAP file system.| +| aws\_region | All | No | None | The AWS region where the Lambda function resides.| +| volume\_size| create\_volume | Yes | None | The size, in MiBs, of the volume to create.| | security\_style | create\_volume | No | UNIX | The security style to use when creating the volume. Valid options are UNIX or NTFS.| | aggr | create\_volume | No | aggr1 | The name of the aggregate to create the volume on.| | volume\_type | create\_volume | No | RW | The type of volume to create. Valid options are RW and DP.| | junction\_path | create\_volume | No | `/` | The junction path to use when creating the volume.| +| snapshot\_name | create\_snapshot | Yes | None | The name of the snapshot to create.| -A convenient way to set all the required variable is to put them into a file named `varabless.yaml`. +A convenient way to set all the required variable is to put them into a file named `variables.yaml`. All the playbooks will attempt to load this file and use any variables defined in it. Otherwise, -you can set them by using the `--extra-vars` flag when running the playbook. +you can set them by using the `--extra-vars` flag when running the playbook. An example `variables.yaml` +file is included in this folder. +## Authentication So that you don't have to hardcode secrets into the playbook, or variable files, all the playbooks will leverage an AWS Secrets Manager secret to retrieve the credentials for FSx for ONTAP file system. @@ -51,6 +53,66 @@ Each secret should have two `keys`: Since this script leverages the AWS Ansible collection you will need to provide authentication credentials for it. You can read more about how to do that [here](https://docs.ansible.com/ansible/latest/collections/amazon/aws/docsite/aws_ec2_guide.html#authentication). +## Example Run: +Here is an example of running the `create_volume.yaml` playbook to create a new +volume named `vol1` with a size of 1024 MiBs on the `fsx` vserver: +```bash +$ ansible-playbook create_volume.yaml --extra-vars "volume_name=vol1 volume_size=1024 vserver=fsx" +[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' + +PLAY [Playbook to create a volumes on an FSx for ONTAP file system.] ******************************************************* + +TASK [Ensure required variables are set.] ********************************************************************************** +skipping: [localhost] => (item=volume_name) +skipping: [localhost] => (item=volume_size) +skipping: [localhost] => (item=vserver) +skipping: [localhost] => (item=secret_name) +skipping: [localhost] + +TASK [Set security_style to unix if not provide.] ************************************************************************** +ok: [localhost] + +TASK [Set aggr to 'aggr1' if not provided.] ******************************************************************************** +ok: [localhost] + +TASK [Set volume_type to "rw" if not provided.] **************************************************************************** +ok: [localhost] + +TASK [Set use_lambda to true if lambda_function_name is provided.] ********************************************************* +ok: [localhost] + +TASK [Set aws_provide to "default" if not provided.] *********************************************************************** +ok: [localhost] + +TASK [Set junction path to "/" if not provided.] ************************************************************** +ok: [localhost] + +TASK [Ensure that aws_region has been provided if use_lambda is true.] ***************************************************** +skipping: [localhost] + +TASK [Set aws_region to "" if not set at this point.] ********************************************************************** +skipping: [localhost] + +TASK [Set lambda_function_name to "" if not set at this point.] ************************************************************ +skipping: [localhost] + +TASK [Get username and password from AWS secret.] ************************************************************************** +ok: [localhost] + +TASK [Create the volume] *************************************************************************************************** +changed: [localhost] + +PLAY RECAP ***************************************************************************************************************** +localhost : ok=8 changed=1 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 +``` + +The above example had a `variables.yaml` file with the following contents: +```yaml +fsxn_hostname: "10.0.0.13" +lambda_function_name: "lambda-8nlmlCR" +aws_region: "us-west-2" +secret_name: "fsxn/default" +``` ## Author Information This repository is maintained by the contributors listed on [GitHub](https://github.com/NetApp/FSx-ONTAP-samples-scripts/graphs/contributors). diff --git a/Infrastructure_as_Code/Ansible/snapmirror_report/README.md b/Infrastructure_as_Code/Ansible/snapmirror_report/README.md index 36c1dc9..1d5e32e 100644 --- a/Infrastructure_as_Code/Ansible/snapmirror_report/README.md +++ b/Infrastructure_as_Code/Ansible/snapmirror_report/README.md @@ -23,8 +23,8 @@ the number before it represents the number of seconds. For example, 'P1DT2H3M4S' - A file with a list of the FSx for ONTAP file systems and their corresponding secrets. The format of the file is described below. ## Installation -There are three files used to create the report: -- `generate_report.yaml`: The main Ansible playbook that generates the report. +There are three components to this playbook: +- `generate_report.yaml`: The main Ansible playbook that calls the other files. - `get_all_fsxn_regions.yaml`: A collection of tasks that retrieves all the regions, that are enabled for the account, where FSx for ONTAP is also available. - `processs_region.yaml`: A collection of tasks that will process all the FSxNs within a region. From e5246499a56f91565ca3eda2ba7f7174c19cd852 Mon Sep 17 00:00:00 2001 From: Keith Cantrell Date: Fri, 20 Feb 2026 07:32:55 -0600 Subject: [PATCH 17/17] Added Ansible Volume Management --- Infrastructure_as_Code/Ansible/README.md | 6 +++--- Infrastructure_as_Code/README.md | 1 + README.md | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Infrastructure_as_Code/Ansible/README.md b/Infrastructure_as_Code/Ansible/README.md index a79aea0..5b13547 100644 --- a/Infrastructure_as_Code/Ansible/README.md +++ b/Infrastructure_as_Code/Ansible/README.md @@ -6,9 +6,9 @@ Click here for more information on [Ansible](https://www.ansible.com/). | Tool | Description | | --- | --- | -| [Inventory Report](./fsx_inventory_report) | Creates a report of all the FSxN file systems within an AWS account.| -| [SnapMirror Report](./snapmirror_report) | Creates a report of all SnapMirror relationships within all the FSxN file systems within an AWS account.| -| [Volume Management](./Volume_Management) | A collection of playbooks to manage volumes on FSxN file systems.| +| [Inventory Report](fsx_inventory_report) | Creates a report of all the FSxN file systems within an AWS account.| +| [SnapMirror Report](snapmirror_report) | Creates a report of all SnapMirror relationships within all the FSxN file systems within an AWS account.| +| [Volume Management](Volume_Management) | A collection of playbooks to manage volumes on FSxN file systems.| ## Author Information diff --git a/Infrastructure_as_Code/README.md b/Infrastructure_as_Code/README.md index 118b43e..ca49ec5 100644 --- a/Infrastructure_as_Code/README.md +++ b/Infrastructure_as_Code/README.md @@ -5,6 +5,7 @@ This folder contains code samples and automation scripts for FSx for NetApp ONTA * [Ansible](Ansible) * [FSx ONTAP inventory report](Ansible/fsx_inventory_report) * [SnapMirror report](Ansible/snapmirror_report) + * [Volume Management](Ansible/Volume_Management) * [CloudFormation](CloudFormation) * [NetApp-FSxN-Custom-Resources-Samples](CloudFormation/NetApp-FSxN-Custom-Resources-Samples) * [deploy-fsx-ontap](CloudFormation/deploy-fsx-ontap) diff --git a/README.md b/README.md index 404ae8f..d37d807 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Have a great idea? We'd love to hear it! Please email us at [ng-fsxn-github-samp * [Ansible](/Infrastructure_as_Code/Ansible) * [FSx ONTAP inventory report](/Infrastructure_as_Code/Ansible/fsx_inventory_report) * [SnapMirror report](/Infrastructure_as_Code/Ansible/snapmirror_report) + * [Volume Management](/Infrastructure_as_Code/Ansible/Volume_Management) * [CloudFormation](/Infrastructure_as_Code/CloudFormation) * [NetApp-FSxN-Custom-Resources-Samples](/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples) * [deploy-fsx-ontap](/Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap)