rcl/examples/buckets.rcl
Ruud van Asseldonk 606376f2d9 Run new autoformatter on all examples
In the past I did not autoformat them because I was not happy with the
output yet, but now the formatter is good enough that I'm willing to
take this. There are still a few cases where I'm like ... meh, but that
requires human judgement that I think a formatter can never get right,
so I'm willing to stop arguing about this to get a formatter.

Possibly in the future I can add the magic trailing comma like Black has
in Python, to force collections to be tall. That could still be nice.
We can do that in a follow-up.
2024-06-15 21:18:08 +02:00

13 lines
372 B
Text

// See docs/tutorial.md for the origin of this example.
{
buckets = [
let retention_days = { hourly = 4, daily = 30, monthly = 365 };
for database in ["alpha", "bravo"]:
for period, days in retention_days:
{
name = f"{database}-{period}",
region = "eu-west",
lifecycle_policy = { delete_after_seconds = days * 24 * 3600 },
}
],
}