Im not sure if your commet means that you already are ok. Anyways, in this situations , before you check if something isAllowed, what you can do is just:
if(!$acl ->hasResource($resource))
$acl -> addResource(new \Zend\Permissions\Acl\Resource\GenericResource($resource));
Or even take the time to extend the default ACL class, so the isAllowed
method, first of all, include the code above. That would be a simple Poka-Yoke practice, and will allow you to maintain the original model where you have to create resources, while promoting ease of use in common or majority use cases.