Skip to content

Commit 1641b87

Browse files
committed
turn todo into comment
1 parent 387c5eb commit 1641b87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

helper/schema/resource_importer.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ func ImportStatePassthrough(d *ResourceData, m interface{}) ([]*ResourceData, er
7777
// ImportStatePassthroughContext is an implementation of StateContextFunc that can be
7878
// used to simply pass the ID directly through. This should be used only
7979
// in the case that an ID-only refresh is possible.
80-
// TODO: this does not work with identity, since we also need to be able to set the id at the same time and that can't happen automatically, since the id probably is a combination of the identity attributes (this could work if there's only one attribute though, but practitioners should be able to write their own function that handles this then)
80+
// Please note that this implementation does not work when using resource identity as
81+
// an Id still has to be set and the identity might contain multiple fields
82+
// that are not the same as the ID.
8183
func ImportStatePassthroughContext(ctx context.Context, d *ResourceData, m interface{}) ([]*ResourceData, error) {
8284
return []*ResourceData{d}, nil
8385
}

0 commit comments

Comments
 (0)