Skip to content

Commit

Permalink
Fixed aws_servicequotas_service_quota queries fail when querying mult…
Browse files Browse the repository at this point in the history
…iple regions with the same service_code Closes #2313
  • Loading branch information
ParthaI committed Sep 25, 2024
1 parent 84b9d84 commit 00d8930
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aws/table_aws_servicequotas_service_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ func tableAwsServiceQuotasServiceQuota(_ context.Context) *plugin.Table {
ShouldIgnoreErrorFunc: shouldIgnoreErrors([]string{"NoSuchResourceException"}),
},
Get: &plugin.GetConfig{
KeyColumns: plugin.AllColumns([]string{"service_code", "quota_code"}),
// By design, the Get config is expected to return a single row, regardless of regions.
// To prevent the error "get call returned 23 results - the key column is not globally unique," we have included the "region" in the key columns.
Hydrate: getServiceQuota,
KeyColumns: plugin.AllColumns([]string{"service_code", "quota_code", "region"}),
Tags: map[string]string{"service": "servicequotas", "action": "GetServiceQuota"},
IgnoreConfig: &plugin.IgnoreConfig{
ShouldIgnoreErrorFunc: shouldIgnoreErrors([]string{"NoSuchResourceException"}),
Expand Down

0 comments on commit 00d8930

Please sign in to comment.