Featured image in a bundle

I’ve switched to using bundles to display some of my image-heavy posts, using shortcode to save a lot of hassle. But I have difficulty with setting the featured image with this new system. What I’m trying is to just get the first image from the bundle and use that. So I put this in my frontmatter of index.md:

featured_image = "{{ (.Resources.GetMatch "**.jpg").Permalink }}"

But this gives me an error. Any tips?