import { AksClusterConfig , AksClusterManager } from './aks' ; import { AwsClusterConfig , AwsClusterManager } from './aws' ; import { BaseClusterConfig , BaseClusterManager , CloudProvider } from './base' ; import { GCPClusterConfig , GCPClusterManager } from './gcp' ; const clusterManagerByCloudProvider = { [ CloudProvider . AWS ] : ( clusterConfig , celoEnv ) => new AwsClusterManager ( clusterConfig as AwsClusterConfig , celoEnv ) , [ CloudProvider . AZURE ] : ( clusterConfig , celoEnv ) => new AksClusterManager ( clusterConfig as AksClusterConfig , celoEnv ) , [ CloudProvider . GCP ] : ( clusterConfig , celoEnv ) => new GCPClusterManager ( clusterConfig as GCPClusterConfig , celoEnv ) , } ; export function getClusterManager ( cloudProvider , celoEnv , clusterConfig ) { return clusterManagerByCloudProvider [ cloudProvider ] ( clusterConfig , celoEnv ) ; }