From 7b739e15091e94c5a400e780b42980cdc0ce72ba Mon Sep 17 00:00:00 2001 From: chris lawrence Date: Thu, 18 Apr 2024 12:13:24 +0100 Subject: [PATCH] Revert "feature(terraform): adding efs configuration for api service" This reverts commit 61c6945e10da22a80b6e8102af6113d9433f20b2. --- infra/terraform/modules/service/ecs.tf | 58 -------------------------- 1 file changed, 58 deletions(-) diff --git a/infra/terraform/modules/service/ecs.tf b/infra/terraform/modules/service/ecs.tf index f7495cfd97..58e9b5a776 100644 --- a/infra/terraform/modules/service/ecs.tf +++ b/infra/terraform/modules/service/ecs.tf @@ -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 - -} \ No newline at end of file