Skip to content

Commit

Permalink
fix quantitiy for cf invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
zyclonite committed May 16, 2024
1 parent be00daf commit 6f4ba94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func (a *AWS) List(path string) ([]string, error) {
func (a *AWS) Invalidate(invalidatePaths []string) error {
p := a.plugin
debug("Invalidating \"%s\"", invalidatePaths)
items := make([]*string, 1)
items := make([]*string, 0)
for _, path := range invalidatePaths {
items = append(items, aws.String(path))
}
Expand All @@ -381,7 +381,7 @@ func (a *AWS) Invalidate(invalidatePaths []string) error {
InvalidationBatch: &cloudfront.InvalidationBatch{
CallerReference: aws.String(time.Now().Format(time.RFC3339Nano)),
Paths: &cloudfront.Paths{
Quantity: aws.Int64(1),
Quantity: aws.Int64(int64(len(items))),
Items: items,
},
},
Expand Down

0 comments on commit 6f4ba94

Please sign in to comment.