]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/hashicorp/terraform/helper/schema/provisioner.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / helper / schema / provisioner.go
index a8d42dbd0b0bc74db80762d097353b1cde5c5b43..637e221e1db837e3431e4cb71ba2663051361e74 100644 (file)
@@ -8,6 +8,7 @@ import (
 
        "github.com/hashicorp/go-multierror"
        "github.com/hashicorp/terraform/config"
+       "github.com/hashicorp/terraform/configs/configschema"
        "github.com/hashicorp/terraform/terraform"
 )
 
@@ -121,6 +122,11 @@ func (p *Provisioner) Stop() error {
        return nil
 }
 
+// GetConfigSchema implementation of terraform.ResourceProvisioner interface.
+func (p *Provisioner) GetConfigSchema() (*configschema.Block, error) {
+       return schemaMap(p.Schema).CoreConfigSchema(), nil
+}
+
 // Apply implementation of terraform.ResourceProvisioner interface.
 func (p *Provisioner) Apply(
        o terraform.UIOutput,
@@ -146,7 +152,7 @@ func (p *Provisioner) Apply(
                }
 
                sm := schemaMap(p.ConnSchema)
-               diff, err := sm.Diff(nil, terraform.NewResourceConfig(c), nil, nil)
+               diff, err := sm.Diff(nil, terraform.NewResourceConfig(c), nil, nil, true)
                if err != nil {
                        return err
                }
@@ -160,7 +166,7 @@ func (p *Provisioner) Apply(
                // Build the configuration data. Doing this requires making a "diff"
                // even though that's never used. We use that just to get the correct types.
                configMap := schemaMap(p.Schema)
-               diff, err := configMap.Diff(nil, c, nil, nil)
+               diff, err := configMap.Diff(nil, c, nil, nil, true)
                if err != nil {
                        return err
                }