Skip to content

Commit

Permalink
Issue hashicorp#2174 Need to wait for creation before setting tags
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossg committed Apr 11, 2016
1 parent 60e56b5 commit c6c0f00
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions builtin/providers/aws/resource_aws_internet_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ func resourceAwsInternetGatewayCreate(d *schema.ResourceData, meta interface{})

f.WriteString(fmt.Sprintf("InternetGateway ID: %s\n", d.Id()))

err = setTags(conn, d)
if err != nil {
return err
}

resource.Retry(5*time.Minute, func() *resource.RetryError {
f.WriteString(fmt.Sprintf("Checking that InternetGateway is created\n"))
igRaw, _, err := IGStateRefreshFunc(conn, d.Id())()
Expand All @@ -72,6 +67,11 @@ func resourceAwsInternetGatewayCreate(d *schema.ResourceData, meta interface{})
}
})

err = setTags(conn, d)
if err != nil {
return err
}

// Attach the new gateway to the correct vpc
return resourceAwsInternetGatewayAttach(d, meta)
}
Expand Down

0 comments on commit c6c0f00

Please sign in to comment.