LifecycleOptions class final

lifecycle { ... } block on a resource.

final schema = add(GooglePubsubSchema('orders', name: .literal('orders')));
add(
  GooglePubsubTopic(
    'orders',
    name: .literal('orders'),
    lifecycle: .new(
      createBeforeDestroy: true,
      ignoreChanges: .of(['labels']),
      replaceTriggeredBy: [schema, schema.id],
      conditions: [
        .post(.expression(r'${self.name != ""}'), 'the topic has no name'),
      ],
    ),
  ),
);
Annotations
  • @immutable

Constructors

LifecycleOptions({bool? createBeforeDestroy, bool? preventDestroy, IgnoreChanges? ignoreChanges, List<ReplaceTrigger>? replaceTriggeredBy, List<LifecycleCondition>? conditions})
const

Properties

conditions → List<LifecycleCondition>?
precondition / postcondition blocks, in order.
final
createBeforeDestroy → bool?
create_before_destroy; false is written too, overriding the true Terraform propagates from a dependency.
final
hashCode → int
The hash code for this object.
no setterinherited
ignoreChanges → IgnoreChanges?
ignore_changes: IgnoreChanges.all, or IgnoreChanges.of the attribute paths.
final
preventDestroy → bool?
prevent_destroy.
final
replaceTriggeredBy → List<ReplaceTrigger>?
replace_triggered_by: resources of the Stack (template) and their attributes (template.id). A data source is not a trigger.
final
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.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited