-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Match upstream fix for Configure config to allow access to RawConfig …
…by providers (#2263) This matches an upstream fix in the terraform-plugin-sdk: hashicorp/terraform-plugin-sdk#1271 for hashicorp/terraform-plugin-sdk#1270 We fail to inherit it as we do not use the top-level GRPC methods but hook in deeper. The problem is that the `GetRawConfig` methods expect the `CtyValue` on the `ResourceData` object to be filled https://github.com/hashicorp/terraform-plugin-sdk/pull/1271/files#diff-7f0240b3a899f37961cbce63b21bcc4395864395501e3231cd0e0f15a11a9c47R599 This happens in https://github.com/hashicorp/terraform-plugin-sdk/pull/1271/files#diff-cb044934d551a7bd462735476d13f6a21549a098d631f9ba5a2be806657d333fR595 but that is in the top-level GRPC method, which we do not use. This PR aims to mimic the same for the bridge - when making the config for the provider `Configure` method, we make sure to fill in the `CtyValue`. As this is only done for `Configure` in the tf-plugin-sdk, we match that. To do that we add a new method to the `shim.Provider` interface `NewProviderConfig`, in contrast with the old NewResourceConfig. This is then used in the new schema.go function `MakeTerraformConfigFromInputsWithOpts`, which has `ProviderConfig` option, which is to be used by `Configure` and `CheckConfig`. fixes #2262
- Loading branch information
1 parent
0a30ea8
commit 6b95c60
Showing
12 changed files
with
335 additions
and
3 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
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
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
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
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
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
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
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
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.