File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ resource "aws_security_group" "default" {
7878}
7979
8080resource "aws_efs_backup_policy" "policy" {
81- count = var. efs_enabled ? 1 : 0
81+ count = var. efs_enabled && var . efs_backup_policy_enabled == " ENABLED " ? 1 : 0
8282
8383 file_system_id = join (" " , aws_efs_file_system. default . * . id )
8484
@@ -87,7 +87,7 @@ resource "aws_efs_backup_policy" "policy" {
8787 }
8888}
8989resource "aws_efs_access_point" "default" {
90- count = var. efs_enabled ? 1 : 0
90+ count = var. efs_enabled && var . access_point_enabled ? 1 : 0
9191 file_system_id = join (" " , aws_efs_file_system. default . * . id )
9292
9393 tags = module. label . tags
Original file line number Diff line number Diff line change @@ -146,4 +146,9 @@ variable "allow_cidr" {
146146 type = list (any )
147147 default = []
148148 description = " Provide allowed cidr to efs"
149+ }
150+
151+ variable "access_point_enabled" {
152+ type = bool
153+ default = true
149154}
You can’t perform that action at this time.
0 commit comments