-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathefs.tf
More file actions
39 lines (34 loc) · 966 Bytes
/
Copy pathefs.tf
File metadata and controls
39 lines (34 loc) · 966 Bytes
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
32
33
34
35
36
37
38
39
resource "aws_efs_file_system" "EFS" {
creation_token = "my-unique-creation-token"
encrypted = true
performance_mode = "generalPurpose"
lifecycle_policy {
# Disable automatic backups
transition_to_ia = "AFTER_30_DAYS"
}
provisioned_throughput_in_mibps = 0.0
tags = {
Name = "EFS-PROmet"
}
}
# Attach the EFS instance to the security group
resource "aws_efs_mount_target" "EFS-mount-target-1" {
security_groups = [aws_security_group.EFS-sg.id]
file_system_id = aws_efs_file_system.EFS.id
subnet_id = aws_subnet.application-subnet-1.id
lifecycle {
ignore_changes = [
ip_address
]
}
}
resource "aws_efs_mount_target" "EFS-mount-target-2" {
security_groups = [aws_security_group.EFS-sg.id]
file_system_id = aws_efs_file_system.EFS.id
subnet_id = aws_subnet.application-subnet-2.id
lifecycle {
ignore_changes = [
ip_address
]
}
}