Skip to content

Commit

Permalink
Adjust initial creation expirations to avoid overly long initial rota…
Browse files Browse the repository at this point in the history
…tion periods (#1)

Co-authored-by: no value <[email protected]>
  • Loading branch information
andyleap and andyleap authored Jul 22, 2024
1 parent acc6d3d commit d205d83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/provider/multi_rotate_set_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (r *MultiRotateSet) Create(ctx context.Context, req resource.CreateRequest,
return
}

lr := time.Now()
lr := time.Now().Add(-rp * time.Duration(data.Number.ValueInt64()-1))

for i := int64(0); i < data.Number.ValueInt64(); i++ {
exp := lr.Add(time.Duration(data.Number.ValueInt64()) * rp)
Expand Down

0 comments on commit d205d83

Please sign in to comment.