How to provision EC2 with FSXN filesystem with terraform

0

I would like to know if there is a way to provision EC2 instances with FSxN filesystem with terraform as it can be done with AWS Console.

GBU
已提問 8 個月前檢視次數 488 次
3 個答案
0
已接受的答案

Here is an example using Terraform to create an EC2 and mount the storage from FSx for NetApp ONTAP using iSCSI protocol. https://github.com/varunrai/fsx-ontap-sqlserver

Note: the bootstraping is done in the user data section of EC2 and uses ONTAP powershell module. There are other options besides powershell module such as REST API, Ansible or python sdk.

Depends on how you want to utilize the storage as a NAS or SAN (iSCSI). There are various mechanisms available to attach the storage to your EC2 instance.

VarunS
已回答 7 個月前
  • Hello Varun

    First of all that you very much for the detailed answer and for the example. I understand that possible to automate deployment and configuration in a different ways. I looked for a ready terraform option to choose an existing FSxN like it can be done in the console, but seems need to proceed with the flow you suggested.

    Thanks a lot for your support!

0

Hello there,

I understand that you would like to provision EC2 with FSx for NetApp ONTAP using Terraform.

You can choose to mount an existing FSx file system that you created previously, or you can create a new file system to mount to an instance at launch.

You may please refer the section "Mount an Amazon FSx file system at launch" in this documentation for detailed steps to do this from the EC2 console.

Please note that you can create an FSx for ONTAP volume using the Amazon FSx console, the AWS CLI, and the Amazon FSx API, in addition to the NetApp ONTAP command line interface (CLI) and REST API. For more information, please refer this documentation.

I also believe that you want to provision EC2 using Terraform and in that case, I would suggest you to refer the following third party links for more information.

Please note that AWS does not endorses third party links and the below link is shared on best effort for the research done related to this case.

[+] https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws/latest

[+] https://www.middlewareinventory.com/blog/terraform-aws-example-ec2/

Thank you!

AWS
支援工程師
已回答 8 個月前
0

Thank you for this valuable and detailed answer. Unfortunately I can't find an answer on my question. I do know how to automate FSxN deployment with terraform. I also know how to automate EC2 deployment, but I don't see an option in EC2 terraform deployment how to choose an existing FSxN filesystem, existing SVM and existing Volume, and how to configure a mount point. All those options are available in the AWS EC2 Console.

GBU
已回答 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南