Skip to content

Default ECS quarantine proxy to CloudFront hairpin - #321

Draft
Erik Weathers (erikdw) wants to merge 1 commit into
mainfrom
erikdw/quarantine-cf-hairpin
Draft

Default ECS quarantine proxy to CloudFront hairpin#321
Erik Weathers (erikdw) wants to merge 1 commit into
mainfrom
erikdw/quarantine-cf-hairpin

Conversation

@erikdw

Copy link
Copy Markdown
Contributor

Summary

  • Split API ECS ALB into modules/api-ecs-alb (with moved blocks) so tasks can bake ingress.api_url into QUARANTINE_PROXY_URL without a Terraform cycle.
  • When enable_ecs_api is on, quarantine LLM calls default to the dataplane public /v1/proxy CloudFront hairpin (custom_domain preferred, else *.cloudfront.net), instead of hosted gateway.braintrust.dev.
  • Add optional quarantine_proxy_url override for hosted gateway / custom URLs.

Test plan

  • Untested so far — needs a sandbox apply before merge
  • terraform plan on an existing ECS dataplane: ALB resources show as moves (not destroy/create)
  • Confirm QUARANTINE_PROXY_URL on API ECS is https://<custom_domain|cloudfront>/v1/proxy
  • Invoke a quarantine UDF that calls an LLM; traffic reaches dataplane /v1/proxy (not hosted gateway)
  • Override with quarantine_proxy_url = "https://gateway.braintrust.dev/v1/proxy" and confirm env flips
  • Rollback path: unset override / revert module bump still healthy

Made with Cursor

Split the API ECS ALB into its own module so QUARANTINE_PROXY_URL can use
ingress.api_url without a Terraform cycle. With enable_ecs_api, quarantine
defaults to the dataplane public /v1/proxy (custom_domain preferred);
quarantine_proxy_url remains an explicit override for hosted gateway etc.

Co-authored-by: Cursor <cursoragent@cursor.com>
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