Skip to content

Commit

Permalink
Merge pull request #45 from pcheliniy/patch-1
Browse files Browse the repository at this point in the history
Attempt to fix retention policy params
  • Loading branch information
wrighbr authored Dec 11, 2020
2 parents 0b0da07 + ee79e34 commit f914740
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions client/retention.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ func expandRententionRules(d *schema.ResourceData) []models.Rules {
} else if i["n_days_since_last_push"].(int) > 0 {
rule.Params.NDaysSinceLastPush = i["n_days_since_last_push"].(int)
rule.Template = "nDaysSinceLastPush"
} else if i["most_recently_pulled"].(int) > 0 {
rule.Params.LatestPulledN = i["most_recently_pulled"].(int)
rule.Template = "latestPulledN"
} else if i["most_recently_pushed"].(int) > 0 {
rule.Params.LatestPushedK = i["most_recently_pulled"].(int)
rule.Template = "LatestPushedK"
rule.Params.LatestPushedK = i["most_recently_pushed"].(int)
rule.Template = "latestPushedK"
} else if i["always_retain"] == true {
rule.Template = "always"
}
Expand Down

0 comments on commit f914740

Please sign in to comment.