diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ee49ff..0eeeaa7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 06c93b44..481c8094 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -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", @@ -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)