Skip to content

Commit 00d63e4

Browse files
authored
Set PageSize to 1000 when fetch images from GAR (#12993)
1 parent aaa5dfc commit 00d63e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mmv1/third_party/terraform/services/artifactregistry/data_source_artifact_registry_docker_image.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ func DataSourceArtifactRegistryDockerImageRead(d *schema.ResourceData, meta inte
132132
return fmt.Errorf("Error setting api endpoint")
133133
}
134134

135-
urlRequest, err = transport_tpg.AddQueryParams(urlRequest, map[string]string{"orderBy": "update_time desc"})
135+
// to reduce the number of pages we need to fetch, we set the pageSize to 1000(max)
136+
urlRequest, err = transport_tpg.AddQueryParams(urlRequest, map[string]string{"orderBy": "update_time desc", "pageSize": "1000"})
136137
if err != nil {
137138
return err
138139
}

0 commit comments

Comments
 (0)