Skip to content

Commit 32e9d39

Browse files
committed
Allow calls from outside Parameterize
1 parent 2f29333 commit 32e9d39

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dynamic/internal/shim/run/loader.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ func runProvider(ctx context.Context, meta *providercache.CachedProvider) (Provi
206206
Logger: logging.NewProviderLogger(""),
207207
AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC},
208208
Managed: true,
209-
Cmd: exec.CommandContext(ctx, execFile),
209+
// We intentionally use [context.Background] so the lifetime of the
210+
// provider can escape the lifetime of the parameterize call.
211+
Cmd: exec.CommandContext(context.Background(), execFile),
210212
AutoMTLS: true,
211213
VersionedPlugins: tfplugin.VersionedPlugins,
212214
SyncStdout: logging.PluginOutputMonitor(fmt.Sprintf("%s:stdout", meta.Provider)),

0 commit comments

Comments
 (0)