diff --git a/builtin/providers/aws/tagsRDS.go b/builtin/providers/aws/tagsRDS.go index 0677c2320..8eb592427 100644 --- a/builtin/providers/aws/tagsRDS.go +++ b/builtin/providers/aws/tagsRDS.go @@ -20,12 +20,13 @@ func setTagsRDS(conn *rds.RDS, d *schema.ResourceData, arn string) error { // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]string, 0, len(remove)) + k := make([]string, len(remove), len(remove)) for i, t := range remove { k[i] = *t.Key } + err := conn.RemoveTagsFromResource(&rds.RemoveTagsFromResourceMessage{ - ResourceName: aws.String(d.Get("name").(string)), + ResourceName: aws.String(arn), TagKeys: k, }) if err != nil {