Skip to main content

Time Provider

Manage time-based resources and operations with Pulumi
1 min read

The Time provider enables you to manage time-based resources like delays, offsets, and rotations in your infrastructure code. This provider is dynamically bridged from the Terraform Time Provider.

Installation#

Install the Time provider package using your preferred package manager:

Configuration#

No configuration required - the Time provider works out of the box.

Quick Start#

Key Features#

Delays#

Add delays between resource operations:

Time Offsets#

Calculate time offsets:

Time Rotation#

Rotate resources on a schedule:

Static Times#

Create static time values:

Common Use Cases#

Staged Deployment#

Certificate Rotation#

Scheduled Resource Updates#

Duration Format#

Durations use Go's time format:

  • s = seconds
  • m = minutes
  • h = hours
  • Examples: 30s, 5m, 2h, 1h30m

Best Practices#

1. Use Delays for External Dependencies#

2. Implement Graceful Shutdowns#

3. Rotate Credentials Regularly#