removeStack method

Future<void> removeStack(
  1. String stackName, {
  2. bool yes = true,
  3. bool force = false,
  4. bool preserveConfig = false,
})

Removes an existing stack from this workspace.

Implementation

Future<void> removeStack(
  String stackName, {
  bool yes = true,
  bool force = false,
  bool preserveConfig = false,
}) async {
  final args = <String>['stack', 'rm', stackName];
  if (yes) {
    args.add('--yes');
  }
  if (force) {
    args.add('--force');
  }
  if (preserveConfig) {
    args.add('--preserve-config');
  }
  await runPulumiCommand(args);
}