-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dynamic] send an empty config on destroy calls (#2815)
Similar to pulumi/pulumi-terraform-provider#36, older versions of terraform-plugin-sdk/v2 require an empty (non-nil) `req.Config` field to avoid crashing. ```go configVal, err := msgpack.Unmarshal(req.Config.MsgPack, schemaBlock.ImpliedType()) if err != nil { resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err) return resp, nil } ``` ([src](https://github.com/pulumi/terraform-plugin-sdk/blob/1798ae4ae71f7ffff29312a07c92d41205aff03b/helper/schema/grpc_provider.go#L926-L930)) Newer versions of SDKv2 add a [guard](https://github.com/pulumi/terraform-plugin-sdk/blob/da29621efae69dd03dfdc540aa5f63beab1b764c/helper/schema/grpc_provider.go#L810-L822) before this line is reached. Fixes pulumi/pulumi-terraform-provider#55
- Loading branch information
Showing
3 changed files
with
90 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.