Skip to content

Move five non-production services to bridge networking - #261

Merged
ale210 merged 1 commit into
mainfrom
253-nonprod-bridge
Oct 10, 2026
Merged

ale210 merged 1 commit into
mainfrom
253-nonprod-bridge

Conversation

@ale210

@ale210 ale210 commented Oct 10, 2026

Copy link
Copy Markdown
Member

For #253. This is the second PR, moving the remaining five non-production services to bridge networking after the people-depot-backend-dev pilot (#260) checked out.

Adds network_mode = "bridge" to:

  • civic-tech-index-backend-stage
  • civic-tech-jobs-fullstack-stage
  • home-unite-us-fullstack-qa
  • vrms-backend-dev
  • vrms-frontend-dev

Each service will be unreachable for about two minutes during the apply. Each project's team should be told before this merges.

Expected plan: 10 to add, 10 to change, 25 to destroy. That is five copies of the pilot's 2/2/5. For each service: ECS service updated in place, task definition replaced, target group replaced by an instance-type one, listener rule updated in place, and the security group plus its two rules destroyed. If any ECS service shows as replaced, do not merge.

vrms-frontend-dev has been at 0/1, failing to start, since before this epic began. Moving it changes nothing for users. It will not pass the post-merge "1/1 and answers at its hostname" check, and that failure is not caused by this PR.

Pilot results: the service was updated in place, its target became healthy on a dynamic host port, and from inside the task an instance metadata token request times out while the task's own ECS credentials still work.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Terraform plan in terraform
With backend config files: terraform/prod.backend.tfvars

Plan: 10 to add, 10 to change, 25 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place
-   destroy
-/+ destroy and then create replacement
+/- create replacement and then destroy

Terraform will perform the following actions:

  # module.civic-tech-index.module.backend_stage_service.aws_ecs_service.fargate[0] will be updated in-place
!~  resource "aws_ecs_service" "fargate" {
        id                                 = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/civic-tech-index-backend-stage"
        name                               = "civic-tech-index-backend-stage"
        tags                               = {
            "project" = "civic-tech-index"
        }
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/civic-tech-index-backend-stage:2" -> (known after apply)
#        (18 unchanged attributes hidden)

-       load_balancer {
-           container_name   = "civic-tech-index-backend-stage" -> null
-           container_port   = 8000 -> null
-           target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/cti-be-stage-145/7e08a002bf53e76d" -> null
#            (1 unchanged attribute hidden)
        }
+       load_balancer {
+           container_name   = "civic-tech-index-backend-stage"
+           container_port   = 8000
+           target_group_arn = (known after apply)
#            (1 unchanged attribute hidden)
        }

-       network_configuration {
-           assign_public_ip = false -> null
-           security_groups  = [
-               "sg-0bc827eede3aa095c",
            ] -> null
-           subnets          = [
-               "subnet-03ed55f60a6c28e72",
-               "subnet-089e80a53e1522e28",
            ] -> null
        }

#        (5 unchanged blocks hidden)
    }

  # module.civic-tech-index.module.backend_stage_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/civic-tech-index-backend-stage:2" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/civic-tech-index-backend-stage" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
-                   mountPoints            = []
                    name                   = "civic-tech-index-backend-stage"
!~                  portMappings           = [
!~                      {
!~                          hostPort      = 8000 -> 0
-                           protocol      = "tcp"
#                            (1 unchanged attribute hidden)
                        },
                    ]
-                   systemControls         = []
-                   volumesFrom            = []
#                    (8 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "******************************" -> (known after apply)
!~      network_mode             = "awsvpc" -> "bridge" # forces replacement
!~      revision                 = 2 -> (known after apply)
        tags                     = {
            "project" = "civic-tech-index"
        }
#        (12 unchanged attributes hidden)
    }

  # module.civic-tech-index.module.backend_stage_service.aws_lb_listener_rule.static will be updated in-place
!~  resource "aws_lb_listener_rule" "static" {
        id           = "arn:aws:elasticloadbalancing:us-west-2:035866691871:listener-rule/app/incubator-prod-lb/7451adf77133ef36/390a225766a4daf3/6c6bd28e830d0f4a"
        tags         = {}
#        (5 unchanged attributes hidden)

!~      action {
!~          target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/cti-be-stage-145/7e08a002bf53e76d" -> (known after apply)
#            (2 unchanged attributes hidden)
        }

#        (2 unchanged blocks hidden)
    }

  # module.civic-tech-index.module.backend_stage_service.aws_lb_target_group.this must be replaced
