LocalStack

LocalStack ALB listener port override breaks Terraform idempotency

critical
configurationUpdated May 2, 2024(via Exa)
Technologies:
How to detect:

LocalStack automatically changes ALB listener port to 4566 on initial deployment, overriding template-specified port values. Subsequent Terraform plan/apply operations detect this as configuration drift, and attempting to reapply causes service access to break.

Recommended action:

Avoid running tflocal apply after initial deployment. Either configure port 4566 explicitly in Terraform templates to match LocalStack's behavior, or tear down the entire LocalStack instance and infrastructure stack before redeploying.