internal library
Building blocks for tools that generate or read TerraDart code — the
terradart wrap generator and terradart-migrate. A Stack does not need
them, and they change without a deprecation period.
Classes
- TfJsonEncoder
-
Synth-time JSON encoder: builds the JSON structure for
main.tf.json.
Functions
-
goDurationString(
Duration d) → String -
das the Go duration string Terraform reads: hours, minutes, seconds, milliseconds and microseconds, each unit only when it is not zero (Duration(minutes: 90)is1h30m, zero is0s). -
hasTemplateSequence(
String template) → bool -
True when
templateholds at least one unescaped${ ... }or%{ ... }sequence — Terraform evaluates it; a string without one is a plain value ($${and%%{are the escaped, literal forms). -
outputEnvironmentName(
String name) → String -
The environment variable that carries the output
name:ORDERS_TOPIC_IDfororders_topic_id,ordersTopicIdororders-topic-id. -
parseGoDuration(
String text) → Duration? -
The Duration a Go duration string (
'30m','1h30m','1.5s') is, ornullwhentextis not one, or is finer than a microsecond. -
templateVariableNames(
String template) → Set< String> -
The names of the
var.<name>references inside the sequences oftemplate, in order of first appearance.$${/%%{escapes are literal text and the contents of quoted strings inside a sequence are ignored, except for sequences nested in them ("${lower("${var.x}")}").