diff --git a/examples/vpc-region-shared-setup/vpc-endpoints.tf b/examples/vpc-region-shared-setup/vpc-endpoints.tf deleted file mode 100644 index a473c6e..0000000 --- a/examples/vpc-region-shared-setup/vpc-endpoints.tf +++ /dev/null @@ -1,65 +0,0 @@ -# dynamodb and s3 gateway endpoints defined in vpc module - -# select here where label starts with app- -# private_subnets_ids = data.terraform_remote_state.vpc_east_vpc3.outputs.private_subnets_ids -# or use data - -# some help from here: https://dev.to/danquack/private-fargate-deployment-with-vpc-endpoints-1h0p - -locals { - security_group_ids = [module.sg_web.this_security_group_id] - - # currently this list doesn't do anything, but it's mostly to track what is in place here. A future - # revision of the vpc endpoints module will allow this as a for_each (tf 0.13+) - # keep in alphabetical order in the list and the file - - # disable by setting to null - # enable by setting to "", or if it require a different service name, set that - vpc_endpoints = { - ## "autoscaling" = "" - ## "ec2" = "" - ## "ec2messages" = "" - ## "ecr.api" = "" - ## "ecr.dkr" = "" - ## "ecs" = "" - ## "elasticfilesystem" = "" - ## "elasticloadbalancing" = "" - ## "kms" = "" - ## "logs" = "" - ## "secretsmanager" = "" - ## "ssm" = "" - ## "ssmmessages" = "" - ## "sts" = "" - } -} - -data "aws_subnets" "endpoint_subnets" { - filter { - name = "vpc-id" - values = [local.vpc_id] - } - filter { - name = "tag:Name" - values = ["*-endpoints-*"] - } -} - -module "vpce" { - for_each = { for k, v in local.vpc_endpoints : k => v if v != null } - source = "git@github.e.it.census.gov:terraform-modules/aws-vpc-setup.git//vpc-interface-endpoint?ref=tf-upgrade" - - service = each.value == "" ? each.key : each.value - subnet_ids = tolist(data.aws_subnets.endpoint_subnets.ids) - security_group_ids = local.security_group_ids - - vpc_id = local.vpc_id - vpc_full_name = var.vpc_full_name - vpc_environment = var.vpc_environment - - tags = merge( - local.tags, - local.common_tags, - var.account_tags, - var.application_tags, - ) -}