beanstalk: configuring the ALB during provisioning

241 views
Skip to first unread message

Stuart Robertson

unread,
Oct 16, 2016, 3:23:10 PM10/16/16
to Terraform
I'm using terraform 0.7.6.

The new load balancer get successfully provisioned for the beanstalk environment.

  setting {
    namespace = "aws:elasticbeanstalk:environment"
    name = "LoadBalancerType"
    value = "application"
  }

But none of these settings seem to propagate from my terraform config to the ALB itself.

  setting {
    namespace = "aws:elb:policies"
    name = "Stickiness Policy"
    value = "${var.elb_stickiness}"
  }
  setting {
    namespace = "aws:elasticbeanstalk:application"
    name = "Application Healthcheck URL"
    value = "${var.health_check_url}"
  }

I find myself having to manually configure the ALB after it's initially provisioned, because the configuration I have specified via these settings don't take.

I'm guessing this may not be a terraform issue, but does anyone else have any example configs to share?  I'd like to fully configure the ALB if possible directly from the beanstalk provisioning script.  My use cases don't involve any fancy path-based routing to other resources, all just goes straight into beanstalk.

Thanks,

Stu

Greg Heidorn

unread,
Jan 9, 2017, 2:29:11 PM1/9/17
to Terraform
I have the same question.  I'd like my terraform configuration to automatically add another security group to my load balancer after the beanstalk environment is completed.  I can get the ID of the newly created Beanstalk via 

${aws_elastic_beanstalk_environment.my-application-name.load_balancers}

...using an output block.  I am wondering where I can grab the load balancer and update it's security groups at that point.
Reply all
Reply to author
Forward
0 new messages