localstack / localstack/localstack-mcp-server

Deployer health check blocks deploys to remote/ephemeral instances (requires a local gateway)

オープン
#70 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
27
フォーク
13
PR マージ指標
30日以内にマージされた PR はありません

説明

Summary

The localstack-deployer tool runs a pre-deploy reachability check against a local gateway (http://${LOCALSTACK_HOSTNAME:-localhost}:${LOCALSTACK_PORT:-4566}/_localstack/health). When you want the deploy to target a remote Ephemeral Instance (which is HTTPS-only, e.g. https://ls-<id>.sandbox.localstack.cloud), that check can never pass on its own, so the deploy is blocked with:

LocalStack Not Running — LocalStack is not reachable at http://localhost:4566 ...

even though the actual deploy would succeed against the ephemeral instance. The result is that you must keep a throwaway local LocalStack running purely to satisfy the health gate, while the real deploy is redirected elsewhere.

Why this matters

A natural workflow is to give each agent (or each CI job / worktree) its own Ephemeral Instance in the cloud and deploy straight to it via the MCP server. The deployer can already do this: tflocal/cdklocal pick up the endpoint from the environment, and setting per-service {SERVICE}_ENDPOINT=https://ls-<id>.sandbox.localstack.cloud in the MCP server's env makes terraform apply land resources on the ephemeral instance correctly. The only thing standing in the way is the pre-deploy health probe.

Details

  • The env builder forwards the process env to tflocal, so per-service *_ENDPOINT https values reach the provider and resources deploy to the ephemeral instance as expected.
  • The health gate, however, is hardcoded to an http://host:port probe. Ephemeral instances only answer on https://<host> (443); http://<host>:443 and http://<host>:80 do not respond, so the gate fails.
  • Confirmed: with a local LocalStack running (gate satisfied) + per-service *_ENDPOINT=https://ls-<id>... set, a Terraform deploy via localstack-deployer lands entirely on the ephemeral instance. With the local instance stopped, the same deploy is refused by the gate before tflocal ever runs.

Steps to reproduce

  1. Create an ephemeral instance: localstack ephemeral create --name demo -> note the https://ls-<id>.sandbox.localstack.cloud endpoint.
  2. Configure the MCP server env with AWS_ENDPOINT_URL and per-service {SERVICE}_ENDPOINT all set to that https endpoint (and the auth token).
  3. Stop any local LocalStack.
  4. Call localstack-deployer (deploy, terraform) on a small project.
  5. It fails with "LocalStack is not reachable at http://localhost:4566" instead of deploying to the ephemeral instance.

Suggested fix

When a remote endpoint is configured (e.g. AWS_ENDPOINT_URL / *_ENDPOINT points at a non-local host, or an explicit ephemeral endpoint is provided), the pre-deploy reachability check should probe that endpoint (honouring https), or be skipped, rather than always probing http://localhost:4566. Ideally the tool would accept an explicit target/endpoint so a deploy can be aimed at an ephemeral instance without needing a local gateway at all.

Environment

  • @localstack/localstack-mcp-server (latest via npx)
  • terraform-local (tflocal) 0.26.0, Terraform 1.14.9
  • Ephemeral Instances (public preview), image localstack/localstack-pro:latest

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、issue に記載されている localstack-deployer の pre-deploy health check と env builder を見つけます。リモートの HTTPS ephemeral endpoint を使用し、ローカル gateway がない状態で失敗を再現します。次に、設定されたリモート endpoint がプローブされるか、check がスキップされること、そして deploy が tflocal を通じて続行されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
terraform, typescript
領域
cloud, devops, infrastructure
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。