diff --git a/temporalcli/client.go b/temporalcli/client.go index b77c322f1..d03c2277e 100644 --- a/temporalcli/client.go +++ b/temporalcli/client.go @@ -172,6 +172,11 @@ func (c *ClientOptions) dialClient(cctx *CommandContext) (client.Client, error) if err != nil { return nil, fmt.Errorf("failed creating client options: %w", err) } + + if c.ClientAuthority != "" { + clientOptions.ConnectionOptions.Authority = c.ClientAuthority + } + clientOptions.Logger = log.NewStructuredLogger(cctx.Logger) clientOptions.Identity = clientIdentity() // We do not put codec on data converter here, it is applied via diff --git a/temporalcli/commands.gen.go b/temporalcli/commands.gen.go index a27289bd7..2cd5e8da2 100644 --- a/temporalcli/commands.gen.go +++ b/temporalcli/commands.gen.go @@ -18,6 +18,7 @@ var hasHighlighting = isatty.IsTerminal(os.Stdout.Fd()) type ClientOptions struct { Address string + ClientAuthority string Namespace string ApiKey string GrpcMeta []string @@ -37,6 +38,7 @@ type ClientOptions struct { func (v *ClientOptions) buildFlags(cctx *CommandContext, f *pflag.FlagSet) { f.StringVar(&v.Address, "address", "127.0.0.1:7233", "Temporal Service gRPC endpoint.") + f.StringVar(&v.ClientAuthority, "client-authority", "", "Temporal gRPC client :authority pseudoheader.") f.StringVarP(&v.Namespace, "namespace", "n", "default", "Temporal Service Namespace.") f.StringVar(&v.ApiKey, "api-key", "", "API key for request.") f.StringArrayVar(&v.GrpcMeta, "grpc-meta", nil, "HTTP headers for requests. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers. Can also be made available via environment variable as `TEMPORAL_GRPC_META_[name]`.") diff --git a/temporalcli/commandsgen/commands.yml b/temporalcli/commandsgen/commands.yml index 8542f6184..e63f7a7e9 100644 --- a/temporalcli/commandsgen/commands.yml +++ b/temporalcli/commandsgen/commands.yml @@ -4051,6 +4051,9 @@ option-sets: description: Temporal Service gRPC endpoint. default: 127.0.0.1:7233 implied-env: TEMPORAL_ADDRESS + - name: client-authority + type: string + description: Temporal gRPC client :authority pseudoheader. - name: namespace short: n type: string