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 24bd952
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Canonical reference for changes, improvements, and bugfixes for the Boundary Terraform provider.

## 1.1.1 (October 12, 2022)

### Bug Fixes

* The plugin cleanup function is being called before the entire Terraform workflow is complete.
([Issue](https://github.com/hashicorp/terraform-provider-boundary/issues/282)),
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/285)).

## 1.1.0 (October 4, 2022)

### New and Improved
Expand Down
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 24bd952

Please sign in to comment.