puppetlabs-aws icon indicating copy to clipboard operation
puppetlabs-aws copied to clipboard

Specify user_data in hiera

Open PeterPaulH opened this issue 7 years ago • 0 comments

How to specify a user_data template in hiera ? If I specify an ec2_instance in hiera like:

test::ec2_instance:
  test004:
    ensure:             present
    region:             'eu-west-1'
    subnet:             "%{hiera('subnet')}"
    security_groups:
      - PP-Home
    image_id:           "%{hiera('instance_id')}"
    instance_type:      't2.micro'
    user_data:          'template("${module_name}/test/test.sh")'
    tags:
      'Application': 'Stack-Test'

How must I specify the user_data ? With above specification I get the exact text in the user-data instead of the contents of the file.

PeterPaulH avatar May 10 '17 13:05 PeterPaulH