Repository: traefik/traefik (language: go)

Issue:
Make loadbalancer.server.tls=true implicit when consulcatalog.connect=true
### Welcome!

- [X] Yes, I've searched similar issues on [GitHub](https://github.com/traefik/traefik/issues) and didn't find any.
- [X] Yes, I've searched similar issues on the [Traefik community forum](https://community.traefik.io) and didn't find any.

### What did you expect to see?

In Traefik v3, ServersTransport support has been added for TCP services (See https://github.com/traefik/traefik/pull/9465), which makes TCP services reachable through the native Consul Service Mesh support of Traefik.

But, for it to work, we have to explicitely tell Traefik to use TLS to reach the backend, with something like
```
traefik.tcp.services.postgres.loadbalancer.server.tls=true
```

This should be done automatically because with the Consul Service Mesh, it makes no sense not to use TLS. And it would be aligned with the behavior of http services, where the scheme is automatically set to https.


Discussion / hints:

Fix patch:
diff --git a/pkg/provider/consulcatalog/config.go b/pkg/provider/consulcatalog/config.go
index 14c4fcc870..a45696fd4a 100644
--- a/pkg/provider/consulcatalog/config.go
+++ b/pkg/provider/consulcatalog/config.go
@@ -229,6 +229,7 @@ func (p *Provider) addServerTCP(item itemData, loadBalancer *dynamic.TCPServersL
 
 	if item.ExtraConf.ConsulCatalog.Connect {
 		loadBalancer.ServersTransport = itemServersTransportKey(item)
+		loadBalancer.Servers[0].TLS = true
 	}
 
 	loadBalancer.Servers[0].Address = net.JoinHostPort(item.Address, port)


Test patch:
diff --git a/pkg/provider/consulcatalog/config_test.go b/pkg/provider/consulcatalog/config_test.go
index d1a6065548..972ac35865 100644
--- a/pkg/provider/consulcatalog/config_test.go
+++ b/pkg/provider/consulcatalog/config_test.go
@@ -2245,6 +2245,7 @@ func Test_buildConfiguration(t *testing.T) {
 								Servers: []dynamic.TCPServer{
 									{
 										Address: "127.0.0.1:80",
+										TLS:     true,
 									},
 								},
 								ServersTransport: "tls-ns-dc1-Test",