Skip to content

Let Food Oasis staging's health check accept 302 - #300

Merged
ale210 merged 2 commits into
mainfrom
281-food-oasis-health-check-matcher
Nov 20, 2026
Merged

ale210 merged 2 commits into
mainfrom
281-food-oasis-health-check-matcher

Conversation

@ale210

@ale210 ale210 commented Nov 20, 2026

Copy link
Copy Markdown
Member

Part of #281.

The Food Oasis staging service from #299 keeps being replaced by ECS: its load balancer health check gets a 302. With NODE_ENV=production the app redirects every request without X-Forwarded-Proto: https to HTTPS, /health included, and the health check sends plain HTTP without that header.

  • modules/container: new health_check_matcher variable. Its default is the old hardcoded 200,400,404, so no other service changes.
  • Food Oasis staging sets it to 200,302. That only proves the process answers; moving /health above the redirect in hackforla/food-oasis server/server.ts would let it go back to the default.

Expected plan: one in-place update, the staging target group's matcher. Nothing else.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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

Plan: 0 to add, 1 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place

Terraform will perform the following actions:

  # module.food-oasis.module.food_oasis_fullstack_stage_service.aws_lb_target_group.this will be updated in-place
!~  resource "aws_lb_target_group" "this" {
        id                                 = "arn:aws:elasticloadbalancing:us-west-2:035866691871:targetgroup/food-oasis-fullstack-stage-d7f/87610d2dd5d543f1"
        name                               = "food-oasis-fullstack-stage-d7f"
        tags                               = {}
#        (20 unchanged attributes hidden)

!~      health_check {
!~          matcher             = "200,400,404" -> "200,302"
#            (8 unchanged attributes hidden)
        }

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

#        (3 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

✅ Plan applied in Terraform apply (OIDC) #125

@ale210
ale210 merged commit 2b117e8 into main Nov 20, 2026
1 check passed
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