ops/pulumi: stage activation docs, safe networking, ALB health check fix#368
Open
e9e4e5f0faef wants to merge 3 commits intostagefrom
Open
ops/pulumi: stage activation docs, safe networking, ALB health check fix#368e9e4e5f0faef wants to merge 3 commits intostagefrom
e9e4e5f0faef wants to merge 3 commits intostagefrom
Conversation
added 3 commits
March 7, 2026 19:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DisallowedHostfailures on ECS/Fargateassign_public_ipfor external services (ECR image pull fix)NETAPP_STORAGE_ROOTenvironment variable to all container definitionsChanges
src/olympia/amo/middleware_healthcheck.pysettings_local_stage.pyMIDDLEWAREinfra/pulumi/__main__.pyassign_public_ip=Truefor external Fargate servicesinfra/pulumi/config.stage.yamlNETAPP_STORAGE_ROOTto web, worker, versioncheckinfra/pulumi/README.mdinfra/DEPLOYMENT_VALIDATION.md.gitignoreinfra/adhoc/,infra/docs/)Why
ALB health checks reach containers with
Host: <load-balancer-node-IP>, which Djangorejects via
ALLOWED_HOSTS. Adding.compute.internaldoes not help because the valueis an IP, not a hostname, and Django does not support CIDR in
ALLOWED_HOSTS. We avoidALLOWED_HOSTS = ['*'](over-broad) and avoid ECS metadata calls during settings import.External Fargate services in public subnets also need
assign_public_ipto reach ECR(
tb_pulumiuses a single subnet list for ALB and tasks; documented as a TODO for upstream).Approach
GET /services/monitor.json) and returns200before Django's host validation runs. All other paths keep strictALLOWED_HOSTS.assign_public_ipis forced in__main__.pyfor services withinternal: false, keepingconfig.stage.yamlclean (the code overrides at runtime).NETAPP_STORAGE_ROOT=/tmp/storagesatisfies Django's required setting using ephemeralcontainer storage (no EFS mount needed in RO mode).
Validation
Tested end-to-end on versioncheck via ad hoc image build:
test-healthcheck-fix) to ECRdesiredCount=1/services/monitor.jsonreturned HTTP 200DisallowedHosterrors in CloudWatch logs during steady stateEarlier in the session: full
pulumi up(157 resources), RO MySQL user creation,RO healthcheck (5/5 passed), and CI build-and-push confirmed working via manual dispatch.
Safety
desired_count: 0min_capacity: 0DISABLEDBOOTSTRAP_SAFE=true(RO user)Follow-ups
stage-latestcontaining the middleware fix