The AWS::EFS::MountTarget
resource is an Amazon EFS resource that creates a mount target for an EFS file system. You can then mount the file system on Amazon EC2 instances or other resources by using the mount target.
To use awscc_efs_mount_target
with awscc_efs_file_system
:
resource "awscc_efs_mount_target" "main" {
file_system_id = awscc_efs_file_system.main.id
subnet_id = awscc_ec2_subnet.main.id
security_groups = ["sg-xxxxxx"]
}
resource "awscc_efs_file_system" "main" {
file_system_tags = [
{
key = "Name"
value = "this"
},
{
key = "Modified By"
value = "AWSCC"
}
]
}
resource "awscc_ec2_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "awscc_ec2_subnet" "main" {
vpc_id = resource.awscc_ec2_vpc.main.id
cidr_block = "10.0.1.0/24"
tags = [{
key = "Modified By"
value = "AWSCC"
}]
}
file_system_id
(String) The ID of the file system for which to create the mount target.security_groups
(Set of String) Up to five VPC security group IDs, of the form sg-xxxxxxxx
. These must be for the same VPC as subnet specified.subnet_id
(String) The ID of the subnet to add the mount target in. For One Zone file systems, use the subnet that is associated with the file system's Availability Zone.ip_address
(String) Valid IPv4 address within the address range of the specified subnet.id
(String) Uniquely identifies the resource.mount_target_id
(String)Import is supported using the following syntax:
$ terraform import awscc_efs_mount_target.example <resource ID>