mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-21 11:46:37 +00:00
1e3d82f978
Internet-facing ALBs allocated their public IP by calling externalIPAM.AllocateIP() directly from LaunchSystemInstance, bypassing the EIP service entirely. No EIPRecord landed in the eips KV bucket, the tag was "auto_assign" (EIP service uses "elastic_ip"), and DescribeAddresses never returned the IP — so any OpenTofu flow that expects an AllocateAddress-observable record hung waiting. LaunchSystemInstance now calls eipService.AllocateAddress + AssociateAddress when the EIP service is wired (falls back to the old direct IPAM path otherwise). TerminateSystemInstance releases through the service so the KV record is cleaned up and vpc.delete-nat is published. The generic stopInstance teardown is left untouched so customer RunInstances flows behave identically. Also refreshes the nginx-alb terraform example to use public subnets with auto-assigned public IPs (the configuration that actually exercises this path end-to-end) and tightens the awsgwBindIP loopback guard in wireLBAgentConfig so the gateway URL is usable by LB agents.