add state attributes to resources.