aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go
diff options
context:
space:
mode:
authorAlexandre Garand <alexandre.garand@fretlink.com>2019-08-09 15:59:15 +0200
committerAlexandre Garand <alexandre.garand@fretlink.com>2019-08-09 16:39:21 +0200
commit863486a6b71ed0e562a3965bed56465d007b1418 (patch)
treee93f6a687695af86d54237ec9f575d4ef104222d /vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go
parent49c1c7b4dc69ffb9ab52330e6dc52ccdd6351087 (diff)
downloadterraform-provider-statuscake-add_contact_groups.tar.gz
terraform-provider-statuscake-add_contact_groups.tar.zst
terraform-provider-statuscake-add_contact_groups.zip
update vendor and go.modadd_contact_groups
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go b/vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go
index 2f2463a..47a0256 100644
--- a/vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go
+++ b/vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go
@@ -55,10 +55,11 @@ func effectiveSchema(given *hcl.BodySchema, body hcl.Body, ambiguousNames map[st
55 }, 55 },
56 } 56 }
57 content, _, _ = body.PartialContent(&probeSchema) 57 content, _, _ = body.PartialContent(&probeSchema)
58 if len(content.Blocks) > 0 { 58 if len(content.Blocks) > 0 || dynamicExpanded {
59 // No attribute present and at least one block present, so 59 // A dynamic block with an empty iterator returns nothing.
60 // we'll need to rewrite this one as a block for a successful 60 // If there's no attribute and we have either a block or a
61 // result. 61 // dynamic expansion, we need to rewrite this one as a
62 // block for a successful result.
62 appearsAsBlock[name] = struct{}{} 63 appearsAsBlock[name] = struct{}{}
63 } 64 }
64 } 65 }