feat: EC2 UI polished + storage persisting

This commit is contained in:
Zakaria
2026-09-25 18:18:33 -04:00
parent 1b129e9dcf
commit 093afb9b2b
40 changed files with 2586 additions and 102 deletions
+4 -2
View File
@@ -142,6 +142,8 @@ export type Ec2KeyPairMaterial = {
keyMaterial: string
}
export type Ec2KeyPairType = 'rsa' | 'ed25519'
export type Ec2Vpc = {
vpcId: string
cidrBlock: string
@@ -588,8 +590,8 @@ export function createEc2Service(client: EC2Client = awsClients.ec2) {
}
},
async createKeyPair(name: string): Promise<Ec2KeyPairMaterial> {
const res = await client.send(new CreateKeyPairCommand({KeyName: name}))
async createKeyPair(name: string, keyType: Ec2KeyPairType = 'rsa'): Promise<Ec2KeyPairMaterial> {
const res = await client.send(new CreateKeyPairCommand({KeyName: name, KeyType: keyType}))
return {
keyPairId: res.KeyPairId ?? '',
keyName: res.KeyName ?? name,