@spotinst/spinnaker-deck
Version:
Spinnaker-Deck service, forked with support to Spotinst
14 lines (11 loc) • 473 B
text/typescript
import { IEbsBlockDevice, IBlockDeviceMapping } from '@spinnaker/amazon';
export const createMockEbsBlockDevice = (options?: { size?: number; type?: string }): IEbsBlockDevice => ({
deleteOnTermination: false,
encrypted: true,
volumeSize: options?.size || 40,
volumeType: options?.type || 'standard',
});
export const createMockBlockDeviceMapping = (customEbs?: IEbsBlockDevice) => ({
deviceName: '/dev/sdb',
ebs: customEbs || createMockEbsBlockDevice(),
});