+/- resource "aws_lb_target_group" "this" {
!~      arn                                = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/cti-be-stage-145/7e08a002bf53e76d" -> (known after apply)
!~      arn_suffix                         = "targetgroup/cti-be-stage-145/7e08a002bf53e76d" -> (known after apply)
+       connection_termination             = (known after apply)
!~      id                                 = "*************************************************************************************************" -> (known after apply)
!~      ip_address_type                    = "ipv4" -> (known after apply)
!~      load_balancer_arns                 = [
-           "arn:aws:elasticloadbalancing:us-west-2:035866691871:loadbalancer/app/incubator-prod-lb/7451adf77133ef36",
        ] -> (known after apply)
!~      load_balancing_algorithm_type      = "round_robin" -> (known after apply)
!~      load_balancing_anomaly_mitigation  = "off" -> (known after apply)
!~      load_balancing_cross_zone_enabled  = "use_load_balancer_configuration" -> (known after apply)
!~      name                               = "cti-be-stage-145" -> "cti-be-stage-ab6" # forces replacement
+       name_prefix                        = (known after apply)
+       preserve_client_ip                 = (known after apply)
!~      protocol_version                   = "HTTP1" -> (known after apply)
-       tags                               = {} -> null
-       target_control_port                = 0 -> null
!~      target_type                        = "ip" -> "instance" # forces replacement
#        (9 unchanged attributes hidden)

!~      health_check {
!~          timeout             = 5 -> (known after apply)
#            (8 unchanged attributes hidden)
        }

!~      stickiness (known after apply)
-       stickiness {
-           cookie_duration = 86400 -> null
-           enabled         = false -> null
-           type            = "lb_cookie" -> null
#            (1 unchanged attribute hidden)
        }

!~      target_failover (known after apply)
-       target_failover {}

!~      target_group_health (known after apply)
-       target_group_health {
-           dns_failover {
-               minimum_healthy_targets_count      = "1" -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
-           unhealthy_state_routing {
-               minimum_healthy_targets_count      = 1 -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
        }

!~      target_health_state {
+           enable_unhealthy_connection_termination = false
+           unhealthy_draining_interval             = 0
        }
    }

  # module.civic-tech-index.module.backend_stage_service.aws_security_group.container[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_security_group" "container" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group/sg-0bc827eede3aa095c" -> null
-       description            = "Container civic-tech-index-backend-stage" -> null
-       egress                 = [
-           {
-               cidr_blocks      = [
-                   "0.0.0.0/0",
                ]
-               from_port        = 0
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "-1"
-               security_groups  = []
-               self             = false
-               to_port          = 0
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       id                     = "sg-0bc827eede3aa095c" -> null
-       ingress                = [
-           {
-               cidr_blocks      = [
-                   "10.10.0.0/16",
                ]
-               from_port        = 8000
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "tcp"
-               security_groups  = []
-               self             = false
-               to_port          = 8000
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       name                   = "ecs-container-civic-tech-index-backend-stage" -> null
-       owner_id               = "035866691871" -> null
-       region                 = "us-west-2" -> null
-       revoke_rules_on_delete = false -> null
-       tags                   = {
-           "Name" = "ecs-container-civic-tech-index-backend-stage"
        } -> null
-       tags_all               = {
-           "Name"       = "ecs-container-civic-tech-index-backend-stage"
-           "managed-by" = "terraform-incubator"
        } -> null
-       vpc_id                 = "vpc-0bec93a4d80243845" -> null
#        (1 unchanged attribute hidden)
    }

  # module.civic-tech-index.module.backend_stage_service.aws_vpc_security_group_egress_rule.allow_all_traffic[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_vpc_security_group_egress_rule" "allow_all_traffic" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group-rule/sgr-0f89fce88e1743301" -> null
-       cidr_ipv4              = "0.0.0.0/0" -> null
-       id                     = "sgr-0f89fce88e1743301" -> null
-       ip_protocol            = "-1" -> null
-       region                 = "us-west-2" -> null
-       security_group_id      = "sg-0bc827eede3aa095c" -> null
-       security_group_rule_id = "sgr-0f89fce88e1743301" -> null
-       tags_all               = {
-           "managed-by" = "terraform-incubator"
        } -> null
    }

  # module.civic-tech-index.module.backend_stage_service.aws_vpc_security_group_ingress_rule.container_ingress_port[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_vpc_security_group_ingress_rule" "container_ingress_port" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group-rule/sgr-0425a0d13246f7599" -> null
-       cidr_ipv4              = "10.10.0.0/16" -> null
-       from_port              = 8000 -> null
-       id                     = "sgr-0425a0d13246f7599" -> null
-       ip_protocol            = "tcp" -> null
-       region                 = "us-west-2" -> null
-       security_group_id      = "sg-0bc827eede3aa095c" -> null
-       security_group_rule_id = "sgr-0425a0d13246f7599" -> null
-       tags_all               = {
-           "managed-by" = "terraform-incubator"
        } -> null
-       to_port                = 8000 -> null
    }

  # module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_ecs_service.fargate[0] will be updated in-place
!~  resource "aws_ecs_service" "fargate" {
        id                                 = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/civic-tech-jobs-fullstack-stage"
        name                               = "civic-tech-jobs-fullstack-stage"
        tags                               = {
            "project" = "civic-tech-jobs"
        }
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/civic-tech-jobs-fullstack-stage:2" -> (known after apply)
#        (18 unchanged attributes hidden)

-       load_balancer {
-           container_name   = "civic-tech-jobs-fullstack-stage" -> null
-           container_port   = 8000 -> null
-           target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/ctj-fs-stage-145/d5bf87a0a400823f" -> null
#            (1 unchanged attribute hidden)
        }
+       load_balancer {
+           container_name   = "civic-tech-jobs-fullstack-stage"
+           container_port   = 8000
+           target_group_arn = (known after apply)
#            (1 unchanged attribute hidden)
        }

-       network_configuration {
-           assign_public_ip = false -> null
-           security_groups  = [
-               "sg-0f80b7de645d296c6",
            ] -> null
-           subnets          = [
-               "subnet-03ed55f60a6c28e72",
-               "subnet-089e80a53e1522e28",
            ] -> null
        }

#        (5 unchanged blocks hidden)
    }

  # module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/civic-tech-jobs-fullstack-stage:2" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/civic-tech-jobs-fullstack-stage" -> (known after apply)
!~      container_definitions    = (sensitive value) # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "*******************************" -> (known after apply)
!~      network_mode             = "awsvpc" -> "bridge" # forces replacement
!~      revision                 = 2 -> (known after apply)
        tags                     = {
            "project" = "civic-tech-jobs"
        }
#        (12 unchanged attributes hidden)
    }

  # module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_lb_listener_rule.static will be updated in-place
!~  resource "aws_lb_listener_rule" "static" {
        id           = "arn:aws:elasticloadbalancing:us-west-2:035866691871:listener-rule/app/incubator-prod-lb/7451adf77133ef36/390a225766a4daf3/8b944647d0d45e1e"
        tags         = {}
#        (5 unchanged attributes hidden)

!~      action {
!~          target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/ctj-fs-stage-145/d5bf87a0a400823f" -> (known after apply)
#            (2 unchanged attributes hidden)
        }

#        (2 unchanged blocks hidden)
    }

  # module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_lb_target_group.this must be replaced
+/- resource "aws_lb_target_group" "this" {
!~      arn                                = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/ctj-fs-stage-145/d5bf87a0a400823f" -> (known after apply)
!~      arn_suffix                         = "targetgroup/ctj-fs-stage-145/d5bf87a0a400823f" -> (known after apply)
+       connection_termination             = (known after apply)
!~      id                                 = "*************************************************************************************************" -> (known after apply)
!~      ip_address_type                    = "ipv4" -> (known after apply)
!~      load_balancer_arns                 = [
-           "arn:aws:elasticloadbalancing:us-west-2:035866691871:loadbalancer/app/incubator-prod-lb/7451adf77133ef36",
        ] -> (known after apply)
!~      load_balancing_algorithm_type      = "round_robin" -> (known after apply)
!~      load_balancing_anomaly_mitigation  = "off" -> (known after apply)
!~      load_balancing_cross_zone_enabled  = "use_load_balancer_configuration" -> (known after apply)
!~      name                               = "ctj-fs-stage-145" -> "ctj-fs-stage-ab6" # forces replacement
+       name_prefix                        = (known after apply)
+       preserve_client_ip                 = (known after apply)
!~      protocol_version                   = "HTTP1" -> (known after apply)
-       tags                               = {} -> null
-       target_control_port                = 0 -> null
!~      target_type                        = "ip" -> "instance" # forces replacement
#        (9 unchanged attributes hidden)

!~      health_check {
!~          timeout             = 5 -> (known after apply)
#            (8 unchanged attributes hidden)
        }

!~      stickiness (known after apply)
-       stickiness {
-           cookie_duration = 86400 -> null
-           enabled         = false -> null
-           type            = "lb_cookie" -> null
#            (1 unchanged attribute hidden)
        }

!~      target_failover (known after apply)
-       target_failover {}

!~      target_group_health (known after apply)
-       target_group_health {
-           dns_failover {
-               minimum_healthy_targets_count      = "1" -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
-           unhealthy_state_routing {
-               minimum_healthy_targets_count      = 1 -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
        }

!~      target_health_state {
+           enable_unhealthy_connection_termination = false
+           unhealthy_draining_interval             = 0
        }
    }

  # module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_security_group.container[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_security_group" "container" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group/sg-0f80b7de645d296c6" -> null
-       description            = "Container civic-tech-jobs-fullstack-stage" -> null
-       egress                 = [
-           {
-               cidr_blocks      = [
-                   "0.0.0.0/0",
                ]
-               from_port        = 0
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "-1"
-               security_groups  = []
-               self             = false
-               to_port          = 0
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       id                     = "sg-0f80b7de645d296c6" -> null
-       ingress                = [
-           {
-               cidr_blocks      = [
-                   "10.10.0.0/16",
                ]
-               from_port        = 8000
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "tcp"
-               security_groups  = []
-               self             = false
-               to_port          = 8000
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       name                   = "ecs-container-civic-tech-jobs-fullstack-stage" -> null
-       owner_id               = "035866691871" -> null
-       region                 = "us-west-2" -> null
-       revoke_rules_on_delete = false -> null
-       tags                   = {
-           "Name" = "ecs-container-civic-tech-jobs-fullstack-stage"
        } -> null
-       tags_all               = {
-           "Name"       = "ecs-container-civic-tech-jobs-fullstack-stage"
-           "managed-by" = "terraform-incubator"
        } -> null
-       vpc_id                 = "vpc-0bec93a4d80243845" -> null
#        (1 unchanged attribute hidden)
    }

  # module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_vpc_security_group_egress_rule.allow_all_traffic[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_vpc_security_group_egress_rule" "allow_all_traffic" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group-rule/sgr-08fc6e3c782184010" -> null
-       cidr_ipv4              = "0.0.0.0/0" -> null
-       id                     = "sgr-08fc6e3c782184010" -> null
-       ip_protocol            = "-1" -> null
-       region                 = "us-west-2" -> null
-       security_group_id      = "sg-0f80b7de645d296c6" -> null
-       security_group_rule_id = "sgr-08fc6e3c782184010" -> null
-       tags_all               = {
-           "managed-by" = "terraform-incubator"
        } -> null
    }

  # module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_vpc_security_group_ingress_rule.container_ingress_port[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_vpc_security_group_ingress_rule" "container_ingress_port" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group-rule/sgr-0db9434e28bf57789" -> null
-       cidr_ipv4              = "10.10.0.0/16" -> null
-       from_port              = 8000 -> null
-       id                     = "sgr-0db9434e28bf57789" -> null
-       ip_protocol            = "tcp" -> null
-       region                 = "us-west-2" -> null
-       security_group_id      = "sg-0f80b7de645d296c6" -> null
-       security_group_rule_id = "sgr-0db9434e28bf57789" -> null
-       tags_all               = {
-           "managed-by" = "terraform-incubator"
        } -> null
-       to_port                = 8000 -> null
    }

  # module.home-unite-us.module.qa_service.aws_ecs_service.fargate[0] will be updated in-place
!~  resource "aws_ecs_service" "fargate" {
        id                                 = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/home-unite-us-fullstack-qa"
        name                               = "home-unite-us-fullstack-qa"
        tags                               = {
            "project" = "home-unite-us"
        }
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/home-unite-us-fullstack-qa:11" -> (known after apply)
#        (18 unchanged attributes hidden)

-       load_balancer {
-           container_name   = "home-unite-us-fullstack-qa" -> null
-           container_port   = 80 -> null
-           target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/home-unite-us-fullstack-qa-596/fc20f448645af597" -> null
#            (1 unchanged attribute hidden)
        }
+       load_balancer {
+           container_name   = "home-unite-us-fullstack-qa"
+           container_port   = 80
+           target_group_arn = (known after apply)
#            (1 unchanged attribute hidden)
        }

-       network_configuration {
-           assign_public_ip = false -> null
-           security_groups  = [
-               "sg-03ab99034c6209504",
            ] -> null
-           subnets          = [
-               "subnet-03ed55f60a6c28e72",
-               "subnet-089e80a53e1522e28",
            ] -> null
        }

#        (5 unchanged blocks hidden)
    }

  # module.home-unite-us.module.qa_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/home-unite-us-fullstack-qa:11" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/home-unite-us-fullstack-qa" -> (known after apply)
!~      container_definitions    = (sensitive value) # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "**************************" -> (known after apply)
!~      network_mode             = "awsvpc" -> "bridge" # forces replacement
!~      revision                 = 11 -> (known after apply)
        tags                     = {
            "project" = "home-unite-us"
        }
#        (12 unchanged attributes hidden)
    }

  # module.home-unite-us.module.qa_service.aws_lb_listener_rule.static will be updated in-place
!~  resource "aws_lb_listener_rule" "static" {
        id           = "arn:aws:elasticloadbalancing:us-west-2:035866691871:listener-rule/app/incubator-prod-lb/7451adf77133ef36/390a225766a4daf3/5cdadacb9adf43d3"
        tags         = {}
#        (5 unchanged attributes hidden)

!~      action {
!~          target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/home-unite-us-fullstack-qa-596/fc20f448645af597" -> (known after apply)
#            (2 unchanged attributes hidden)
        }

#        (2 unchanged blocks hidden)
    }

  # module.home-unite-us.module.qa_service.aws_lb_target_group.this must be replaced
+/- resource "aws_lb_target_group" "this" {
!~      arn                                = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/home-unite-us-fullstack-qa-596/fc20f448645af597" -> (known after apply)
!~      arn_suffix                         = "targetgroup/home-unite-us-fullstack-qa-596/fc20f448645af597" -> (known after apply)
+       connection_termination             = (known after apply)
!~      id                                 = "***************************************************************************************************************" -> (known after apply)
!~      ip_address_type                    = "ipv4" -> (known after apply)
!~      load_balancer_arns                 = [
-           "arn:aws:elasticloadbalancing:us-west-2:035866691871:loadbalancer/app/incubator-prod-lb/7451adf77133ef36",
        ] -> (known after apply)
!~      load_balancing_algorithm_type      = "round_robin" -> (known after apply)
!~      load_balancing_anomaly_mitigation  = "off" -> (known after apply)
!~      load_balancing_cross_zone_enabled  = "use_load_balancer_configuration" -> (known after apply)
!~      name                               = "home-unite-us-fullstack-qa-596" -> "home-unite-us-fullstack-qa-335" # forces replacement
+       name_prefix                        = (known after apply)
+       preserve_client_ip                 = (known after apply)
!~      protocol_version                   = "HTTP1" -> (known after apply)
-       tags                               = {} -> null
-       target_control_port                = 0 -> null
!~      target_type                        = "ip" -> "instance" # forces replacement
#        (9 unchanged attributes hidden)

!~      health_check {
!~          timeout             = 5 -> (known after apply)
#            (8 unchanged attributes hidden)
        }

!~      stickiness (known after apply)
-       stickiness {
-           cookie_duration = 86400 -> null
-           enabled         = false -> null
-           type            = "lb_cookie" -> null
#            (1 unchanged attribute hidden)
        }

!~      target_failover (known after apply)
-       target_failover {}

!~      target_group_health (known after apply)
-       target_group_health {
-           dns_failover {
-               minimum_healthy_targets_count      = "1" -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
-           unhealthy_state_routing {
-               minimum_healthy_targets_count      = 1 -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
        }

!~      target_health_state {
+           enable_unhealthy_connection_termination = false
+           unhealthy_draining_interval             = 0
        }
    }

  # module.home-unite-us.module.qa_service.aws_security_group.container[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_security_group" "container" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group/sg-03ab99034c6209504" -> null
-       description            = "Container home-unite-us-fullstack-qa" -> null
-       egress                 = [
-           {
-               cidr_blocks      = [
-                   "0.0.0.0/0",
                ]
-               from_port        = 0
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "-1"
-               security_groups  = []
-               self             = false
-               to_port          = 0
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       id                     = "sg-03ab99034c6209504" -> null
-       ingress                = [
-           {
-               cidr_blocks      = [
-                   "10.10.0.0/16",
                ]
-               from_port        = 80
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "tcp"
-               security_groups  = []
-               self             = false
-               to_port          = 80
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       name                   = "ecs-container-home-unite-us-fullstack-qa" -> null
-       owner_id               = "035866691871" -> null
-       region                 = "us-west-2" -> null
-       revoke_rules_on_delete = false -> null
-       tags                   = {
-           "Name" = "ecs-container-home-unite-us-fullstack-qa"
        } -> null
-       tags_all               = {
-           "Name"       = "ecs-container-home-unite-us-fullstack-qa"
-           "managed-by" = "terraform-incubator"
        } -> null
-       vpc_id                 = "vpc-0bec93a4d80243845" -> null
#        (1 unchanged attribute hidden)
    }

  # module.home-unite-us.module.qa_service.aws_vpc_security_group_egress_rule.allow_all_traffic[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_vpc_security_group_egress_rule" "allow_all_traffic" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group-rule/sgr-01d4cc8411407108c" -> null
-       cidr_ipv4              = "0.0.0.0/0" -> null
-       id                     = "sgr-01d4cc8411407108c" -> null
-       ip_protocol            = "-1" -> null
-       region                 = "us-west-2" -> null
-       security_group_id      = "sg-03ab99034c6209504" -> null
-       security_group_rule_id = "sgr-01d4cc8411407108c" -> null
-       tags_all               = {
-           "managed-by" = "terraform-incubator"
        } -> null
    }

  # module.home-unite-us.module.qa_service.aws_vpc_security_group_ingress_rule.container_ingress_port[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_vpc_security_group_ingress_rule" "container_ingress_port" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group-rule/sgr-0171086766886d951" -> null
-       cidr_ipv4              = "10.10.0.0/16" -> null
-       from_port              = 80 -> null
-       id                     = "sgr-0171086766886d951" -> null
-       ip_protocol            = "tcp" -> null
-       region                 = "us-west-2" -> null
-       security_group_id      = "sg-03ab99034c6209504" -> null
-       security_group_rule_id = "sgr-0171086766886d951" -> null
-       tags_all               = {
-           "managed-by" = "terraform-incubator"
        } -> null
-       to_port                = 80 -> null
    }

  # module.vrms.module.backend_dev_service.aws_ecs_service.fargate[0] will be updated in-place
!~  resource "aws_ecs_service" "fargate" {
        id                                 = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-backend-dev"
        name                               = "vrms-backend-dev"
        tags                               = {
            "project" = "vrms"
        }
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-backend-dev:58" -> (known after apply)
#        (18 unchanged attributes hidden)

-       load_balancer {
-           container_name   = "vrms-backend-dev" -> null
-           container_port   = 4000 -> null
-           target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/vrms-backend-dev-ea6/b139bf6c56b00837" -> null
#            (1 unchanged attribute hidden)
        }
+       load_balancer {
+           container_name   = "vrms-backend-dev"
+           container_port   = 4000
+           target_group_arn = (known after apply)
#            (1 unchanged attribute hidden)
        }

-       network_configuration {
-           assign_public_ip = false -> null
-           security_groups  = [
-               "sg-04cad03d0c2311bf9",
            ] -> null
-           subnets          = [
-               "subnet-03ed55f60a6c28e72",
-               "subnet-089e80a53e1522e28",
            ] -> null
        }

#        (5 unchanged blocks hidden)
    }

  # module.vrms.module.backend_dev_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-backend-dev:58" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-backend-dev" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
-                   mountPoints            = []
                    name                   = "vrms-backend-dev"
!~                  portMappings           = [
!~                      {
!~                          hostPort      = 4000 -> 0
-                           protocol      = "tcp"
#                            (1 unchanged attribute hidden)
                        },
                    ]
-                   systemControls         = []
-                   volumesFrom            = []
#                    (8 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "****************" -> (known after apply)
!~      network_mode             = "awsvpc" -> "bridge" # forces replacement
!~      revision                 = 58 -> (known after apply)
        tags                     = {
            "project" = "vrms"
        }
#        (12 unchanged attributes hidden)
    }

  # module.vrms.module.backend_dev_service.aws_lb_listener_rule.static will be updated in-place
!~  resource "aws_lb_listener_rule" "static" {
        id           = "arn:aws:elasticloadbalancing:us-west-2:035866691871:listener-rule/app/incubator-prod-lb/7451adf77133ef36/390a225766a4daf3/9b4edb4dc5907c4b"
        tags         = {}
#        (5 unchanged attributes hidden)

!~      action {
!~          target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/vrms-backend-dev-ea6/b139bf6c56b00837" -> (known after apply)
#            (2 unchanged attributes hidden)
        }

#        (2 unchanged blocks hidden)
    }

  # module.vrms.module.backend_dev_service.aws_lb_target_group.this must be replaced
+/- resource "aws_lb_target_group" "this" {
!~      arn                                = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/vrms-backend-dev-ea6/b139bf6c56b00837" -> (known after apply)
!~      arn_suffix                         = "targetgroup/vrms-backend-dev-ea6/b139bf6c56b00837" -> (known after apply)
+       connection_termination             = (known after apply)
!~      id                                 = "*****************************************************************************************************" -> (known after apply)
!~      ip_address_type                    = "ipv4" -> (known after apply)
!~      load_balancer_arns                 = [
-           "arn:aws:elasticloadbalancing:us-west-2:035866691871:loadbalancer/app/incubator-prod-lb/7451adf77133ef36",
        ] -> (known after apply)
!~      load_balancing_algorithm_type      = "round_robin" -> (known after apply)
!~      load_balancing_anomaly_mitigation  = "off" -> (known after apply)
!~      load_balancing_cross_zone_enabled  = "use_load_balancer_configuration" -> (known after apply)
!~      name                               = "vrms-backend-dev-ea6" -> "vrms-backend-dev-901" # forces replacement
+       name_prefix                        = (known after apply)
+       preserve_client_ip                 = (known after apply)
!~      protocol_version                   = "HTTP1" -> (known after apply)
-       tags                               = {} -> null
-       target_control_port                = 0 -> null
!~      target_type                        = "ip" -> "instance" # forces replacement
#        (9 unchanged attributes hidden)

!~      health_check {
!~          timeout             = 5 -> (known after apply)
#            (8 unchanged attributes hidden)
        }

!~      stickiness (known after apply)
-       stickiness {
-           cookie_duration = 86400 -> null
-           enabled         = false -> null
-           type            = "lb_cookie" -> null
#            (1 unchanged attribute hidden)
        }

!~      target_failover (known after apply)
-       target_failover {}

!~      target_group_health (known after apply)
-       target_group_health {
-           dns_failover {
-               minimum_healthy_targets_count      = "1" -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
-           unhealthy_state_routing {
-               minimum_healthy_targets_count      = 1 -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
        }

!~      target_health_state {
+           enable_unhealthy_connection_termination = false
+           unhealthy_draining_interval             = 0
        }
    }

  # module.vrms.module.backend_dev_service.aws_security_group.container[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_security_group" "container" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group/sg-04cad03d0c2311bf9" -> null
-       description            = "Container vrms-backend-dev" -> null
-       egress                 = [
-           {
-               cidr_blocks      = [
-                   "0.0.0.0/0",
                ]
-               from_port        = 0
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "-1"
-               security_groups  = []
-               self             = false
-               to_port          = 0
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       id                     = "sg-04cad03d0c2311bf9" -> null
-       ingress                = [
-           {
-               cidr_blocks      = [
-                   "10.10.0.0/16",
                ]
-               from_port        = 4000
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "tcp"
-               security_groups  = []
-               self             = false
-               to_port          = 4000
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       name                   = "ecs-container-vrms-backend-dev" -> null
-       owner_id               = "035866691871" -> null
-       region                 = "us-west-2" -> null
-       revoke_rules_on_delete = false -> null
-       tags                   = {
-           "Name" = "ecs-container-vrms-backend-dev"
        } -> null
-       tags_all               = {
-           "Name"       = "ecs-container-vrms-backend-dev"
-           "managed-by" = "terraform-incubator"
        } -> null
-       vpc_id                 = "vpc-0bec93a4d80243845" -> null
#        (1 unchanged attribute hidden)
    }

  # module.vrms.module.backend_dev_service.aws_vpc_security_group_egress_rule.allow_all_traffic[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_vpc_security_group_egress_rule" "allow_all_traffic" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group-rule/sgr-080396281203e7734" -> null
-       cidr_ipv4              = "0.0.0.0/0" -> null
-       id                     = "sgr-080396281203e7734" -> null
-       ip_protocol            = "-1" -> null
-       region                 = "us-west-2" -> null
-       security_group_id      = "sg-04cad03d0c2311bf9" -> null
-       security_group_rule_id = "sgr-080396281203e7734" -> null
-       tags_all               = {
-           "managed-by" = "terraform-incubator"
        } -> null
    }

  # module.vrms.module.backend_dev_service.aws_vpc_security_group_ingress_rule.container_ingress_port[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_vpc_security_group_ingress_rule" "container_ingress_port" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group-rule/sgr-0b860d4c6902e23ab" -> null
-       cidr_ipv4              = "10.10.0.0/16" -> null
-       from_port              = 4000 -> null
-       id                     = "sgr-0b860d4c6902e23ab" -> null
-       ip_protocol            = "tcp" -> null
-       region                 = "us-west-2" -> null
-       security_group_id      = "sg-04cad03d0c2311bf9" -> null
-       security_group_rule_id = "sgr-0b860d4c6902e23ab" -> null
-       tags_all               = {
-           "managed-by" = "terraform-incubator"
        } -> null
-       to_port                = 4000 -> null
    }

  # module.vrms.module.frontend_dev_service.aws_ecs_service.fargate[0] will be updated in-place
!~  resource "aws_ecs_service" "fargate" {
        id                                 = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-frontend-dev"
        name                               = "vrms-frontend-dev"
        tags                               = {
            "project" = "vrms"
        }
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-frontend-dev:9" -> (known after apply)
#        (18 unchanged attributes hidden)

-       load_balancer {
-           container_name   = "vrms-frontend-dev" -> null
-           container_port   = 3000 -> null
-           target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/vrms-frontend-dev-b34/f11d3bd3230894a0" -> null
#            (1 unchanged attribute hidden)
        }
+       load_balancer {
+           container_name   = "vrms-frontend-dev"
+           container_port   = 3000
+           target_group_arn = (known after apply)
#            (1 unchanged attribute hidden)
        }

-       network_configuration {
-           assign_public_ip = false -> null
-           security_groups  = [
-               "sg-05e59f77f2b57320b",
            ] -> null
-           subnets          = [
-               "subnet-03ed55f60a6c28e72",
-               "subnet-089e80a53e1522e28",
            ] -> null
        }

#        (5 unchanged blocks hidden)
    }

  # module.vrms.module.frontend_dev_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-frontend-dev:9" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-frontend-dev" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
-                   mountPoints            = []
                    name                   = "vrms-frontend-dev"
!~                  portMappings           = [
!~                      {
!~                          hostPort      = 3000 -> 0
-                           protocol      = "tcp"
#                            (1 unchanged attribute hidden)
                        },
                    ]
-                   systemControls         = []
-                   volumesFrom            = []
#                    (8 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "*****************" -> (known after apply)
!~      network_mode             = "awsvpc" -> "bridge" # forces replacement
!~      revision                 = 9 -> (known after apply)
        tags                     = {
            "project" = "vrms"
        }
#        (12 unchanged attributes hidden)
    }

  # module.vrms.module.frontend_dev_service.aws_lb_listener_rule.static will be updated in-place
!~  resource "aws_lb_listener_rule" "static" {
        id           = "arn:aws:elasticloadbalancing:us-west-2:035866691871:listener-rule/app/incubator-prod-lb/7451adf77133ef36/390a225766a4daf3/cc59aa5ec1120cdb"
        tags         = {}
#        (5 unchanged attributes hidden)

!~      action {
!~          target_group_arn = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/vrms-frontend-dev-b34/f11d3bd3230894a0" -> (known after apply)
#            (2 unchanged attributes hidden)
        }

#        (2 unchanged blocks hidden)
    }

  # module.vrms.module.frontend_dev_service.aws_lb_target_group.this must be replaced
+/- resource "aws_lb_target_group" "this" {
!~      arn                                = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/vrms-frontend-dev-b34/f11d3bd3230894a0" -> (known after apply)
!~      arn_suffix                         = "targetgroup/vrms-frontend-dev-b34/f11d3bd3230894a0" -> (known after apply)
+       connection_termination             = (known after apply)
!~      id                                 = "******************************************************************************************************" -> (known after apply)
!~      ip_address_type                    = "ipv4" -> (known after apply)
!~      load_balancer_arns                 = [
-           "arn:aws:elasticloadbalancing:us-west-2:035866691871:loadbalancer/app/incubator-prod-lb/7451adf77133ef36",
        ] -> (known after apply)
!~      load_balancing_algorithm_type      = "round_robin" -> (known after apply)
!~      load_balancing_anomaly_mitigation  = "off" -> (known after apply)
!~      load_balancing_cross_zone_enabled  = "use_load_balancer_configuration" -> (known after apply)
!~      name                               = "vrms-frontend-dev-b34" -> "vrms-frontend-dev-90e" # forces replacement
+       name_prefix                        = (known after apply)
+       preserve_client_ip                 = (known after apply)
!~      protocol_version                   = "HTTP1" -> (known after apply)
-       tags                               = {} -> null
-       target_control_port                = 0 -> null
!~      target_type                        = "ip" -> "instance" # forces replacement
#        (9 unchanged attributes hidden)

!~      health_check {
!~          timeout             = 5 -> (known after apply)
#            (8 unchanged attributes hidden)
        }

!~      stickiness (known after apply)
-       stickiness {
-           cookie_duration = 86400 -> null
-           enabled         = false -> null
-           type            = "lb_cookie" -> null
#            (1 unchanged attribute hidden)
        }

!~      target_failover (known after apply)
-       target_failover {}

!~      target_group_health (known after apply)
-       target_group_health {
-           dns_failover {
-               minimum_healthy_targets_count      = "1" -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
-           unhealthy_state_routing {
-               minimum_healthy_targets_count      = 1 -> null
-               minimum_healthy_targets_percentage = "off" -> null
            }
        }

!~      target_health_state {
+           enable_unhealthy_connection_termination = false
+           unhealthy_draining_interval             = 0
        }
    }

  # module.vrms.module.frontend_dev_service.aws_security_group.container[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_security_group" "container" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group/sg-05e59f77f2b57320b" -> null
-       description            = "Container vrms-frontend-dev" -> null
-       egress                 = [
-           {
-               cidr_blocks      = [
-                   "0.0.0.0/0",
                ]
-               from_port        = 0
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "-1"
-               security_groups  = []
-               self             = false
-               to_port          = 0
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       id                     = "sg-05e59f77f2b57320b" -> null
-       ingress                = [
-           {
-               cidr_blocks      = [
-                   "10.10.0.0/16",
                ]
-               from_port        = 3000
-               ipv6_cidr_blocks = []
-               prefix_list_ids  = []
-               protocol         = "tcp"
-               security_groups  = []
-               self             = false
-               to_port          = 3000
#                (1 unchanged attribute hidden)
            },
        ] -> null
-       name                   = "ecs-container-vrms-frontend-dev" -> null
-       owner_id               = "035866691871" -> null
-       region                 = "us-west-2" -> null
-       revoke_rules_on_delete = false -> null
-       tags                   = {
-           "Name" = "ecs-container-vrms-frontend-dev"
        } -> null
-       tags_all               = {
-           "Name"       = "ecs-container-vrms-frontend-dev"
-           "managed-by" = "terraform-incubator"
        } -> null
-       vpc_id                 = "vpc-0bec93a4d80243845" -> null
#        (1 unchanged attribute hidden)
    }

  # module.vrms.module.frontend_dev_service.aws_vpc_security_group_egress_rule.allow_all_traffic[0] will be destroyed
  # (because index [0] is out of range for count)
-   resource "aws_vpc_security_group_egress_rule" "allow_all_traffic" {
-       arn                    = "arn:aws:ec2:us-west-2:035866691871:security-group-rule/sgr-05db0dee76f5a3e3f" -> null
-       cidr_ipv4              = "0.0.0.0/0" -> null
-       id                     = "sgr-05db0dee76f5a3e3f" -> null
-       ip_protocol            = "-1" -> null
-       region                 = "us-west-2" -> null
Plan is too large to fit in a PR comment. See the full plan in the workflow log.

✅ Plan applied in Terraform apply (OIDC) #102

@ale210
ale210 merged commit 472fee9 into main Oct 10, 2026
3 checks passed
ale210 added a commit that referenced this pull request Oct 10, 2026
For #254. Moves the four production services to bridge networking in one
PR:

- `vrms-backend-prod`, `vrms-frontend-prod`
- `civic-tech-index-backend-prod`
- `home-unite-us-fullstack-prod`

**Merge this in a window agreed with all three teams.** It applies as
one run, so all four production sites are down at the same time, for one
to two minutes each, while their new target groups pass health checks.
Users see a `503` from the load balancer during that time. This replaces
the ticket's one-PR-per-project plan.

**Expected plan: 8 to add, 8 to change, 20 to destroy.** That is four
copies of the 2/2/5 seen on the six non-production services (#260,
#261). For each service: ECS service **updated in place**, task
definition replaced, target group replaced by an `instance`-type one,
listener rule updated in place, and the security group plus its two
rules destroyed. If any ECS service shows as replaced, do not merge.

`home-unite-us/environment-prod.tf` also gets a one-space alignment
change on `launch_type`, from `terraform fmt`; that file was fmt-clean
before.

`vrms-backend-prod` is OOM-killed roughly every 30 minutes (#174). A
restart around the move is that bug, not this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant