The Time provider allows you to manage time-based resources in your infrastructure, useful for scheduled operations, delays, and time calculations.
Provider Configuration#
The Time provider doesn't require authentication or API credentials. It's a utility provider that operates locally.
Basic Setup#
Provider Instance (Optional)#
While not required, you can explicitly create a provider instance:
Configuration Reference#
The Time provider has no required configuration options. All functionality is available without setup.
Optional Settings#
While the provider itself needs no configuration, individual resources have their own options:
- Triggers: Force resource recreation on specific changes
- Base time: Reference time for calculations
- Offsets: Time adjustments (days, hours, minutes, etc.)
- Rotation: Automatic rotation intervals
Use Cases#
The Time provider is commonly used for:
- Scheduled Rotations: Rotate secrets, passwords, or certificates on a schedule
- Deployment Delays: Add delays between resource creations
- Time Calculations: Calculate future or past timestamps
- Expiration Management: Track and manage resource expiration
Timezone Handling#
All timestamps are in UTC. If you need local time:
Integration Examples#
With Secret Rotation#
With Deployment Delays#
Best Practices#
Use Descriptive Names#
Document Rotation Schedules#
Combine with Other Providers#
Testing#
Local Development#
Time resources work immediately:
Validation#
Troubleshooting#
Common Issues#
Issue: Time not updating
Solution: Use Rotating resource for automatic updates
Issue: Timezone confusion
Solution: Use offsetHours to adjust for your timezone
Issue: Rotation not triggering
Solution: Ensure rotation triggers are properly configured
Next Steps#
- Offset Resource - Calculate time offsets
- Rotating Resource - Automatic time-based rotations
- Sleep Resource - Add delays to deployments
- Static Resource - Capture current timestamp
- Time Management Guide - Patterns and best practices