fix index out of range error

This commit is contained in:
Clint Shryock 2015-03-25 11:10:12 -05:00
parent 398f4564c4
commit 89854b0af5
1 changed files with 3 additions and 2 deletions

View File

@ -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 {