forked from ibm-cloud-architecture/terraform-icp-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathefs.tf
31 lines (28 loc) · 1.09 KB
/
efs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
resource "aws_efs_file_system" "icp-registry" {
count = "${var.master["nodes"] > 1 ? 1 : 0 }"
creation_token = "icp-${random_id.clusterid.hex}-registry"
tags = "${merge(
var.default_tags,
map("Name", "icp-registry")
)}"
}
resource "aws_efs_mount_target" "icp-registry" {
count = "${var.master["nodes"] > 1 ? var.master["nodes"] : 0 }"
file_system_id = "${aws_efs_file_system.icp-registry.id}"
subnet_id = "${element(aws_subnet.icp_private_subnet.*.id, count.index)}"
security_groups = [ "${aws_security_group.icp-registry-mount.id}"]
}
resource "aws_efs_file_system" "icp-audit" {
count = "${var.master["nodes"] > 1 ? 1 : 0 }"
creation_token = "icp-${random_id.clusterid.hex}-audit"
tags = "${merge(
var.default_tags,
map("Name", "icp-audit")
)}"
}
resource "aws_efs_mount_target" "icp-audit" {
count = "${var.master["nodes"] > 1 ? var.master["nodes"] : 0 }"
file_system_id = "${aws_efs_file_system.icp-audit.id}"
subnet_id = "${element(aws_subnet.icp_private_subnet.*.id, count.index)}"
security_groups = [ "${aws_security_group.icp-audit-mount.id}"]
}