resourcesGroup static method
Top-level resource { ... } group, keyed by terraform type then
local name. Returns null when the stack has no resources.
Implementation
static Map<String, dynamic>? resourcesGroup(Stack stack) {
if (stack.resources.isEmpty) return null;
final out = <String, Map<String, dynamic>>{};
for (final r in stack.resources) {
out.putIfAbsent(r.terraformType, () => {})[r.localName] = resourceBlock(
r,
devModeInjectDeletionProtection: stack.devMode,
);
}
return out;
}