terradart_time 0.33.0 copy "terradart_time: ^0.33.0" to clipboard
terradart_time: ^0.33.0 copied to clipboard

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

example/main.dart

import 'dart:convert';

import 'package:terradart_time/terradart_time.dart';

/// Minimal example: a 60-second `time_sleep`, synthesized to Terraform JSON.
///
/// In a real stack, put the sleep in the `dependsOn` of the resources that
/// must wait.
final class WaitStack extends Stack {
  WaitStack() : super(providers: const [TimeProvider()]) {
    add(
      TimeSleep(
        'wait',
        createDuration: TfArg.duration(const Duration(seconds: 60)),
      ),
    );
  }
}

void main() {
  final result = WaitStack().synth();
  // ignore: avoid_print
  print(const JsonEncoder.withIndent('  ').convert(result.tfJson));
}
1
likes
0
points
360
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

Topics

#terraform #infrastructure

License

unknown (license)

Dependencies

meta, terradart_core

More

Packages that depend on terradart_time