From 7948aa720e0558f54de9d039a1595715e8efe1c8 Mon Sep 17 00:00:00 2001 From: Joshua Semar Date: Tue, 23 Jun 2015 20:24:15 -0500 Subject: [PATCH] dynamodb - only require nonkey attributes on INCLUDE --- builtin/providers/aws/resource_aws_dynamodb_table.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_dynamodb_table.go b/builtin/providers/aws/resource_aws_dynamodb_table.go index 163d14d8d..6bacdbdae 100644 --- a/builtin/providers/aws/resource_aws_dynamodb_table.go +++ b/builtin/providers/aws/resource_aws_dynamodb_table.go @@ -208,7 +208,7 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er ProjectionType: aws.String(lsi["projection_type"].(string)), } - if lsi["projection_type"] != "ALL" { + if lsi["projection_type"] == "INCLUDE" { non_key_attributes := []*string{} for _, attr := range lsi["non_key_attributes"].([]interface{}) { non_key_attributes = append(non_key_attributes, aws.String(attr.(string))) @@ -570,7 +570,7 @@ func createGSIFromData(data *map[string]interface{}) dynamodb.GlobalSecondaryInd ProjectionType: aws.String((*data)["projection_type"].(string)), } - if (*data)["projection_type"] != "ALL" { + if (*data)["projection_type"] == "INCLUDE" { non_key_attributes := []*string{} for _, attr := range (*data)["non_key_attributes"].([]interface{}) { non_key_attributes = append(non_key_attributes, aws.String(attr.(string)))