From e4e6ac5d9126dabf5f92fc98feadb0447d8e8b4b Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Tue, 28 Apr 2015 09:40:19 -0500 Subject: [PATCH] providers/aws: add source_security_group to elb --- builtin/providers/aws/resource_aws_elb.go | 9 +++++++++ website/source/docs/providers/aws/r/elb.html.markdown | 3 +++ 2 files changed, 12 insertions(+) diff --git a/builtin/providers/aws/resource_aws_elb.go b/builtin/providers/aws/resource_aws_elb.go index 8f4c613cd..ef9674324 100644 --- a/builtin/providers/aws/resource_aws_elb.go +++ b/builtin/providers/aws/resource_aws_elb.go @@ -70,6 +70,12 @@ func resourceAwsElb() *schema.Resource { }, }, + "source_security_group": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "subnets": &schema.Schema{ Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, @@ -282,6 +288,9 @@ func resourceAwsElbRead(d *schema.ResourceData, meta interface{}) error { d.Set("instances", flattenInstances(lb.Instances)) d.Set("listener", flattenListeners(lb.ListenerDescriptions)) d.Set("security_groups", lb.SecurityGroups) + if lb.SourceSecurityGroup != nil { + d.Set("source_security_group", lb.SourceSecurityGroup.GroupName) + } d.Set("subnets", lb.Subnets) d.Set("idle_timeout", lbAttrs.ConnectionSettings.IdleTimeout) d.Set("connection_draining", lbAttrs.ConnectionDraining.Enabled) diff --git a/website/source/docs/providers/aws/r/elb.html.markdown b/website/source/docs/providers/aws/r/elb.html.markdown index 491cad074..20b007f6e 100644 --- a/website/source/docs/providers/aws/r/elb.html.markdown +++ b/website/source/docs/providers/aws/r/elb.html.markdown @@ -93,3 +93,6 @@ The following attributes are exported: * `name` - The name of the ELB * `dns_name` - The DNS name of the ELB * `instances` - The list of instances in the ELB +* `source_security_group` - The name of the security group that you can use as + part of your inbound rules for your load balancer's back-end application + instances.