@@ -2,6 +2,7 @@ package aws
22
33import (
44 "fmt"
5+ "os"
56 "reflect"
67 "testing"
78
@@ -12,6 +13,7 @@ import (
1213
1314func TestAccAWSELB_basic (t * testing.T ) {
1415 var conf elb.LoadBalancer
16+ ssl_certificate_id := os .Getenv ("AWS_SSL_CERTIFICATE_ID" )
1517
1618 resource .Test (t , resource.TestCase {
1719 PreCheck : func () { testAccPreCheck (t ) },
@@ -35,6 +37,8 @@ func TestAccAWSELB_basic(t *testing.T) {
3537 "aws_elb.bar" , "listener.0.instance_port" , "8000" ),
3638 resource .TestCheckResourceAttr (
3739 "aws_elb.bar" , "listener.0.instance_protocol" , "http" ),
40+ resource .TestCheckResourceAttr (
41+ "aws_elb.bar" , "listener.0.ssl_certificate_id" , ssl_certificate_id ),
3842 resource .TestCheckResourceAttr (
3943 "aws_elb.bar" , "listener.0.lb_port" , "80" ),
4044 resource .TestCheckResourceAttr (
@@ -277,6 +281,21 @@ resource "aws_instance" "foo" {
277281}
278282`
279283
284+ const testAccAWSELBConfigListenerSSLCertificateId = `
285+ resource "aws_elb" "bar" {
286+ name = "foobar-terraform-test"
287+ availability_zones = ["us-west-2a"]
288+
289+ listener {
290+ instance_port = 8000
291+ instance_protocol = "http"
292+ ssl_certificate_id = "%s"
293+ lb_port = 443
294+ lb_protocol = "https"
295+ }
296+ }
297+ `
298+
280299const testAccAWSELBConfigHealthCheck = `
281300resource "aws_elb" "bar" {
282301 name = "foobar-terraform-test"
0 commit comments