Skip to content

Commit

Permalink
Merge pull request #16 from clouddrove/cd22
Browse files Browse the repository at this point in the history
add bool
  • Loading branch information
Sohan Yadav committed Sep 6, 2022
2 parents 4b1f6af + 0cbb5c9 commit 5df8dfd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource "aws_security_group" "default" {
}

resource "aws_efs_backup_policy" "policy" {
count = var.efs_enabled ? 1 : 0
count = var.efs_enabled && var.efs_backup_policy_enabled == "ENABLED" ? 1 : 0

file_system_id = join("", aws_efs_file_system.default.*.id)

Expand All @@ -87,7 +87,7 @@ resource "aws_efs_backup_policy" "policy" {
}
}
resource "aws_efs_access_point" "default" {
count = var.efs_enabled ? 1 : 0
count = var.efs_enabled && var.access_point_enabled ? 1 : 0
file_system_id = join("", aws_efs_file_system.default.*.id)

tags = module.label.tags
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,9 @@ variable "allow_cidr" {
type = list(any)
default = []
description = "Provide allowed cidr to efs"
}

variable "access_point_enabled" {
type = bool
default = true
}

0 comments on commit 5df8dfd

Please sign in to comment.