diff --git a/cmd/auth_client.go b/cmd/auth_client.go index 3f22b993..adec33e8 100644 --- a/cmd/auth_client.go +++ b/cmd/auth_client.go @@ -21,7 +21,7 @@ func AuthenticatedApiKeyClient(ctx context.Context) sdpconnect.ApiKeyServiceClie url = viper.GetString("url") viper.Set("api-key-url", url) } - log.WithContext(ctx).WithField("api-key-url", url).Debug("Connecting to overmind apikeys API") + log.WithContext(ctx).WithField("api-key-url", url).Debug("Connecting to overmind apikeys API (pre-authenticated)") return sdpconnect.NewApiKeyServiceClient(httpClient, url) } @@ -33,7 +33,7 @@ func UnauthenticatedApiKeyClient(ctx context.Context) sdpconnect.ApiKeyServiceCl url = viper.GetString("url") viper.Set("api-key-url", url) } - log.WithContext(ctx).WithField("api-key-url", url).Debug("Connecting to overmind apikeys API (unauthenticated)") + log.WithContext(ctx).WithField("api-key-url", url).Debug("Connecting to overmind apikeys API") return sdpconnect.NewApiKeyServiceClient(otelhttp.DefaultClient, url) } diff --git a/cmd/submitplan.go b/cmd/submitplan.go index 9c700353..1995abc0 100644 --- a/cmd/submitplan.go +++ b/cmd/submitplan.go @@ -160,14 +160,23 @@ func changingItemQueriesFromPlan(ctx context.Context, planJSON []byte, lf log.Fi } u := uuid.New() - changing_items = append(changing_items, &sdp.Query{ + newQuery := sdp.Query{ Type: mapData.Type, Method: mapData.Method, Query: query.(string), Scope: scope, RecursionBehaviour: &sdp.Query_RecursionBehaviour{}, UUID: u[:], - }) + } + + changing_items = append(changing_items, &newQuery) + + log.WithContext(ctx).WithFields(log.Fields{ + "scope": newQuery.Scope, + "type": newQuery.Type, + "query": newQuery.Query, + "method": newQuery.Method.String(), + }).Debug("mapped terraform to query") } }