Add resource filtering

Fix to previous PR, this allows the env variables to get replaced correctly
Merge pull request #13 from LordRalex/patch-1

Add resource filtering