Commit Graph

8 Commits

Author SHA1 Message Date
James Bardin
7dd570ef6c change mock provider to use GetSchemaResponse
This ensures that test providers are using the same types as actual
providers.
2021-01-12 16:31:18 -05:00
Ben Drucker
a39273cfa3 Merge remote-tracking branch 'origin/master' into validate-ignore-empty-provider 2020-12-14 14:39:48 -08:00
Kristin Laemmert
e938b02337
terraform: improve provider config related error messages (#27261)
* terraform: improve provider config related error messages with nil
config

If there is no provider configuration present in the config at all,
errors related to missing required arguments lack source information or
even a reference to the provider in question. This PR adds more specific
error messages in three of these situations:
- ValidateProvider
- ConfigureProvider: provider.PrepareProviderConfig
- ConfigureProvider: ctx.ConfigureProvider

To test the last case I added a ConfigureProviderFn to the MockContext.

* remove newlines and let the diagnost renderer handle fit
2020-12-11 13:18:49 -05:00
Ben Drucker
7e11b97923 Merge remote-tracking branch 'origin/master' into validate-ignore-empty-provider 2020-12-06 09:47:24 -08:00
Alisdair McDiarmid
1c7f412d13 terraform: Unmark provider configuration arguments
Before configuring a provider, we need to unmark the configuration
object, in case it includes any sensitive values. This is required
because configuration occurs over gRPC, which doesn't support sensitive
marks.
2020-11-16 13:13:20 -05:00
Ben Drucker
cd7d78968c move empty provider logic to node_provider 2020-11-09 16:27:17 -08:00
James Bardin
988059d533 make GraphNodeExecutable return diagnostics 2020-10-28 13:47:04 -04:00
Kristin Laemmert
67d441b131
terraform: refactor ProviderEvalTree (#26236)
* remove leftover debug line

* terraform: refactor ProviderEvalTree

This PR refactors the ProviderEvalTree by folding the entire tree into
straight-through code in NodeApplyableProvider Execute (formally
EvalTree). The EvalConfigProvider functions were refactored into
NodeApplyableProvider functions (since that was the only place they were
used).

I also removed the unused node_provider_disabled code.

* revert removal of graphNodeCloseProvider EvalTree, replace with Execute
2020-09-16 12:17:17 -04:00