Working code for generating from JSON. (Answer found here via Ask Puppetlabs: https://ask.puppetlabs.com/question/13389/how-to-create-resource-definition-dynamically/?answer=13395#post-id-13395)