Skip to content

Commit

Permalink
Revert "feature(terraform): adding efs configuration for api service"
Browse files Browse the repository at this point in the history
This reverts commit 61c6945.
  • Loading branch information
chris-lorro committed Apr 18, 2024
1 parent 61c6945 commit 7b739e1
Showing 1 changed file with 0 additions and 58 deletions.
58 changes: 0 additions & 58 deletions infra/terraform/modules/service/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,61 +61,3 @@ module "ecs_service" {
security_group_ids = var.services[each.key].security_group_ids
subnet_ids = var.services[each.key].subnet_ids
}

module "efs" {
for_each = var.services

source = "terraform-aws-modules/efs/aws"
version = "1.6.2"

name = "vol-app-${var.environment}-${each.key}-efs"
creation_token = "vol-app-${var.environment}-${each.key}-token"
encrypted = true

attach_policy = true
bypass_policy_lockout_safety_check = false
policy_statements = [
{
sid = "vol-app-${var.environment}-${each.key}-policy"
actions = [
"elasticfilesystem:ClientMount",
"elasticfilesystem:ClientWrite",
]
principals = [
{
type = "AWS"
identifiers = [data.aws_caller_identity.current.arn]
}
]
}
]

mount_targets = { for k, v in zipmap(module.vpc.fgms_vpc_az, var.services[each.key].subnet_ids) : k => { subnet_id = v } }
security_group_description = "${var.services[each.key]} EFS security group"
security_group_vpc_id = module.vpc.fgms_vpc_id
security_group_rules = {
vpc = {
# relying on the defaults provdied for EFS/NFS (2049/TCP + ingress)
description = "NFS ingress from VPC private subnets"
cidr_blocks = module.vpc.fgms_private_subnets_cidr
}
}

access_points = {
data_cache = {
root_directory = {
path = "/${var.services[each.key]}/data/cache"
creation_info = {
owner_gid = 1001
owner_uid = 1001
permissions = "755"
}
}
}
}

enable_backup_policy = false

create_replication_configuration = false

}

0 comments on commit 7b739e1

Please sign in to comment.