]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/github.com/hashicorp/terraform/plans/objchange/all_null.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / plans / objchange / all_null.go
1 package objchange
2
3 import (
4 "github.com/hashicorp/terraform/configs/configschema"
5 "github.com/zclconf/go-cty/cty"
6 )
7
8 // AllAttributesNull constructs a non-null cty.Value of the object type implied
9 // by the given schema that has all of its leaf attributes set to null and all
10 // of its nested block collections set to zero-length.
11 //
12 // This simulates what would result from decoding an empty configuration block
13 // with the given schema, except that it does not produce errors
14 func AllAttributesNull(schema *configschema.Block) cty.Value {
15 // "All attributes null" happens to be the definition of EmptyValue for
16 // a Block, so we can just delegate to that.
17 return schema.EmptyValue()
18 }