In order to use custom resources from another profile, you must declare that profile as a dependency. This is done by modifying your including-profile’s inspec.yml file. We have a section on this very thing on our website here:
I will give you a word of caution though: currently, when InSpec fetches a profile dependency via git or URL, it expects that the profile is in the top-level of that repo/URL. If the profile you’re trying to include is a few directories deep (i.e. in a cookbook), it won’t work. We currently an open feature-request on that very functionality but it is not yet implemented: https://github.com/chef/inspec/issues/1974
So my recommendation would be to pull that profile out of your cookbook, put it in a separate repo, and then you can include it from within other profiles, and you can still include it in your cookbook’s .kitchen.yml file, like this example:
- name: my_cookbook_profile
I hope that helps!