[ECS / Fargate] [request]: Support dnsSearchDomains for awsvpc tasks
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
Currently, tasks that are using awsvpc networking cannot set the DNS Search Domain. Setting the DNS Search Domain allows customers using Service Discovery to omit the namespace when making requests to other services.
As an example, if you have a namespace that is `.local` and two services in that namespace, `front-end` and `back-end`, they can currently communicate with each other like this:
```golang
// back-end calling front-end
frontend := "http://front-end.local/some-request"
resp, err := http.Get(frontend)
// front-end calling front-end
backend := "http://back-end.local/some-request"
resp, err := http.Get(backend)
```
While this is great, it'd be nice if we could pass in the `local` as a `dnsSearchDomain` to tasks using `awsvpc` networking, so that customers could omit the `.local` at the end of their requests.
**Which service(s) is this request for?**
ECS & Fargate
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.
Ideally, we could provide a task level configuration option to set the dnsSearchDomain. All containers in that task would have their search domains set so they could make requests like:
```golang
// back-end calling front-end
frontend := "http://front-end/some-request"
resp, err := http.Get(frontend)
// front-end calling front-end
backend := "http://back-end/some-request"
resp, err := http.Get(backend)
```
**Are you currently working around this issue?**
Currently, customers using EC2 can achieve this through setting the `dnsSearchDomain` of their container definition in their task-definition. Fargate customers have no real workaround.
Contributor guide
Assessment
This issue has not been assessed yet.