terradart_time

pub: terradart_time Dart SDK License: Apache-2.0

TimeProvider and TimeSleep for the hashicorp/time Terraform provider, for Dart-first Terraform stacks on any cloud.

TimeSleep waits after create (and optionally before destroy) to absorb eventual consistency: GCP API enablement propagation (terradart_google's enableApis adds one for you), AWS IAM role propagation, and the like.

Installation

dependencies:
  terradart_core: ^0.34.0
  terradart_time: ^0.34.0

Usage

import 'package:terradart_time/terradart_time.dart';

final class WaitStack extends Stack {
  WaitStack() : super(providers: const [TimeProvider()]) {
    add(
      TimeSleep(
        'wait',
        createDuration: TfArg.duration(const Duration(seconds: 60)),
      ),
    );
  }
}

TimeProvider pins hashicorp/time at ~> 0.12 (kTimeProviderVersionConstraint). The pin is maintained by hand; no schema-bump automation tracks hashicorp/time.

Only time_sleep is wrapped. Open a feature request for time_static, time_offset or time_rotating.

Libraries

terradart_time
hashicorp/time utilities — TimeProvider and TimeSleep, the propagation wait any provider package's stack can use.