import * as pulumi from "@pulumi/pulumi" ; import { RunError } from "@pulumi/pulumi/errors" ; declare let module ; declare function require ( name ) ; const config = new pulumi . Config ( "cloud" ) ; const provider = config . require ( "provider" ) ; function loadFrameworkModule ( ) { const frameworkModule = `@pulumi/cloud-${ provider }` ; pulumi . log . debug ( `Loading ${ frameworkModule } for current environment.` ) ; try { return require ( frameworkModule ) ; } catch ( e ) { if ( ( e instanceof Error ) && ( e as any ) . code === "MODULE_NOT_FOUND" ) { throw new RunError ( `
Attempted to load the '${ provider }' implementation of '@pulumi/cloud', but no '${ frameworkModule }' module is installed.\
 Install it now or select another provider implementation with the "cloud:provider" setting.` ) ; } throw e ; } } module . exports = loadFrameworkModule ( ) ;