From fa355d79f20c2cf109e3b892facffb026b0e6a7b Mon Sep 17 00:00:00 2001 From: Pat Heard Date: Mon, 23 Sep 2024 09:33:25 -0400 Subject: [PATCH] chore: remove the `moved` blocks that are no longer needed Remove all `moved` blocks as the Terraform state migrations have now been performed in Prod. --- aws/alarms/moved.tf | 64 --------------- aws/ecr/moved.tf | 19 ----- aws/load_balancer/certificates.tf | 5 -- aws/load_balancer/lb.tf | 15 ---- aws/load_balancer/moved.tf | 29 ------- aws/load_balancer/route53.tf | 11 --- aws/network/moved.tf | 124 ------------------------------ 7 files changed, 267 deletions(-) delete mode 100644 aws/alarms/moved.tf delete mode 100644 aws/ecr/moved.tf delete mode 100644 aws/load_balancer/moved.tf delete mode 100644 aws/network/moved.tf diff --git a/aws/alarms/moved.tf b/aws/alarms/moved.tf deleted file mode 100644 index 996447c89..000000000 --- a/aws/alarms/moved.tf +++ /dev/null @@ -1,64 +0,0 @@ -moved { - from = aws_cloudwatch_metric_alarm.api_cpu_utilization_high_warn[0] - to = aws_cloudwatch_metric_alarm.api_cpu_utilization_high_warn -} - -moved { - from = aws_cloudwatch_metric_alarm.api_memory_utilization_high_warn[0] - to = aws_cloudwatch_metric_alarm.api_memory_utilization_high_warn -} - -moved { - from = aws_cloudwatch_log_subscription_filter.api_error_detection[0] - to = aws_cloudwatch_log_subscription_filter.api_error_detection -} - -moved { - from = aws_cloudwatch_metric_alarm.api_lb_unhealthy_host_count[0] - to = aws_cloudwatch_metric_alarm.api_lb_unhealthy_host_count -} - -moved { - from = aws_cloudwatch_metric_alarm.api_lb_healthy_host_count[0] - to = aws_cloudwatch_metric_alarm.api_lb_healthy_host_count -} - -moved { - from = aws_cloudwatch_metric_alarm.api_response_time_warn[0] - to = aws_cloudwatch_metric_alarm.api_response_time_warn -} - -moved { - from = aws_cloudwatch_metric_alarm.idp_cpu_utilization_high_warn[0] - to = aws_cloudwatch_metric_alarm.idp_cpu_utilization_high_warn -} - -moved { - from = aws_cloudwatch_metric_alarm.idp_memory_utilization_high_warn[0] - to = aws_cloudwatch_metric_alarm.idp_memory_utilization_high_warn -} - -moved { - from = aws_cloudwatch_log_subscription_filter.idp_error_detection[0] - to = aws_cloudwatch_log_subscription_filter.idp_error_detection -} - -moved { - from = aws_cloudwatch_metric_alarm.idp_response_time_warn[0] - to = aws_cloudwatch_metric_alarm.idp_response_time_warn -} - -moved { - from = aws_cloudwatch_metric_alarm.idp_rds_cpu_utilization[0] - to = aws_cloudwatch_metric_alarm.idp_rds_cpu_utilization -} - -moved { - from = aws_cloudwatch_metric_alarm.idp_bounce_rate_high[0] - to = aws_cloudwatch_metric_alarm.idp_bounce_rate_high -} - -moved { - from = aws_cloudwatch_metric_alarm.idp_complaint_rate_high[0] - to = aws_cloudwatch_metric_alarm.idp_complaint_rate_high -} \ No newline at end of file diff --git a/aws/ecr/moved.tf b/aws/ecr/moved.tf deleted file mode 100644 index c4e34f909..000000000 --- a/aws/ecr/moved.tf +++ /dev/null @@ -1,19 +0,0 @@ -moved { - from = aws_ecr_repository.idp[0] - to = aws_ecr_repository.idp -} - -moved { - from = aws_ecr_lifecycle_policy.idp[0] - to = aws_ecr_lifecycle_policy.idp -} - -moved { - from = aws_ecr_repository.api[0] - to = aws_ecr_repository.api -} - -moved { - from = aws_ecr_lifecycle_policy.api[0] - to = aws_ecr_lifecycle_policy.api -} diff --git a/aws/load_balancer/certificates.tf b/aws/load_balancer/certificates.tf index d15c1bdd8..d6ae69fe6 100644 --- a/aws/load_balancer/certificates.tf +++ b/aws/load_balancer/certificates.tf @@ -46,8 +46,3 @@ resource "aws_acm_certificate_validation" "forms_api" { certificate_arn = aws_acm_certificate.forms_api.arn validation_record_fqdns = [for record in aws_route53_record.forms_api_certificate_validation : record.fqdn] } - -moved { - from = aws_acm_certificate_validation.form_api - to = aws_acm_certificate_validation.forms_api -} diff --git a/aws/load_balancer/lb.tf b/aws/load_balancer/lb.tf index 67768de63..683eff8b1 100644 --- a/aws/load_balancer/lb.tf +++ b/aws/load_balancer/lb.tf @@ -95,11 +95,6 @@ resource "aws_lb_target_group" "forms_api" { } } -moved { - from = aws_lb_target_group.form_api - to = aws_lb_target_group.forms_api -} - resource "aws_lb_listener" "form_viewer_https" { depends_on = [ aws_acm_certificate.form_viewer @@ -128,11 +123,6 @@ resource "aws_lb_listener_certificate" "forms_api_https" { certificate_arn = aws_acm_certificate_validation.forms_api.certificate_arn } -moved { - from = aws_lb_listener_certificate.form_api_https - to = aws_lb_listener_certificate.forms_api_https -} - resource "aws_lb_listener" "form_viewer_http" { load_balancer_arn = aws_lb.form_viewer.arn port = "80" @@ -170,8 +160,3 @@ resource "aws_alb_listener_rule" "forms_api" { } } } - -moved { - from = aws_alb_listener_rule.form_api - to = aws_alb_listener_rule.forms_api -} diff --git a/aws/load_balancer/moved.tf b/aws/load_balancer/moved.tf deleted file mode 100644 index de42a196f..000000000 --- a/aws/load_balancer/moved.tf +++ /dev/null @@ -1,29 +0,0 @@ -moved { - from = aws_acm_certificate.forms_api[0] - to = aws_acm_certificate.forms_api -} - -moved { - from = aws_acm_certificate_validation.forms_api[0] - to = aws_acm_certificate_validation.forms_api -} - -moved { - from = aws_lb_target_group.forms_api[0] - to = aws_lb_target_group.forms_api -} - -moved { - from = aws_lb_listener_certificate.forms_api_https[0] - to = aws_lb_listener_certificate.forms_api_https -} - -moved { - from = aws_alb_listener_rule.forms_api[0] - to = aws_alb_listener_rule.forms_api -} - -moved { - from = aws_route53_record.forms_api[0] - to = aws_route53_record.forms_api -} diff --git a/aws/load_balancer/route53.tf b/aws/load_balancer/route53.tf index 7681df8dd..a3c8a1090 100644 --- a/aws/load_balancer/route53.tf +++ b/aws/load_balancer/route53.tf @@ -53,12 +53,6 @@ resource "aws_route53_record" "forms_api" { } } -moved { - from = aws_route53_record.form_api - to = aws_route53_record.forms_api -} - - # # Certificate validation # @@ -125,8 +119,3 @@ resource "aws_route53_record" "forms_api_certificate_validation" { type = each.value.type zone_id = var.hosted_zone_ids[0] } - -moved { - from = aws_route53_record.form_api_certificate_validation - to = aws_route53_record.forms_api_certificate_validation -} diff --git a/aws/network/moved.tf b/aws/network/moved.tf deleted file mode 100644 index 83959bd33..000000000 --- a/aws/network/moved.tf +++ /dev/null @@ -1,124 +0,0 @@ -moved { - from = aws_security_group.api_ecs[0] - to = aws_security_group.api_ecs -} - -moved { - from = aws_security_group_rule.api_ecs_egress_internet[0] - to = aws_security_group_rule.api_ecs_egress_internet -} - -moved { - from = aws_security_group_rule.api_ecs_egress_privatelink[0] - to = aws_security_group_rule.api_ecs_egress_privatelink -} - -moved { - from = aws_security_group_rule.api_ecs_ingress_lb[0] - to = aws_security_group_rule.api_ecs_ingress_lb -} - -moved { - from = aws_security_group_rule.lb_egress_api_ecs[0] - to = aws_security_group_rule.lb_egress_api_ecs -} - -moved { - from = aws_security_group_rule.db_ingress_api_ecs[0] - to = aws_security_group_rule.db_ingress_api_ecs -} - -moved { - from = aws_security_group_rule.api_ecs_egress_db[0] - to = aws_security_group_rule.api_ecs_egress_db -} - -moved { - from = aws_security_group_rule.redis_ingress_api_ecs[0] - to = aws_security_group_rule.redis_ingress_api_ecs -} - -moved { - from = aws_security_group_rule.api_ecs_egress_redis[0] - to = aws_security_group_rule.api_ecs_egress_redis -} - -moved { - from = aws_security_group_rule.privatelink_idp_ecs_ingress[0] - to = aws_security_group_rule.privatelink_idp_ecs_ingress -} - -moved { - from = aws_security_group_rule.privatelink_idp_db_ingress[0] - to = aws_security_group_rule.privatelink_idp_db_ingress -} - -moved { - from = aws_security_group_rule.privatelink_api_ecs_ingress[0] - to = aws_security_group_rule.privatelink_api_ecs_ingress -} - -moved { - from = aws_security_group.idp_ecs[0] - to = aws_security_group.idp_ecs -} - -moved { - from = aws_security_group_rule.idp_ecs_egress_internet[0] - to = aws_security_group_rule.idp_ecs_egress_internet -} - -moved { - from = aws_security_group_rule.idp_ecs_egress_smtp_tls[0] - to = aws_security_group_rule.idp_ecs_egress_smtp_tls -} - -moved { - from = aws_security_group_rule.idp_ecs_egress_privatelink[0] - to = aws_security_group_rule.idp_ecs_egress_privatelink -} - -moved { - from = aws_security_group_rule.idp_ecs_ingress_lb[0] - to = aws_security_group_rule.idp_ecs_ingress_lb -} - -moved { - from = aws_security_group.idp_lb[0] - to = aws_security_group.idp_lb -} - -moved { - from = aws_security_group_rule.idp_lb_ingress_internet_http[0] - to = aws_security_group_rule.idp_lb_ingress_internet_http -} - -moved { - from = aws_security_group_rule.idp_lb_ingress_internet_https[0] - to = aws_security_group_rule.idp_lb_ingress_internet_https -} - -moved { - from = aws_security_group_rule.idp_lb_egress_ecs[0] - to = aws_security_group_rule.idp_lb_egress_ecs -} - -moved { - from = aws_security_group.idp_db[0] - to = aws_security_group.idp_db -} - -moved { - from = aws_security_group_rule.idp_db_ingress_ecs[0] - to = aws_security_group_rule.idp_db_ingress_ecs -} - -moved { - from = aws_security_group_rule.idp_ecs_egress_db[0] - to = aws_security_group_rule.idp_ecs_egress_db -} - -moved { - from = aws_security_group_rule.idp_db_egress_privatelink[0] - to = aws_security_group_rule.idp_db_egress_privatelink -}