Merge pull request #690 from svanharmelen/f-provider/aws-fix-elb-resource
provider/aws: updated the security_group attribute to use a set
This commit is contained in:
commit
6a6ae12fd2
|
@ -58,11 +58,14 @@ func resourceAwsElb() *schema.Resource {
|
||||||
|
|
||||||
// TODO: could be not ForceNew
|
// TODO: could be not ForceNew
|
||||||
"security_groups": &schema.Schema{
|
"security_groups": &schema.Schema{
|
||||||
Type: schema.TypeList,
|
Type: schema.TypeSet,
|
||||||
Elem: &schema.Schema{Type: schema.TypeString},
|
Elem: &schema.Schema{Type: schema.TypeString},
|
||||||
Optional: true,
|
Optional: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
|
Set: func(v interface{}) int {
|
||||||
|
return hashcode.String(v.(string))
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: could be not ForceNew
|
// TODO: could be not ForceNew
|
||||||
|
@ -179,7 +182,7 @@ func resourceAwsElbCreate(d *schema.ResourceData, meta interface{}) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := d.GetOk("security_groups"); ok {
|
if v, ok := d.GetOk("security_groups"); ok {
|
||||||
elbOpts.SecurityGroups = expandStringList(v.([]interface{}))
|
elbOpts.SecurityGroups = expandStringList(v.(*schema.Set).List())
|
||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := d.GetOk("subnets"); ok {
|
if v, ok := d.GetOk("subnets"); ok {
|
||||||
|
|
Loading…
Reference in New Issue