From 1ec96283bd91c9fe4df293dfff2dfe5e9c8a6531 Mon Sep 17 00:00:00 2001 From: jose97 Date: Tue, 1 Feb 2022 13:42:31 -0800 Subject: [PATCH] fix(): fix data array runtime error * allow for index type resources to be Data type --- rso.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rso.go b/rso.go index 2bd6d23..8ebc132 100644 --- a/rso.go +++ b/rso.go @@ -191,7 +191,11 @@ func (r *rover) PopulateModuleState(rso *ResourcesOverview, module *tfjson.State if _, ok := rs[parent]; !ok { rs[parent] = &StateOverview{} rs[parent].Children = make(map[string]*StateOverview) - rs[parent].Type = ResourceTypeResource + if rst.Mode == "data" { + rs[parent].Type = ResourceTypeData + } else { + rs[parent].Type = ResourceTypeResource + } }