From 77768ab22325b863d2589e3147d1a7b216d1f32c Mon Sep 17 00:00:00 2001 From: Farid Mammadov Date: Fri, 1 Nov 2024 14:11:45 +0400 Subject: [PATCH] use S3User and S3Pass parameters in tempo-cli --- cmd/tempo-cli/main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/tempo-cli/main.go b/cmd/tempo-cli/main.go index 586a2ce2cec..255c107cbce 100644 --- a/cmd/tempo-cli/main.go +++ b/cmd/tempo-cli/main.go @@ -3,6 +3,7 @@ package main import ( "flag" "fmt" + "github.com/grafana/dskit/flagext" "os" "github.com/alecthomas/kong" @@ -135,6 +136,14 @@ func loadBackend(b *backendOptions, g *globalOptions) (backend.Reader, backend.W cfg.StorageConfig.Trace.S3.InsecureSkipVerify = b.InsecureSkipVerify cfg.StorageConfig.Trace.GCS.Insecure = b.InsecureSkipVerify + if b.S3User != "" { + cfg.StorageConfig.Trace.S3.AccessKey = b.S3User + } + + if b.S3Pass != "" { + cfg.StorageConfig.Trace.S3.SecretKey = flagext.SecretWithValue(b.S3Pass) + } + if b.S3Endpoint != "" { cfg.StorageConfig.Trace.S3.Endpoint = b.S3Endpoint }