Skip to content

Commit

Permalink
fix: remove plugin cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
louisruch committed Oct 12, 2022
1 parent ef38f78 commit 794a827
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ func providerAuthenticate(ctx context.Context, d *schema.ResourceData, md *metaD
opts = append(opts, pluginutil.WithPluginExecutionDirectory(execDir.(string)))
}

wrapper, cleanUp, err := wrapper.GetWrapperFromHcl(
// TODO: cleanup plugin when finished
wrapper, _, err := wrapper.GetWrapperFromHcl(
ctx,
recoveryHclStr,
"recovery",
Expand All @@ -142,15 +143,6 @@ func providerAuthenticate(ctx context.Context, d *schema.ResourceData, md *metaD
if wrapper == nil {
return errors.New(`No "kms" block with purpose "recovery" found in "recovery_kms_hcl"`)
}
if cleanUp != nil {
// Terraform will cancel the context when work is complete.
go func() {
select {
case <-ctx.Done():
_ = cleanUp()
}
}()
}

md.recoveryKmsWrapper = wrapper
md.client.SetRecoveryKmsWrapper(wrapper)
Expand Down

0 comments on commit 794a827

Please sign in to comment.