From b5bd70c48637283eb46b0730a96a9b1235576703 Mon Sep 17 00:00:00 2001 From: Ben Corlett Date: Fri, 8 Dec 2023 14:30:20 +0000 Subject: [PATCH] Remove PSN vpn endpoint in production london --- terraform/psn/psn.tf | 58 ++------------------------------------------ 1 file changed, 2 insertions(+), 56 deletions(-) diff --git a/terraform/psn/psn.tf b/terraform/psn/psn.tf index e9bc428b5a..01f4e7a848 100644 --- a/terraform/psn/psn.tf +++ b/terraform/psn/psn.tf @@ -18,60 +18,6 @@ variable "security_group_name" { description = "The security group to allow access to the PSN VPC Endpoint." } -data "aws_security_group" "security_group" { - name = var.security_group_name -} - -resource "aws_vpc_endpoint" "psn_service" { - vpc_id = var.vpc_id - service_name = var.vpc_endpoint - vpc_endpoint_type = "Interface" - - security_group_ids = [aws_security_group.psn_endpoint.id] - - subnet_ids = var.subnet_ids - private_dns_enabled = false -} - -resource "aws_security_group" "psn_endpoint" { - name = "psn-endpoint" - description = "The PSN VPC Endpoint" - vpc_id = var.vpc_id -} - -resource "aws_security_group_rule" "psn_ingress_from_cells" { - security_group_id = aws_security_group.psn_endpoint.id - - type = "ingress" - protocol = "tcp" - from_port = 3128 - to_port = 3128 - - source_security_group_id = data.aws_security_group.security_group.id -} - -resource "aws_security_group_rule" "cells_egress_to_psn" { - security_group_id = data.aws_security_group.security_group.id - - type = "egress" - protocol = "tcp" - from_port = 3128 - to_port = 3128 - - source_security_group_id = aws_security_group.psn_endpoint.id -} - -data "aws_network_interface" "psn_interface" { - for_each = aws_vpc_endpoint.psn_service.network_interface_ids - - id = each.value -} - output "psn_security_group_seed_json" { - value = templatefile( - "${path.module}/data/security-group-seed.json.tpl", - { - psn_cidrs = [for interface in data.aws_network_interface.psn_interface : interface.private_ip] - } - ) -} + value = "[]" +} \ No newline at end of file