destroy method

Future<PulumiCommandResult> destroy({
  1. bool yes = true,
  2. bool skipPreview = true,
  3. bool nonInteractive = true,
  4. bool check = true,
  5. List<String> extraArgs = const <String>[],
})

Runs pulumi destroy for this stack.

Implementation

Future<PulumiCommandResult> destroy({
  bool yes = true,
  bool skipPreview = true,
  bool nonInteractive = true,
  bool check = true,
  List<String> extraArgs = const <String>[],
}) async {
  final args = <String>['destroy', '--stack', name];
  if (yes) {
    args.add('--yes');
  }
  if (skipPreview) {
    args.add('--skip-preview');
  }
  if (nonInteractive) {
    args.add('--non-interactive');
  }
  args.addAll(extraArgs);
  final (result, _) = await _runStackCommand(
    args,
    check: check,
    captureEvents: false,
  );
  return result;
}