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달 전487회 조회
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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