Skip to content

Commit

Permalink
Merge pull request #1708 from hashicorp/f-elb-source-security-group
Browse files Browse the repository at this point in the history
providers/aws: add source_security_group to elb
  • Loading branch information
phinze committed Apr 30, 2015
2 parents 754eb8c + e4e6ac5 commit a9de720
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions builtin/providers/aws/resource_aws_elb.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,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},
Expand Down Expand Up @@ -280,6 +286,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)
Expand Down
3 changes: 3 additions & 0 deletions website/source/docs/providers/aws/r/elb.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit a9de720

Please sign in to comment.