setConfig method

Future<PulumiCommandResult> setConfig(
  1. String stackName,
  2. String key,
  3. String value, {
  4. bool path = false,
  5. bool secret = false,
})

Sets one config key on stackName.

Implementation

Future<PulumiCommandResult> setConfig(
  String stackName,
  String key,
  String value, {
  bool path = false,
  bool secret = false,
}) {
  final args = <String>['config', 'set'];
  if (path) {
    args.add('--path');
  }
  args.addAll(<String>[
    key,
    '--stack',
    stackName,
    secret ? '--secret' : '--plaintext',
    '--non-interactive',
    '--',
    value,
  ]);
  return runPulumiCommand(args);
}