From 89854b0af5fcfdea512a4017ceab4c9420da8ec3 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Wed, 25 Mar 2015 11:10:12 -0500 Subject: [PATCH] fix index out of range error --- builtin/providers/aws/tagsRDS.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 {