aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/helper/schema/provisioner.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/helper/schema/provisioner.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/schema/provisioner.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/provisioner.go b/vendor/github.com/hashicorp/terraform/helper/schema/provisioner.go
index a8d42db..637e221 100644
--- a/vendor/github.com/hashicorp/terraform/helper/schema/provisioner.go
+++ b/vendor/github.com/hashicorp/terraform/helper/schema/provisioner.go
@@ -8,6 +8,7 @@ import (
8 8
9 "github.com/hashicorp/go-multierror" 9 "github.com/hashicorp/go-multierror"
10 "github.com/hashicorp/terraform/config" 10 "github.com/hashicorp/terraform/config"
11 "github.com/hashicorp/terraform/configs/configschema"
11 "github.com/hashicorp/terraform/terraform" 12 "github.com/hashicorp/terraform/terraform"
12) 13)
13 14
@@ -121,6 +122,11 @@ func (p *Provisioner) Stop() error {
121 return nil 122 return nil
122} 123}
123 124
125// GetConfigSchema implementation of terraform.ResourceProvisioner interface.
126func (p *Provisioner) GetConfigSchema() (*configschema.Block, error) {
127 return schemaMap(p.Schema).CoreConfigSchema(), nil
128}
129
124// Apply implementation of terraform.ResourceProvisioner interface. 130// Apply implementation of terraform.ResourceProvisioner interface.
125func (p *Provisioner) Apply( 131func (p *Provisioner) Apply(
126 o terraform.UIOutput, 132 o terraform.UIOutput,
@@ -146,7 +152,7 @@ func (p *Provisioner) Apply(
146 } 152 }
147 153
148 sm := schemaMap(p.ConnSchema) 154 sm := schemaMap(p.ConnSchema)
149 diff, err := sm.Diff(nil, terraform.NewResourceConfig(c), nil, nil) 155 diff, err := sm.Diff(nil, terraform.NewResourceConfig(c), nil, nil, true)
150 if err != nil { 156 if err != nil {
151 return err 157 return err
152 } 158 }
@@ -160,7 +166,7 @@ func (p *Provisioner) Apply(
160 // Build the configuration data. Doing this requires making a "diff" 166 // Build the configuration data. Doing this requires making a "diff"
161 // even though that's never used. We use that just to get the correct types. 167 // even though that's never used. We use that just to get the correct types.
162 configMap := schemaMap(p.Schema) 168 configMap := schemaMap(p.Schema)
163 diff, err := configMap.Diff(nil, c, nil, nil) 169 diff, err := configMap.Diff(nil, c, nil, nil, true)
164 if err != nil { 170 if err != nil {
165 return err 171 return err
166 } 172 }