Created
January 17, 2017 15:33
-
-
Save katesclau/85e65290122bced1b3b070865e89d04b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_efs_file_system" "filesystem" { | |
creation_token = "${var.efs_name}" | |
} | |
resource "aws_efs_mount_target" "fs_target" { | |
file_system_id = "${aws_efs_file_system.filesystem.id}" | |
subnet_id = "${var.subnet_id}" | |
security_groups = ["${var.vpc_sg_ids}"] | |
} | |
output "efs_id" { value = "${aws_efs_file_system.filesystem.id}" } | |
output "net_id" { value = "${aws_efs_file_system.filesystem.network_interface_id}" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Network & Region | |
variable "subnet_id" {} | |
variable "vpc_sg_ids" {} | |
# Name | |
variable "efs_name" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EFS | |
module "filesystem" { | |
source = "./efs" | |
efs_name = "${var.efs_name}" | |
vpc_sg_ids = "${var.vpc_sg_ids}" | |
subnet_id = "${var.subnet_id}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Location and Network ===================================== | |
variable "subnet_id" { default = "<subnet-id>" } | |
variable "vpc_sg_ids" { default = "<security-group-ids>" } | |
# EFS ====================================================== | |
# Name | |
variable "efs_name" { default = "cluster-tut-efs" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment