fix: ensure agentResource is non-nil (#2261)

This commit is contained in:
Colin Adler
2022-06-11 00:02:49 +00:00
committed by GitHub
parent 8415022bf9
commit e3a1cd34b7
+4
View File
@@ -127,6 +127,10 @@ func ConvertResources(module *tfjson.StateModule, rawGraph string) ([]*proto.Res
}
}
if agentResource == nil {
continue
}
agents, exists := resourceAgents[agentResource.Label]
if !exists {
agents = make([]*proto.Agent, 0)