Skip to content

Commit

Permalink
Allow calls from outside Parameterize
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Jul 22, 2024
1 parent 2f29333 commit 32e9d39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dynamic/internal/shim/run/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ func runProvider(ctx context.Context, meta *providercache.CachedProvider) (Provi
Logger: logging.NewProviderLogger(""),
AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC},
Managed: true,
Cmd: exec.CommandContext(ctx, execFile),
// We intentionally use [context.Background] so the lifetime of the
// provider can escape the lifetime of the parameterize call.
Cmd: exec.CommandContext(context.Background(), execFile),
AutoMTLS: true,
VersionedPlugins: tfplugin.VersionedPlugins,
SyncStdout: logging.PluginOutputMonitor(fmt.Sprintf("%s:stdout", meta.Provider)),
Expand Down

0 comments on commit 32e9d39

Please sign in to comment.