2024-08-19 16:00:16 -04:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { execSync } from 'node:child_process';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Deletes the specified storage bucket
|
|
|
|
|
* @param {string} storageBucketId ID of the storage bucket to be deleted
|
|
|
|
|
*/
|
2024-12-17 10:17:32 -05:00
|
|
|
export async function deleteStorageBucket(storageBucketId) {
|
2024-08-19 16:00:16 -04:00
|
|
|
try {
|
|
|
|
|
execSync('boundary storage-buckets delete -id=' + storageBucketId);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.log(`${e.stderr}`);
|
|
|
|
|
}
|
|
|
|
|
}
|