Ask Your Question

expected params[:filters][0][:values][0] to be a string

asked 2015-06-19 14:52:00 -0600

steffy.oommen gravatar image

When I am attaching security group to the load balancer, i am getting the following error,

expected params[:filters][0][:values][0] to be a string

edit retag flag offensive close merge delete


Please post the relevant code, your environment details, and more detailed output messages. It's difficult to debug this problem without more information.

GregLarkin gravatar imageGregLarkin ( 2015-06-24 00:48:59 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-08-17 10:05:17 -0600 gravatar image

If you read the documentation at , you'll notice that the security_groups option is VPC only.

This means that it cannot be combined with the availability_zones option from the example in the documentation, but always has to be used in conjunction with the subnets option instead.

For the sake of completeness, a working example:

ec2_securitygroup {'web-elb':
  ensure      => present,
  vpc         => 'my-web-vpc', #declared outside this example
  region      => 'eu-west-1',
  description => 'SG that defines load balancer access policies and connects linked webservers',
  ingress     => [
      protocol  => 'tcp',
      cidr      => '',
      protocol  => 'tcp',
      cidr      => '',
      security_group => 'web-ec2-webservers',
  tags        => {
    resource-group => 'example-web'

elb_loadbalancer { 'example-eu-elb1':
  ensure               => present,
  region               => 'eu-west-1',
  instances            => ['example-eu-web-t3ws-03', 'example-eu-web-t3ws-02'],
  security_groups      => ['web-elb'], #SG mentioned above
  subnets              => ['example-eu-web-public-a', 'example-eu-web-public-b'], #declared outside this example
  listeners            => [
      protocol           => 'HTTP',
      load_balancer_port => 80,
      instance_protocol  => 'HTTP',
      instance_port      => 80,
  tags                 => {
    resource-group => 'example-web',

Running the example above will now result in an ELB launched in your VPC:

AWS_PROFILE=example AWS_REGION=eu-west-1 puppet apply eu-elb.pp
Notice: Compiled catalog for calculon.local in environment production in 0.01 seconds
Notice: /Stage[main]/Main/Elb_loadbalancer[example-eu-elb1]/ensure: created
Notice: Finished catalog run in 3.01 seconds
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-06-19 14:52:00 -0600

Seen: 775 times

Last updated: Jun 19 '15