How to create EFS in Multi-AZ with Terraform


I have launched two EC2 instances in two availability zones and I need to mount the EFS in both the instances using Terraform.

Using the above code I am able to create EFS in us-east-1a. I need to make it available in both us-east-1a and us-east-1b.


You just need to add another mount target in a subnet in AZ us-east-1b:

More elegant (using count dependent on the number of subnets):

Leave a Reply