providers/aws: Move up where we assign tags on Instance

This commit is contained in:
Clint Shryock 2015-05-20 15:33:01 -05:00
parent 883e2848c6
commit 12e69084ef
1 changed files with 5 additions and 5 deletions

View File

@ -679,6 +679,11 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).ec2conn
d.Partial(true)
if err := setTags(conn, d); err != nil {
return err
} else {
d.SetPartial("tags")
}
// SourceDestCheck can only be set on VPC instances
if d.Get("subnet_id").(string) != "" {
@ -725,11 +730,6 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error {
// TODO(mitchellh): wait for the attributes we modified to
// persist the change...
if err := setTags(conn, d); err != nil {
return err
} else {
d.SetPartial("tags")
}
d.Partial(false)
return resourceAwsInstanceRead(d, meta)