From 6373927d601aee437454919ae0f9bfc0428cac5c Mon Sep 17 00:00:00 2001 From: Sam Ainsworth Date: Thu, 12 Oct 2023 15:21:05 +0100 Subject: [PATCH] Fix refactor.tf --- terraform/environment/refactor.tf | 10 ++++++++++ terraform/environment/region/actor_load_balancer.tf | 2 +- terraform/environment/region/viewer_load_balancer.tf | 5 ----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/terraform/environment/refactor.tf b/terraform/environment/refactor.tf index 4f3d579508..e33b4e3408 100644 --- a/terraform/environment/refactor.tf +++ b/terraform/environment/refactor.tf @@ -381,3 +381,13 @@ moved { from = aws_ssm_parameter.viewer_maintenance_switch to = module.eu_west_1.aws_ssm_parameter.viewer_maintenance_switch } + +moved { + from = aws_security_group_rule.actor_loadbalancer_ingress_production[0] + to = module.eu_west_1.aws_security_group_rule.actor_loadbalancer_ingress_public_access[0] +} + +moved { + from = aws_security_group_rule.viewer_loadbalancer_ingress_public_access[0] + to = module.eu_west_1.aws_security_group_rule.viewer_loadbalancer_ingress_public_access[0] +} diff --git a/terraform/environment/region/actor_load_balancer.tf b/terraform/environment/region/actor_load_balancer.tf index 3a306fd88b..7040515bf5 100644 --- a/terraform/environment/region/actor_load_balancer.tf +++ b/terraform/environment/region/actor_load_balancer.tf @@ -237,7 +237,7 @@ resource "aws_security_group_rule" "actor_loadbalancer_ingress" { provider = aws.region } -resource "aws_security_group_rule" "actor_loadbalancer_ingress_production" { +resource "aws_security_group_rule" "actor_loadbalancer_ingress_public_access" { count = var.public_access_enabled ? 1 : 0 description = "Port 443 ingress for production from the internet to the application load balancer" type = "ingress" diff --git a/terraform/environment/region/viewer_load_balancer.tf b/terraform/environment/region/viewer_load_balancer.tf index 61d2bb8453..259f3eb484 100644 --- a/terraform/environment/region/viewer_load_balancer.tf +++ b/terraform/environment/region/viewer_load_balancer.tf @@ -254,11 +254,6 @@ resource "aws_security_group_rule" "viewer_loadbalancer_ingress_public_access" { provider = aws.region } -moved { - from = aws_security_group_rule.viewer_loadbalancer_ingress_production[0] - to = aws_security_group_rule.viewer_loadbalancer_ingress_public_access[0] -} - resource "aws_security_group_rule" "viewer_loadbalancer_egress" { description = "Allow any egress from View service load balancer" type = "egress"