Skip to content

Commit

Permalink
Merge pull request #32 from flbla/master
Browse files Browse the repository at this point in the history
avoid gc custom cron to be re-created/updated every time
  • Loading branch information
wrighbr authored Nov 18, 2020
2 parents 8fc7914 + 7eee7a3 commit 14b815d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion provider/resource_garbage_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ func resourceGCRead(d *schema.ResourceData, m interface{}) error {
fmt.Println(err)
}

d.Set("schedule", strings.ToLower(jsonData.Schedule.Type))
if jsonData.Schedule.Type == "Custom" {
d.Set("schedule", jsonData.Schedule.Cron)
} else {
d.Set("schedule", strings.ToLower(jsonData.Schedule.Type))
}
d.Set("delete_untagged", jsonJobParameters.DeleteUntagged)
return nil
}
Expand Down

0 comments on commit 14b815d

Please sign in to comment.