TfType class sealed
A Terraform type constraint: string, list(number),
object({ name = string }).
Stack.variable derives it from the handle's Dart type — String,
int / double / num, bool, and List / Set / Map<String, _>
of those — so type: is only needed for what Dart cannot say:
final labels = variable<Map<String, String>>('labels');
final service = variable<Object?>(
'service',
type: .object({'name': .string, 'port': .optional(.number, 8080)}),
);
Constructors
- TfType.list(TfType element)
-
list(<element>).constfactory - TfType.map(TfType element)
-
map(<element>).constfactory -
TfType.object(Map<
String, TfType> attributes) -
object({ <name> = <type>, ... }); an attribute may be optional.constfactory - TfType.optional(TfType type, [Object? defaultValue])
-
optional(<type>[, <default>]), an object attribute the caller may leave out.constfactory - TfType.set(TfType element)
-
set(<element>).constfactory -
TfType.tuple(List<
TfType> elements) -
tuple([<type>, ...]).constfactory
Properties
- expression → String
-
The constraint as Terraform writes it, which is also its tf.json form.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited