Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set LOCALSTACK_HOST from service name #99

Closed

Conversation

simonrw
Copy link
Contributor

@simonrw simonrw commented Nov 14, 2023

Motivation

LocalStack 3.0.0 standardises LOCALSTACK_HOST for services that return URLs. This configuration variable is substituted for domain names if customised. This means for example, that when creating an SQS queue, rather than receiving a queue URL of something like:

http://sqs.eu-west-1.localhost.localstack.cloud:4566

you receive (with LOCALSTACK_HOST=foo.bar):

http://sqs.eu-west-1.foo.bar:4566

This is important in k8s because the service name is a general DNS entry that resolves to the LocalStack pod. When users of the returned URL try to make calls to that URL, it will now succeed.

Changes

  • set the pod LOCALSTACK_HOST environment variable to match the k8s service name

@simonrw
Copy link
Contributor Author

simonrw commented May 22, 2024

This could be handled by user configuration, we should not try to automatically infer this value from the environment.

@simonrw simonrw closed this May 22, 2024
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