Skip to content

Commit

Permalink
fix: add extra parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
artaasadi committed Nov 5, 2024
1 parent 6c30ac3 commit 1edbedf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ require (
github.com/microsoftgraph/msgraph-sdk-go v1.51.0
github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1
github.com/nats-io/nats.go v1.36.0
github.com/opengovern/og-util v1.0.6-0.20241103104655-33e8cb710353
github.com/opengovern/og-util v1.0.6-0.20241105163426-0bff13a6e9b7
github.com/spf13/cobra v1.7.0
github.com/tombuildsstuff/giovanni v0.18.0
github.com/turbot/steampipe-plugin-sdk/v5 v5.10.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/opengovern/og-util v1.0.6-0.20241103104655-33e8cb710353 h1:DWReXnXoUmefnbCSRuQJCkh77SRu5XwdrNjfR+qmABY=
github.com/opengovern/og-util v1.0.6-0.20241103104655-33e8cb710353/go.mod h1:7l7fNhK6uewIwA0cs7QagJuhjt/E6hEAC01SR8Y0kKk=
github.com/opengovern/og-util v1.0.6-0.20241105163426-0bff13a6e9b7 h1:DMjmOuOomJaWsUX4cBX23UIbc9b27hgAUuwbB0Klnes=
github.com/opengovern/og-util v1.0.6-0.20241105163426-0bff13a6e9b7/go.mod h1:7l7fNhK6uewIwA0cs7QagJuhjt/E6hEAC01SR8Y0kKk=
github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ=
github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8=
github.com/pganalyze/pg_query_go/v4 v4.2.3 h1:cNLqyiVMasV7YGWyYV+fkXyHp32gDfXVNCqoHztEGNk=
Expand Down
5 changes: 5 additions & 0 deletions pkg/describer/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ func DescribeHandler(ctx context.Context, logger *zap.Logger, _ TriggeredBy, inp
}
}
logger.Info("Vault setup complete")

for k, v := range input.ExtraInputs {
ctx = context.WithValue(ctx, k, v)
}

resourceIds, err := Do(
ctx,
vaultSc,
Expand Down
4 changes: 4 additions & 0 deletions provider/describer/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ func GetTriggerTypeFromContext(ctx context.Context) enums.DescribeTriggerType {
return tt
}

func GetParameterFromContext(ctx context.Context, key string) any {
return ctx.Value(key)
}

func WithLogger(ctx context.Context, logger *zap.Logger) context.Context {
return context.WithValue(ctx, "logger", logger)
}
Expand Down

0 comments on commit 1edbedf

Please sign in to comment.