]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/hashicorp/terraform/configs/configschema/schema.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / configs / configschema / schema.go
similarity index 75%
rename from vendor/github.com/hashicorp/terraform/config/configschema/schema.go
rename to vendor/github.com/hashicorp/terraform/configs/configschema/schema.go
index 9a8ee550aa1be417934fba18c316938412bc0216..5a67334d47016e3e10f431269cab6d6baf4287f3 100644 (file)
@@ -28,6 +28,12 @@ type Attribute struct {
        // Type is a type specification that the attribute's value must conform to.
        Type cty.Type
 
+       // Description is an English-language description of the purpose and
+       // usage of the attribute. A description should be concise and use only
+       // one or two sentences, leaving full definition to longer-form
+       // documentation defined elsewhere.
+       Description string
+
        // Required, if set to true, specifies that an omitted or null value is
        // not permitted.
        Required bool
@@ -87,6 +93,23 @@ const (
        // provided directly as an object value.
        NestingSingle
 
+       // NestingGroup is similar to NestingSingle in that it calls for only a
+       // single instance of a given block type with no labels, but it additonally
+       // guarantees that its result will never be null, even if the block is
+       // absent, and instead the nested attributes and blocks will be treated
+       // as absent in that case. (Any required attributes or blocks within the
+       // nested block are not enforced unless the block is explicitly present
+       // in the configuration, so they are all effectively optional when the
+       // block is not present.)
+       //
+       // This is useful for the situation where a remote API has a feature that
+       // is always enabled but has a group of settings related to that feature
+       // that themselves have default values. By using NestingGroup instead of
+       // NestingSingle in that case, generated plans will show the block as
+       // present even when not present in configuration, thus allowing any
+       // default values within to be displayed to the user.
+       NestingGroup
+
        // NestingList indicates that multiple blocks of the given type are
        // permitted, with no labels, and that their corresponding objects should
        // be provided in a list.