Skip to content

Commit

Permalink
fix(): fix data array runtime error
Browse files Browse the repository at this point in the history
* allow for index type resources to be Data type
  • Loading branch information
jose97 committed Feb 1, 2022
1 parent 9e14bbf commit 1ec9628
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rso.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

}

Expand Down

0 comments on commit 1ec9628

Please sign in to comment.