Skip to content

Commit

Permalink
distinguish clearly between table and GSI flatten function
Browse files Browse the repository at this point in the history
  • Loading branch information
aristosvo committed Feb 13, 2025
1 parent f032571 commit 766ee1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/service/dynamodb/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ func resourceTableRead(ctx context.Context, d *schema.ResourceData, meta interfa
return create.AppendDiagSettingError(diags, names.DynamoDB, resNameTable, d.Id(), "ttl", err)
}

if err := d.Set("warm_throughput", flattenWarmThroughput(table.WarmThroughput)); err != nil {
if err := d.Set("warm_throughput", flattenTableWarmThroughput(table.WarmThroughput)); err != nil {
return create.AppendDiagSettingError(diags, names.DynamoDB, resNameTable, d.Id(), "warm_throughput", err)
}

Expand Down Expand Up @@ -2374,7 +2374,7 @@ func flattenOnDemandThroughput(apiObject *awstypes.OnDemandThroughput) []interfa
return []interface{}{m}
}

func flattenWarmThroughput(apiObject *awstypes.TableWarmThroughputDescription) []interface{} {
func flattenTableWarmThroughput(apiObject *awstypes.TableWarmThroughputDescription) []interface{} {
if apiObject == nil {
return []interface{}{}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/service/dynamodb/table_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func dataSourceTableRead(ctx context.Context, d *schema.ResourceData, meta inter
d.Set("table_class", awstypes.TableClassStandard)
}

if err := d.Set("warm_throughput", flattenWarmThroughput(table.WarmThroughput)); err != nil {
if err := d.Set("warm_throughput", flattenTableWarmThroughput(table.WarmThroughput)); err != nil {
return sdkdiag.AppendErrorf(diags, "setting warm_throughput: %s", err)
}

Expand Down

0 comments on commit 766ee1e

Please sign in to comment.