From 0d843ac150c8b1bcab4ef4cbb023290c0101f9db Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 17 Jul 2018 21:07:34 -0400 Subject: [PATCH] add Config to the PlanResourceChangeRequest In order for providers to determine if a computed value was unset in the configuration, the configuration must be passed along with the prior and proposed states. Terraform core will still handle the creation of the ProposedNewState to ensure correctness, but the raw configuration value will also be supplied for comparison. --- providers/provider.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/providers/provider.go b/providers/provider.go index 7cf1da9de6..0522484471 100644 --- a/providers/provider.go +++ b/providers/provider.go @@ -187,6 +187,12 @@ type PlanResourceChangeRequest struct { // changes required to create the proposed final state. ProposedNewState cty.Value + // Config is the resource configuration, before being merged with the + // PriorState. Any value not explicitly set in the configuration will be + // null. Config is supplied for reference, but Provider implementations + // should prefer the ProposedNewState in most circumstances. + Config cty.Value + // PriorPrivate is the previously saved private data returned from the // provider during the last apply. PriorPrivate []byte