Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

How to generate security group using inline_template? #503

Open
kerbachi opened this issue Apr 1, 2018 · 0 comments
Open

How to generate security group using inline_template? #503

kerbachi opened this issue Apr 1, 2018 · 0 comments

Comments

@kerbachi
Copy link

kerbachi commented Apr 1, 2018

Hi all,

Trying unsuccessfully to generate a security group using inline_template:

$my_sg={ protocol => 'tcp',
         port     => 22,
         cidr     => '1.1.1.1/32',}
ec2_securitygroup { 'my-security-group':
  ensure      => present,
  region      => 'us-east-1',
  vpc         => 'vpc-puppet',
  description => 'a description here',
  ingress     => [inline_template('<%=@my_sg %>')],
  tags        => {
    tag_name  => 'value',
  },
}

The error is:

vagrant@u16:~$ /opt/puppetlabs/bin/puppet apply puppet-sg.pp --verbose
Notice: Compiled catalog for u16.ubuntu.int in environment production in 0.05 seconds
Error: Parameter ingress failed on Ec2_securitygroup[my-security-group]: ingress should be a Hash (file: /home/vagrant/puppet-sg.pp, line: 6)

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant