[Feature/Bug] Terminating Gateway Configuration Attributes Missing
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
#### Feature Description
Currently the Terminating Gateway mode for consul allows a written json/hcl configuration, however it is missing the ability to add things such as address or port to it, or register.
These attributes must be given to the `consul connect envoy` command subset as shown in the terminating gateway tutorial [here](https://learn.hashicorp.com/tutorials/consul/terminating-gateways-connect-external-services#register-and-start-the-terminating-gateway)
It is also seen in the struct for the TG configuration:
```go
type TerminatingGatewayConfigEntry struct {
Kind string
Name string
Services []LinkedService
Meta map[string]string `json:",omitempty"`
acl.EnterpriseMeta `hcl:",squash" mapstructure:",squash"`
RaftIndex
}
```
I propose this struct be updated to either have port (int) and address (string), or one unified string much like the consul CLI:
```go
type TerminatingGatewayConfigEntry struct {
Kind string
Name string
Address string `json:",omitempty"`
Services []LinkedService
Meta map[string]string `json:",omitempty"`
acl.EnterpriseMeta `hcl:",squash" mapstructure:",squash"`
RaftIndex
}
```
#### Use Case(s)
The new method for deploying consul on ECS uses a methodology of the consul-ecs binary bootstrapping the client and envoy configurations, utilizing an envoy only container afterwards.
As the terminating gateway configuration doesn't allow for this very necessary listening address and port config, its not possible to utilize the new methodology, or modify the current gateway-task terraform module to harbor Terminating Gateways.
Contributor guide
Assessment
This issue has not been assessed yet.