diff --git a/provisioner/terraform/resources.go b/provisioner/terraform/resources.go index 044ad9837445a..639ed8876fba3 100644 --- a/provisioner/terraform/resources.go +++ b/provisioner/terraform/resources.go @@ -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)