@@ -1176,6 +1176,7 @@ func TestAccDynamoDBTable_BillingMode_payPerRequestBasic(t *testing.T) {
11761176 resource .TestCheckResourceAttr (resourceName , "billing_mode" , string (awstypes .BillingModePayPerRequest )),
11771177 resource .TestCheckResourceAttr (resourceName , "read_capacity" , "0" ),
11781178 resource .TestCheckResourceAttr (resourceName , "write_capacity" , "0" ),
1179+ resource .TestCheckResourceAttr (resourceName , "global_secondary_index.#" , "0" ),
11791180 ),
11801181 },
11811182 {
@@ -1190,6 +1191,10 @@ func TestAccDynamoDBTable_BillingMode_payPerRequestBasic(t *testing.T) {
11901191 resource .TestCheckResourceAttr (resourceName , "billing_mode" , string (awstypes .BillingModePayPerRequest )),
11911192 resource .TestCheckResourceAttr (resourceName , "read_capacity" , "0" ),
11921193 resource .TestCheckResourceAttr (resourceName , "write_capacity" , "0" ),
1194+ resource .TestCheckResourceAttr (resourceName , "global_secondary_index.#" , "1" ),
1195+ resource .TestCheckTypeSetElemNestedAttrs (resourceName , "global_secondary_index.*" , map [string ]string {
1196+ names .AttrName : "TestTableGSI" ,
1197+ }),
11931198 ),
11941199 },
11951200 },
@@ -1275,6 +1280,7 @@ func TestAccDynamoDBTable_gsiOnDemandThroughput(t *testing.T) {
12751280 testAccCheckInitialTableExists (ctx , resourceName , & conf ),
12761281 resource .TestCheckResourceAttr (resourceName , "billing_mode" , string (awstypes .BillingModePayPerRequest )),
12771282 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "global_secondary_index.*" , map [string ]string {
1283+ names .AttrName : "att1-index" ,
12781284 "on_demand_throughput.0.max_read_request_units" : "5" ,
12791285 "on_demand_throughput.0.max_write_request_units" : "5" ,
12801286 }),
@@ -1292,6 +1298,7 @@ func TestAccDynamoDBTable_gsiOnDemandThroughput(t *testing.T) {
12921298 resource .TestCheckResourceAttr (resourceName , "billing_mode" , string (awstypes .BillingModePayPerRequest )),
12931299 resource .TestCheckResourceAttr (resourceName , "on_demand_throughput.#" , "1" ),
12941300 resource .TestCheckTypeSetElemNestedAttrs (resourceName , "global_secondary_index.*" , map [string ]string {
1301+ names .AttrName : "att1-index" ,
12951302 "on_demand_throughput.0.max_read_request_units" : "10" ,
12961303 "on_demand_throughput.0.max_write_request_units" : "10" ,
12971304 }),
0 commit comments