Merge pull request #2026 from hashicorp/f-aws-instance-move-tags

providers/aws: Move up where we assign tags on Instance
This commit is contained in:
Clint 2015-05-22 06:48:04 -05:00
commit b2af84f466
1 changed files with 5 additions and 5 deletions

View File

@ -693,6 +693,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) != "" {
@ -739,11 +744,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)