Skip to content

Commit

Permalink
Merge pull request #3426 from brettahale/vpc-sg-patch
Browse files Browse the repository at this point in the history
resource/aws_instance: Remove extra API call on creation for SGs
  • Loading branch information
radeksimko authored Feb 20, 2018
2 parents 3452102 + 12dc975 commit bd8bab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/resource_aws_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error {
}
}

if d.HasChange("vpc_security_group_ids") {
if d.HasChange("vpc_security_group_ids") && !d.IsNewResource() {
var groups []*string
if v := d.Get("vpc_security_group_ids").(*schema.Set); v.Len() > 0 {
for _, v := range v.List() {
Expand Down

0 comments on commit bd8bab5

Please sign in to comment.