From 58166ceaf5c5c48aa391c8229264fcb1ff73356f Mon Sep 17 00:00:00 2001 From: Ryan King Date: Tue, 12 Feb 2019 09:23:42 -0800 Subject: [PATCH 1/2] remove comment about nested schema.Resources having their own lifecycle This comment seems to imply that you can put CRUD functions on nested schema.Resource objects. The comment goes back to the first commit to this file, but AFAICT this functionality has never been implemented. --- helper/schema/schema.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helper/schema/schema.go b/helper/schema/schema.go index 31b236072..2cc109a38 100644 --- a/helper/schema/schema.go +++ b/helper/schema/schema.go @@ -148,8 +148,7 @@ type Schema struct { // Elem represents the element type. For a TypeMap, it must be a *Schema // with a Type of TypeString, otherwise it may be either a *Schema or a // *Resource. If it is *Schema, the element type is just a simple value. - // If it is *Resource, the element type is a complex structure, - // potentially with its own lifecycle. + // If it is *Resource, the element type is a complex structure. Elem interface{} // The following fields are only set for a TypeList or TypeSet. From 350395d8043a999aa3cd14b35e21154fce865fc9 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 8 Aug 2019 13:21:04 +0100 Subject: [PATCH 2/2] Add better comment --- helper/schema/schema.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helper/schema/schema.go b/helper/schema/schema.go index 2cc109a38..4cda64eb1 100644 --- a/helper/schema/schema.go +++ b/helper/schema/schema.go @@ -148,7 +148,8 @@ type Schema struct { // Elem represents the element type. For a TypeMap, it must be a *Schema // with a Type of TypeString, otherwise it may be either a *Schema or a // *Resource. If it is *Schema, the element type is just a simple value. - // If it is *Resource, the element type is a complex structure. + // If it is *Resource, the element type is a complex structure, + // potentially managed via its own CRUD actions on the API. Elem interface{} // The following fields are only set for a TypeList or TypeSet.