getConfig method

Future<AutomationConfigValue> getConfig(
  1. String stackName,
  2. String key, {
  3. bool path = false,
})

Reads a single config value for stackName.

Implementation

Future<AutomationConfigValue> getConfig(
  String stackName,
  String key, {
  bool path = false,
}) async {
  final args = <String>['config', 'get'];
  if (path) {
    args.add('--path');
  }
  args.addAll(<String>[key, '--json', '--stack', stackName]);
  final result = await runPulumiCommand(args);
  return _decodeConfigValue(result.stdout);
}