stackOutputs method
Returns stack outputs for stackName from last successful update.
Implementation
Future<Map<String, dynamic>> stackOutputs(
String stackName, {
bool showSecrets = false,
}) async {
final args = <String>['stack', 'output', '--json', '--stack', stackName];
if (showSecrets) {
args.add('--show-secrets');
}
final result = await runPulumiCommand(args);
final decoded = jsonDecode(result.stdout);
if (decoded is! Map) {
throw FormatException(
'Expected object JSON from `pulumi stack output --json`',
);
}
return decoded.map((key, value) => MapEntry('$key', value));
}