Remove request for attribute changes

This commit is contained in:
John Ewart 2015-06-08 15:58:42 -07:00
parent 4784eff9ca
commit f458521be9
1 changed files with 0 additions and 19 deletions

View File

@ -279,25 +279,6 @@ func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) er
return fmt.Errorf("Range key can only be specified at creation, you cannot modify it.") return fmt.Errorf("Range key can only be specified at creation, you cannot modify it.")
} }
if d.HasChange("attribute") {
req := &dynamodb.UpdateTableInput{
TableName: aws.String(d.Id()),
}
newAttributes := []*dynamodb.AttributeDefinition{}
_, n := d.GetChange("attribute")
newAttributeSet := n.(*schema.Set)
for _, attribute := range newAttributeSet.List() {
attr := attribute.(map[string]interface{})
newAttributes = append(newAttributes, &dynamodb.AttributeDefinition{
AttributeName: aws.String(attr["name"].(string)),
AttributeType: aws.String(attr["type"].(string)),
})
}
req.AttributeDefinitions = newAttributes
}
if d.HasChange("read_capacity") || d.HasChange("write_capacity") { if d.HasChange("read_capacity") || d.HasChange("write_capacity") {
req := &dynamodb.UpdateTableInput{ req := &dynamodb.UpdateTableInput{
TableName: aws.String(d.Id()), TableName: aws.String(d.Id()),