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
demandé il y a 8 mois487 vues
3 réponses
0
Réponse acceptée

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
répondu il y a 7 mois
  • 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
INGÉNIEUR EN ASSISTANCE TECHNIQUE
répondu il y a 8 mois
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
répondu il y a 8 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions