ResourceOptions interface

Optional third-argument bag passed to every resource constructor. Holds authoring flags that affect how the resource declaration is emitted but are not ARM-modeled properties of the resource body.

Fields:

  • condition — an if(...) guard on the declaration. A boolean expression (typically produced by fn.eq, fn.and, etc.) or a plain boolean. Bind it to a const to reuse the same predicate across multiple resources.

existing is deliberately not an option — it is the discriminant of the generated props union ({ existing?: false } | { existing: true }) and lives on props. Routing it through options too would allow contradictory settings between the two channels.

namingRules is deliberately not an option either — it is per-resource-type metadata declared as a protected static namingRules field on each concrete Resource subclass and consumed by the base constructor reflectively, so it stays off the user-facing surface.

Properties

condition
dependsOn

Property Details

condition

condition?: ExpressionOrValue<boolean>

Property Value

dependsOn

dependsOn?: readonly ResourceDeclaration<string>[]

Property Value

readonly ResourceDeclaration<string>[]