skeet
Version:
Full-stack TypeScript Serverless Framework
21 lines (19 loc) • 526 B
text/typescript
import { execSyncCmd } from '@/lib/execSyncCmd'
import { getNetworkConfig } from '@/lib/getNetworkConfig'
export const createFirewallSsh = async (projectId: string, appName: string) => {
const networkNames = await getNetworkConfig(projectId, appName)
const shCmd = [
'gcloud',
'compute',
'firewall-rules',
'create',
networkNames.firewallSshName,
'--network',
networkNames.networkName,
'--allow',
'tcp:22,tcp:3389,icmp',
'--project',
projectId,
]
await execSyncCmd(shCmd)
}