diff --git a/internal/cli/apply.go b/internal/cli/apply.go index b13f550..7df358c 100644 --- a/internal/cli/apply.go +++ b/internal/cli/apply.go @@ -154,6 +154,12 @@ func runApply(cmd *cobra.Command, args []string) error { if err != nil { return fmt.Errorf("reloading template context: %w", err) } + if mgrErr == nil { + tmplCtx.SecretLookup = func(item, typ, field string) (string, error) { + key := secrets.CacheKey{Provider: "bitwarden", Item: item, Type: typ, Field: field} + return mgr.Get(key) + } + } } }