@webiny/project-aws 0.0.0-unstable.3c5210ad37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/_templates/appTemplates/admin/src/App.scss +2 -0
- package/_templates/appTemplates/admin/src/App.tsx +13 -0
- package/_templates/appTemplates/admin/src/Extensions.tsx +7 -0
- package/_templates/appTemplates/admin/src/index.tsx +11 -0
- package/_templates/appTemplates/admin/tsconfig.json +7 -0
- package/_templates/appTemplates/admin/webiny.application.ts +3 -0
- package/_templates/appTemplates/admin/webiny.config.ts +3 -0
- package/_templates/appTemplates/api/graphql/package.json +43 -0
- package/_templates/appTemplates/api/graphql/src/extensions.ts +9 -0
- package/_templates/appTemplates/api/graphql/src/index.ts +80 -0
- package/_templates/appTemplates/api/graphql/src/security.ts +43 -0
- package/_templates/appTemplates/api/graphql/tsconfig.json +7 -0
- package/_templates/appTemplates/api/graphql/webiny.config.ts +8 -0
- package/_templates/appTemplates/api/migration/src/index.ts +23 -0
- package/_templates/appTemplates/api/migration/tsconfig.json +7 -0
- package/_templates/appTemplates/api/migration/webiny.config.ts +8 -0
- package/_templates/appTemplates/api/webiny.application.ts +3 -0
- package/_templates/appTemplates/blueGreen/webiny.application.ts +3 -0
- package/_templates/appTemplates/core/webiny.application.ts +3 -0
- package/_templates/appTemplates/syncSystem/webiny.application.ts +3 -0
- package/_templates/extensions/ApiLambdaFunction/package.json +9 -0
- package/_templates/extensions/ApiLambdaFunction/tsconfig.json +7 -0
- package/_templates/extensions/ApiLambdaFunction/webiny.config.ts +8 -0
- package/_templates/extensions/OpenSearch/api/graphql/src/index.ts +90 -0
- package/_templates/extensions/OpenSearch/api/migration/src/index.ts +33 -0
- package/_templates/extensions/OpenSearch/coreDdbToEsHandler/dynamoToElastic/src/index.ts +15 -0
- package/_templates/extensions/OpenSearch/coreDdbToEsHandler/dynamoToElastic/tsconfig.json +7 -0
- package/_templates/extensions/OpenSearch/coreDdbToEsHandler/dynamoToElastic/webiny.config.ts +8 -0
- package/abstractions/ApiGqlClient.d.ts +23 -0
- package/abstractions/ApiGqlClient.js +4 -0
- package/abstractions/ApiGqlClient.js.map +1 -0
- package/abstractions/InvokeLambdaFunction.d.ts +18 -0
- package/abstractions/InvokeLambdaFunction.js +4 -0
- package/abstractions/InvokeLambdaFunction.js.map +1 -0
- package/abstractions/index.d.ts +5 -0
- package/abstractions/index.js +7 -0
- package/abstractions/index.js.map +1 -0
- package/abstractions/services/AdminStackOutputService.d.ts +13 -0
- package/abstractions/services/AdminStackOutputService.js +4 -0
- package/abstractions/services/AdminStackOutputService.js.map +1 -0
- package/abstractions/services/ApiStackOutputService.d.ts +30 -0
- package/abstractions/services/ApiStackOutputService.js +4 -0
- package/abstractions/services/ApiStackOutputService.js.map +1 -0
- package/abstractions/services/CoreStackOutputService.d.ts +16 -0
- package/abstractions/services/CoreStackOutputService.js +4 -0
- package/abstractions/services/CoreStackOutputService.js.map +1 -0
- package/admin.d.ts +22 -0
- package/admin.js +7 -0
- package/admin.js.map +1 -0
- package/api.d.ts +22 -0
- package/api.js +7 -0
- package/api.js.map +1 -0
- package/apps/createAdminApp.d.ts +15 -0
- package/apps/createAdminApp.js +15 -0
- package/apps/createAdminApp.js.map +1 -0
- package/apps/createAdminAppConfig.d.ts +2 -0
- package/apps/createAdminAppConfig.js +21 -0
- package/apps/createAdminAppConfig.js.map +1 -0
- package/apps/createApiApp.d.ts +65 -0
- package/apps/createApiApp.js +25 -0
- package/apps/createApiApp.js.map +1 -0
- package/apps/createBlueGreenApp.d.ts +24 -0
- package/apps/createBlueGreenApp.js +20 -0
- package/apps/createBlueGreenApp.js.map +1 -0
- package/apps/createCoreApp.d.ts +36 -0
- package/apps/createCoreApp.js +16 -0
- package/apps/createCoreApp.js.map +1 -0
- package/apps/createReactAppConfig.d.ts +53 -0
- package/apps/createReactAppConfig.js +79 -0
- package/apps/createReactAppConfig.js.map +1 -0
- package/apps/createSyncSystemApp.d.ts +21 -0
- package/apps/createSyncSystemApp.js +11 -0
- package/apps/createSyncSystemApp.js.map +1 -0
- package/apps/index.d.ts +7 -0
- package/apps/index.js +9 -0
- package/apps/index.js.map +1 -0
- package/cli.d.ts +9 -0
- package/cli.js +6 -0
- package/cli.js.map +1 -0
- package/exports/extensions.d.ts +5 -0
- package/exports/extensions.js +7 -0
- package/exports/extensions.js.map +1 -0
- package/exports/infra/admin.d.ts +1 -0
- package/exports/infra/admin.js +3 -0
- package/exports/infra/admin.js.map +1 -0
- package/exports/infra/api.d.ts +1 -0
- package/exports/infra/api.js +3 -0
- package/exports/infra/api.js.map +1 -0
- package/exports/infra/core.d.ts +1 -0
- package/exports/infra/core.js +3 -0
- package/exports/infra/core.js.map +1 -0
- package/exports/infra/index.d.ts +1 -0
- package/exports/infra/index.js +3 -0
- package/exports/infra/index.js.map +1 -0
- package/extensions/ApiLambdaFunction.d.ts +11 -0
- package/extensions/ApiLambdaFunction.js +68 -0
- package/extensions/ApiLambdaFunction.js.map +1 -0
- package/extensions/AwsDefaultRegion.d.ts +8 -0
- package/extensions/AwsDefaultRegion.js +22 -0
- package/extensions/AwsDefaultRegion.js.map +1 -0
- package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.d.ts +10 -0
- package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js +40 -0
- package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js.map +1 -0
- package/extensions/OpenSearch/EnsureOsWasDeployed.d.ts +11 -0
- package/extensions/OpenSearch/EnsureOsWasDeployed.js +34 -0
- package/extensions/OpenSearch/EnsureOsWasDeployed.js.map +1 -0
- package/extensions/OpenSearch/InjectDdbEsLambdaFnHandler.d.ts +12 -0
- package/extensions/OpenSearch/InjectDdbEsLambdaFnHandler.js +31 -0
- package/extensions/OpenSearch/InjectDdbEsLambdaFnHandler.js.map +1 -0
- package/extensions/OpenSearch/ReplaceApiLambdaFnHandlers.d.ts +12 -0
- package/extensions/OpenSearch/ReplaceApiLambdaFnHandlers.js +32 -0
- package/extensions/OpenSearch/ReplaceApiLambdaFnHandlers.js.map +1 -0
- package/extensions/OpenSearch.d.ts +17 -0
- package/extensions/OpenSearch.js +35 -0
- package/extensions/OpenSearch.js.map +1 -0
- package/extensions/ProjectAws/AdminStackOutputService.d.ts +1 -0
- package/extensions/ProjectAws/AdminStackOutputService.js +3 -0
- package/extensions/ProjectAws/AdminStackOutputService.js.map +1 -0
- package/extensions/ProjectAws/ApiStackOutputService.d.ts +1 -0
- package/extensions/ProjectAws/ApiStackOutputService.js +3 -0
- package/extensions/ProjectAws/ApiStackOutputService.js.map +1 -0
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.d.ts +17 -0
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js +108 -0
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js.map +1 -0
- package/extensions/ProjectAws/AutoInstall.d.ts +33 -0
- package/extensions/ProjectAws/AutoInstall.js +19 -0
- package/extensions/ProjectAws/AutoInstall.js.map +1 -0
- package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.d.ts +10 -0
- package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js +27 -0
- package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js.map +1 -0
- package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.d.ts +20 -0
- package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js +54 -0
- package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js.map +1 -0
- package/extensions/ProjectAws/BlueGreenDeployments/SetPrimaryVariantCliCommand.d.ts +18 -0
- package/extensions/ProjectAws/BlueGreenDeployments/SetPrimaryVariantCliCommand.js +60 -0
- package/extensions/ProjectAws/BlueGreenDeployments/SetPrimaryVariantCliCommand.js.map +1 -0
- package/extensions/ProjectAws/BuildAppWorkspace.d.ts +12 -0
- package/extensions/ProjectAws/BuildAppWorkspace.js +66 -0
- package/extensions/ProjectAws/BuildAppWorkspace.js.map +1 -0
- package/extensions/ProjectAws/CoreStackOutputService.d.ts +1 -0
- package/extensions/ProjectAws/CoreStackOutputService.js +3 -0
- package/extensions/ProjectAws/CoreStackOutputService.js.map +1 -0
- package/extensions/ProjectAws/ExecuteDataMigrations.d.ts +16 -0
- package/extensions/ProjectAws/ExecuteDataMigrations.js +69 -0
- package/extensions/ProjectAws/ExecuteDataMigrations.js.map +1 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.d.ts +13 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.js +43 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.js.map +1 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.d.ts +13 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js +24 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js.map +1 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.d.ts +13 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js +24 -0
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js.map +1 -0
- package/extensions/ProjectAws/SetDatabaseSetupOutput.d.ts +10 -0
- package/extensions/ProjectAws/SetDatabaseSetupOutput.js +29 -0
- package/extensions/ProjectAws/SetDatabaseSetupOutput.js.map +1 -0
- package/extensions/ProjectAws/UploadAdminAppToS3.d.ts +13 -0
- package/extensions/ProjectAws/UploadAdminAppToS3.js +69 -0
- package/extensions/ProjectAws/UploadAdminAppToS3.js.map +1 -0
- package/extensions/ProjectAws/definitions.d.ts +3 -0
- package/extensions/ProjectAws/definitions.js +9 -0
- package/extensions/ProjectAws/definitions.js.map +1 -0
- package/extensions/ProjectAws.d.ts +2 -0
- package/extensions/ProjectAws.js +52 -0
- package/extensions/ProjectAws.js.map +1 -0
- package/extensions/definitions.d.ts +3 -0
- package/extensions/definitions.js +6 -0
- package/extensions/definitions.js.map +1 -0
- package/extensions/index.d.ts +5 -0
- package/extensions/index.js +7 -0
- package/extensions/index.js.map +1 -0
- package/features/ApiGqlClient.d.ts +21 -0
- package/features/ApiGqlClient.js +59 -0
- package/features/ApiGqlClient.js.map +1 -0
- package/features/InvokeLambdaFunction.d.ts +10 -0
- package/features/InvokeLambdaFunction.js +38 -0
- package/features/InvokeLambdaFunction.js.map +1 -0
- package/features/index.d.ts +2 -0
- package/features/index.js +4 -0
- package/features/index.js.map +1 -0
- package/index.d.ts +6 -0
- package/index.js +8 -0
- package/index.js.map +1 -0
- package/infra.d.ts +425 -0
- package/infra.js +54 -0
- package/infra.js.map +1 -0
- package/package.json +60 -0
- package/project.d.ts +139 -0
- package/project.js +10 -0
- package/project.js.map +1 -0
- package/pulumi/apps/admin/createAdminPulumiApp.d.ts +12 -0
- package/pulumi/apps/admin/createAdminPulumiApp.js +52 -0
- package/pulumi/apps/admin/createAdminPulumiApp.js.map +1 -0
- package/pulumi/apps/admin/index.d.ts +1 -0
- package/pulumi/apps/admin/index.js +3 -0
- package/pulumi/apps/admin/index.js.map +1 -0
- package/pulumi/apps/api/ApiBackgroundTask.d.ts +12 -0
- package/pulumi/apps/api/ApiBackgroundTask.js +148 -0
- package/pulumi/apps/api/ApiBackgroundTask.js.map +1 -0
- package/pulumi/apps/api/ApiCloudfront.d.ts +3 -0
- package/pulumi/apps/api/ApiCloudfront.js +136 -0
- package/pulumi/apps/api/ApiCloudfront.js.map +1 -0
- package/pulumi/apps/api/ApiFileManager.d.ts +11 -0
- package/pulumi/apps/api/ApiFileManager.js +39 -0
- package/pulumi/apps/api/ApiFileManager.js.map +1 -0
- package/pulumi/apps/api/ApiGateway.d.ts +18 -0
- package/pulumi/apps/api/ApiGateway.js +80 -0
- package/pulumi/apps/api/ApiGateway.js.map +1 -0
- package/pulumi/apps/api/ApiGraphql.d.ts +22 -0
- package/pulumi/apps/api/ApiGraphql.js +164 -0
- package/pulumi/apps/api/ApiGraphql.js.map +1 -0
- package/pulumi/apps/api/ApiMigration.d.ts +5 -0
- package/pulumi/apps/api/ApiMigration.js +83 -0
- package/pulumi/apps/api/ApiMigration.js.map +1 -0
- package/pulumi/apps/api/ApiOutput.d.ts +23 -0
- package/pulumi/apps/api/ApiOutput.js +36 -0
- package/pulumi/apps/api/ApiOutput.js.map +1 -0
- package/pulumi/apps/api/ApiScheduler.d.ts +8 -0
- package/pulumi/apps/api/ApiScheduler.js +100 -0
- package/pulumi/apps/api/ApiScheduler.js.map +1 -0
- package/pulumi/apps/api/ApiWebsocket.d.ts +14 -0
- package/pulumi/apps/api/ApiWebsocket.js +138 -0
- package/pulumi/apps/api/ApiWebsocket.js.map +1 -0
- package/pulumi/apps/api/backgroundTask/definition.d.ts +7 -0
- package/pulumi/apps/api/backgroundTask/definition.js +149 -0
- package/pulumi/apps/api/backgroundTask/definition.js.map +1 -0
- package/pulumi/apps/api/backgroundTask/policy.d.ts +8 -0
- package/pulumi/apps/api/backgroundTask/policy.js +26 -0
- package/pulumi/apps/api/backgroundTask/policy.js.map +1 -0
- package/pulumi/apps/api/backgroundTask/role.d.ts +9 -0
- package/pulumi/apps/api/backgroundTask/role.js +32 -0
- package/pulumi/apps/api/backgroundTask/role.js.map +1 -0
- package/pulumi/apps/api/backgroundTask/types.d.ts +91 -0
- package/pulumi/apps/api/backgroundTask/types.js +14 -0
- package/pulumi/apps/api/backgroundTask/types.js.map +1 -0
- package/pulumi/apps/api/createApiPulumiApp.d.ts +57 -0
- package/pulumi/apps/api/createApiPulumiApp.js +281 -0
- package/pulumi/apps/api/createApiPulumiApp.js.map +1 -0
- package/pulumi/apps/api/handleGuardDutyEvents.d.ts +2 -0
- package/pulumi/apps/api/handleGuardDutyEvents.js +55 -0
- package/pulumi/apps/api/handleGuardDutyEvents.js.map +1 -0
- package/pulumi/apps/api/index.d.ts +9 -0
- package/pulumi/apps/api/index.js +11 -0
- package/pulumi/apps/api/index.js.map +1 -0
- package/pulumi/apps/awsUtils.d.ts +5 -0
- package/pulumi/apps/awsUtils.js +34 -0
- package/pulumi/apps/awsUtils.js.map +1 -0
- package/pulumi/apps/blueGreen/BlueGreenRouterApiGateway.d.ts +11 -0
- package/pulumi/apps/blueGreen/BlueGreenRouterApiGateway.js +44 -0
- package/pulumi/apps/blueGreen/BlueGreenRouterApiGateway.js.map +1 -0
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFront.d.ts +17 -0
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFront.js +100 -0
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFront.js.map +1 -0
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFrontStore.d.ts +10 -0
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFrontStore.js +20 -0
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFrontStore.js.map +1 -0
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontDefaultCacheBehaviorPolicies.d.ts +7 -0
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontDefaultCacheBehaviorPolicies.js +15 -0
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontDefaultCacheBehaviorPolicies.js.map +1 -0
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontFunctionDomainMap.d.ts +14 -0
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontFunctionDomainMap.js +23 -0
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontFunctionDomainMap.js.map +1 -0
- package/pulumi/apps/blueGreen/cloudfront/createOriginId.d.ts +11 -0
- package/pulumi/apps/blueGreen/cloudfront/createOriginId.js +10 -0
- package/pulumi/apps/blueGreen/cloudfront/createOriginId.js.map +1 -0
- package/pulumi/apps/blueGreen/constants.d.ts +3 -0
- package/pulumi/apps/blueGreen/constants.js +5 -0
- package/pulumi/apps/blueGreen/constants.js.map +1 -0
- package/pulumi/apps/blueGreen/createBlueGreenPulumiApp.d.ts +15 -0
- package/pulumi/apps/blueGreen/createBlueGreenPulumiApp.js +122 -0
- package/pulumi/apps/blueGreen/createBlueGreenPulumiApp.js.map +1 -0
- package/pulumi/apps/blueGreen/domains/attachDomainsToOutput.d.ts +9 -0
- package/pulumi/apps/blueGreen/domains/attachDomainsToOutput.js +30 -0
- package/pulumi/apps/blueGreen/domains/attachDomainsToOutput.js.map +1 -0
- package/pulumi/apps/blueGreen/domains/convertApplicationDomains.d.ts +6 -0
- package/pulumi/apps/blueGreen/domains/convertApplicationDomains.js +23 -0
- package/pulumi/apps/blueGreen/domains/convertApplicationDomains.js.map +1 -0
- package/pulumi/apps/blueGreen/domains/getApplicationDomains.d.ts +18 -0
- package/pulumi/apps/blueGreen/domains/getApplicationDomains.js +73 -0
- package/pulumi/apps/blueGreen/domains/getApplicationDomains.js.map +1 -0
- package/pulumi/apps/blueGreen/domains/resolveDomains.d.ts +6 -0
- package/pulumi/apps/blueGreen/domains/resolveDomains.js +41 -0
- package/pulumi/apps/blueGreen/domains/resolveDomains.js.map +1 -0
- package/pulumi/apps/blueGreen/functions/buildHandlerFunction.d.ts +15 -0
- package/pulumi/apps/blueGreen/functions/buildHandlerFunction.js +18 -0
- package/pulumi/apps/blueGreen/functions/buildHandlerFunction.js.map +1 -0
- package/pulumi/apps/blueGreen/functions/handler.d.ts +1 -0
- package/pulumi/apps/blueGreen/functions/handler.js +60 -0
- package/pulumi/apps/blueGreen/functions/handler.js.map +1 -0
- package/pulumi/apps/blueGreen/types.d.ts +77 -0
- package/pulumi/apps/blueGreen/types.js +3 -0
- package/pulumi/apps/blueGreen/types.js.map +1 -0
- package/pulumi/apps/blueGreen/validation/validateDeployments.d.ts +2 -0
- package/pulumi/apps/blueGreen/validation/validateDeployments.js +33 -0
- package/pulumi/apps/blueGreen/validation/validateDeployments.js.map +1 -0
- package/pulumi/apps/common/CoreOutput.d.ts +38 -0
- package/pulumi/apps/common/CoreOutput.js +46 -0
- package/pulumi/apps/common/CoreOutput.js.map +1 -0
- package/pulumi/apps/common/VpcConfig.d.ts +8 -0
- package/pulumi/apps/common/VpcConfig.js +25 -0
- package/pulumi/apps/common/VpcConfig.js.map +1 -0
- package/pulumi/apps/common/index.d.ts +2 -0
- package/pulumi/apps/common/index.js +4 -0
- package/pulumi/apps/common/index.js.map +1 -0
- package/pulumi/apps/core/CoreAuditLogsDynamo.d.ts +5 -0
- package/pulumi/apps/core/CoreAuditLogsDynamo.js +186 -0
- package/pulumi/apps/core/CoreAuditLogsDynamo.js.map +1 -0
- package/pulumi/apps/core/CoreCognito.d.ts +10 -0
- package/pulumi/apps/core/CoreCognito.js +110 -0
- package/pulumi/apps/core/CoreCognito.js.map +1 -0
- package/pulumi/apps/core/CoreDynamo.d.ts +5 -0
- package/pulumi/apps/core/CoreDynamo.js +74 -0
- package/pulumi/apps/core/CoreDynamo.js.map +1 -0
- package/pulumi/apps/core/CoreEventBus.d.ts +1 -0
- package/pulumi/apps/core/CoreEventBus.js +13 -0
- package/pulumi/apps/core/CoreEventBus.js.map +1 -0
- package/pulumi/apps/core/CoreFileManager.d.ts +11 -0
- package/pulumi/apps/core/CoreFileManager.js +72 -0
- package/pulumi/apps/core/CoreFileManager.js.map +1 -0
- package/pulumi/apps/core/CoreOpenSearch.d.ts +16 -0
- package/pulumi/apps/core/CoreOpenSearch.js +299 -0
- package/pulumi/apps/core/CoreOpenSearch.js.map +1 -0
- package/pulumi/apps/core/CoreVpc.d.ts +13 -0
- package/pulumi/apps/core/CoreVpc.js +160 -0
- package/pulumi/apps/core/CoreVpc.js.map +1 -0
- package/pulumi/apps/core/LogDynamo.d.ts +5 -0
- package/pulumi/apps/core/LogDynamo.js +122 -0
- package/pulumi/apps/core/LogDynamo.js.map +1 -0
- package/pulumi/apps/core/WatchCommand.d.ts +7 -0
- package/pulumi/apps/core/WatchCommand.js +105 -0
- package/pulumi/apps/core/WatchCommand.js.map +1 -0
- package/pulumi/apps/core/cognitoIdentityProviders/amazon.d.ts +9 -0
- package/pulumi/apps/core/cognitoIdentityProviders/amazon.js +24 -0
- package/pulumi/apps/core/cognitoIdentityProviders/amazon.js.map +1 -0
- package/pulumi/apps/core/cognitoIdentityProviders/apple.d.ts +4 -0
- package/pulumi/apps/core/cognitoIdentityProviders/apple.js +19 -0
- package/pulumi/apps/core/cognitoIdentityProviders/apple.js.map +1 -0
- package/pulumi/apps/core/cognitoIdentityProviders/configure.d.ts +28 -0
- package/pulumi/apps/core/cognitoIdentityProviders/configure.js +57 -0
- package/pulumi/apps/core/cognitoIdentityProviders/configure.js.map +1 -0
- package/pulumi/apps/core/cognitoIdentityProviders/facebook.d.ts +4 -0
- package/pulumi/apps/core/cognitoIdentityProviders/facebook.js +19 -0
- package/pulumi/apps/core/cognitoIdentityProviders/facebook.js.map +1 -0
- package/pulumi/apps/core/cognitoIdentityProviders/getIdpConfig.d.ts +3 -0
- package/pulumi/apps/core/cognitoIdentityProviders/getIdpConfig.js +17 -0
- package/pulumi/apps/core/cognitoIdentityProviders/getIdpConfig.js.map +1 -0
- package/pulumi/apps/core/cognitoIdentityProviders/google.d.ts +4 -0
- package/pulumi/apps/core/cognitoIdentityProviders/google.js +19 -0
- package/pulumi/apps/core/cognitoIdentityProviders/google.js.map +1 -0
- package/pulumi/apps/core/cognitoIdentityProviders/index.d.ts +1 -0
- package/pulumi/apps/core/cognitoIdentityProviders/index.js +3 -0
- package/pulumi/apps/core/cognitoIdentityProviders/index.js.map +1 -0
- package/pulumi/apps/core/cognitoIdentityProviders/oidc.d.ts +4 -0
- package/pulumi/apps/core/cognitoIdentityProviders/oidc.js +20 -0
- package/pulumi/apps/core/cognitoIdentityProviders/oidc.js.map +1 -0
- package/pulumi/apps/core/configureS3BucketMalwareProtection.d.ts +2 -0
- package/pulumi/apps/core/configureS3BucketMalwareProtection.js +195 -0
- package/pulumi/apps/core/configureS3BucketMalwareProtection.js.map +1 -0
- package/pulumi/apps/core/createCorePulumiApp.d.ts +32 -0
- package/pulumi/apps/core/createCorePulumiApp.js +295 -0
- package/pulumi/apps/core/createCorePulumiApp.js.map +1 -0
- package/pulumi/apps/core/index.d.ts +8 -0
- package/pulumi/apps/core/index.js +10 -0
- package/pulumi/apps/core/index.js.map +1 -0
- package/pulumi/apps/core/webinyWatchCommand/handler.d.ts +28 -0
- package/pulumi/apps/core/webinyWatchCommand/handler.js +37 -0
- package/pulumi/apps/core/webinyWatchCommand/handler.js.map +1 -0
- package/pulumi/apps/createAppBucket.d.ts +17 -0
- package/pulumi/apps/createAppBucket.js +152 -0
- package/pulumi/apps/createAppBucket.js.map +1 -0
- package/pulumi/apps/customDomain.d.ts +9 -0
- package/pulumi/apps/customDomain.js +9 -0
- package/pulumi/apps/customDomain.js.map +1 -0
- package/pulumi/apps/extensions/getAwsTagsFromExtension.d.ts +2 -0
- package/pulumi/apps/extensions/getAwsTagsFromExtension.js +10 -0
- package/pulumi/apps/extensions/getAwsTagsFromExtension.js.map +1 -0
- package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.d.ts +23 -0
- package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.js +10 -0
- package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.js.map +1 -0
- package/pulumi/apps/extensions/getOsConfigFromExtension.d.ts +7 -0
- package/pulumi/apps/extensions/getOsConfigFromExtension.js +33 -0
- package/pulumi/apps/extensions/getOsConfigFromExtension.js.map +1 -0
- package/pulumi/apps/extensions/getVpcConfigFromExtension.d.ts +15 -0
- package/pulumi/apps/extensions/getVpcConfigFromExtension.js +29 -0
- package/pulumi/apps/extensions/getVpcConfigFromExtension.js.map +1 -0
- package/pulumi/apps/index.d.ts +6 -0
- package/pulumi/apps/index.js +8 -0
- package/pulumi/apps/index.js.map +1 -0
- package/pulumi/apps/lambdaUtils.d.ts +11 -0
- package/pulumi/apps/lambdaUtils.js +70 -0
- package/pulumi/apps/lambdaUtils.js.map +1 -0
- package/pulumi/apps/react/createReactPulumiApp.d.ts +32 -0
- package/pulumi/apps/react/createReactPulumiApp.js +150 -0
- package/pulumi/apps/react/createReactPulumiApp.js.map +1 -0
- package/pulumi/apps/react/index.d.ts +1 -0
- package/pulumi/apps/react/index.js +3 -0
- package/pulumi/apps/react/index.js.map +1 -0
- package/pulumi/apps/syncSystem/SyncSystemDynamo.d.ts +5 -0
- package/pulumi/apps/syncSystem/SyncSystemDynamo.js +56 -0
- package/pulumi/apps/syncSystem/SyncSystemDynamo.js.map +1 -0
- package/pulumi/apps/syncSystem/SyncSystemDynamoDb.d.ts +3 -0
- package/pulumi/apps/syncSystem/SyncSystemDynamoDb.js +52 -0
- package/pulumi/apps/syncSystem/SyncSystemDynamoDb.js.map +1 -0
- package/pulumi/apps/syncSystem/SyncSystemEventBus.d.ts +6 -0
- package/pulumi/apps/syncSystem/SyncSystemEventBus.js +77 -0
- package/pulumi/apps/syncSystem/SyncSystemEventBus.js.map +1 -0
- package/pulumi/apps/syncSystem/SyncSystemLambda.d.ts +11 -0
- package/pulumi/apps/syncSystem/SyncSystemLambda.js +99 -0
- package/pulumi/apps/syncSystem/SyncSystemLambda.js.map +1 -0
- package/pulumi/apps/syncSystem/SyncSystemOutput.d.ts +3 -0
- package/pulumi/apps/syncSystem/SyncSystemOutput.js +18 -0
- package/pulumi/apps/syncSystem/SyncSystemOutput.js.map +1 -0
- package/pulumi/apps/syncSystem/SyncSystemResolverLambda.d.ts +8 -0
- package/pulumi/apps/syncSystem/SyncSystemResolverLambda.js +73 -0
- package/pulumi/apps/syncSystem/SyncSystemResolverLambda.js.map +1 -0
- package/pulumi/apps/syncSystem/SyncSystemSQS.d.ts +3 -0
- package/pulumi/apps/syncSystem/SyncSystemSQS.js +54 -0
- package/pulumi/apps/syncSystem/SyncSystemSQS.js.map +1 -0
- package/pulumi/apps/syncSystem/SyncSystemWorkerLambda.d.ts +7 -0
- package/pulumi/apps/syncSystem/SyncSystemWorkerLambda.js +52 -0
- package/pulumi/apps/syncSystem/SyncSystemWorkerLambda.js.map +1 -0
- package/pulumi/apps/syncSystem/addTableItems.d.ts +8 -0
- package/pulumi/apps/syncSystem/addTableItems.js +51 -0
- package/pulumi/apps/syncSystem/addTableItems.js.map +1 -0
- package/pulumi/apps/syncSystem/api/addServiceManifest.d.ts +8 -0
- package/pulumi/apps/syncSystem/api/addServiceManifest.js +18 -0
- package/pulumi/apps/syncSystem/api/addServiceManifest.js.map +1 -0
- package/pulumi/apps/syncSystem/api/attachCognitoPermissions.d.ts +14 -0
- package/pulumi/apps/syncSystem/api/attachCognitoPermissions.js +59 -0
- package/pulumi/apps/syncSystem/api/attachCognitoPermissions.js.map +1 -0
- package/pulumi/apps/syncSystem/api/attachDynamoDbPermissions.d.ts +13 -0
- package/pulumi/apps/syncSystem/api/attachDynamoDbPermissions.js +44 -0
- package/pulumi/apps/syncSystem/api/attachDynamoDbPermissions.js.map +1 -0
- package/pulumi/apps/syncSystem/api/attachEventBusPermissions.d.ts +17 -0
- package/pulumi/apps/syncSystem/api/attachEventBusPermissions.js +48 -0
- package/pulumi/apps/syncSystem/api/attachEventBusPermissions.js.map +1 -0
- package/pulumi/apps/syncSystem/api/attachS3Permissions.d.ts +14 -0
- package/pulumi/apps/syncSystem/api/attachS3Permissions.js +51 -0
- package/pulumi/apps/syncSystem/api/attachS3Permissions.js.map +1 -0
- package/pulumi/apps/syncSystem/api/index.d.ts +8 -0
- package/pulumi/apps/syncSystem/api/index.js +55 -0
- package/pulumi/apps/syncSystem/api/index.js.map +1 -0
- package/pulumi/apps/syncSystem/constants.d.ts +1 -0
- package/pulumi/apps/syncSystem/constants.js +3 -0
- package/pulumi/apps/syncSystem/constants.js.map +1 -0
- package/pulumi/apps/syncSystem/createSyncResourceName.d.ts +4 -0
- package/pulumi/apps/syncSystem/createSyncResourceName.js +10 -0
- package/pulumi/apps/syncSystem/createSyncResourceName.js.map +1 -0
- package/pulumi/apps/syncSystem/createSyncSystemPulumiApp.d.ts +26 -0
- package/pulumi/apps/syncSystem/createSyncSystemPulumiApp.js +181 -0
- package/pulumi/apps/syncSystem/createSyncSystemPulumiApp.js.map +1 -0
- package/pulumi/apps/syncSystem/customApp.d.ts +6 -0
- package/pulumi/apps/syncSystem/customApp.js +19 -0
- package/pulumi/apps/syncSystem/customApp.js.map +1 -0
- package/pulumi/apps/syncSystem/getSyncSystemOutput.d.ts +3 -0
- package/pulumi/apps/syncSystem/getSyncSystemOutput.js +10 -0
- package/pulumi/apps/syncSystem/getSyncSystemOutput.js.map +1 -0
- package/pulumi/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.d.ts +7 -0
- package/pulumi/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.js +48 -0
- package/pulumi/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.js.map +1 -0
- package/pulumi/apps/syncSystem/types.d.ts +56 -0
- package/pulumi/apps/syncSystem/types.js +3 -0
- package/pulumi/apps/syncSystem/types.js.map +1 -0
- package/pulumi/constants.d.ts +1 -0
- package/pulumi/constants.js +4 -0
- package/pulumi/constants.js.map +1 -0
- package/pulumi/env/awsRegion.d.ts +1 -0
- package/pulumi/env/awsRegion.js +6 -0
- package/pulumi/env/awsRegion.js.map +1 -0
- package/pulumi/env/base.d.ts +15 -0
- package/pulumi/env/base.js +29 -0
- package/pulumi/env/base.js.map +1 -0
- package/pulumi/env/env.d.ts +1 -0
- package/pulumi/env/env.js +6 -0
- package/pulumi/env/env.js.map +1 -0
- package/pulumi/env/projectName.d.ts +1 -0
- package/pulumi/env/projectName.js +6 -0
- package/pulumi/env/projectName.js.map +1 -0
- package/pulumi/env/variant.d.ts +1 -0
- package/pulumi/env/variant.js +7 -0
- package/pulumi/env/variant.js.map +1 -0
- package/pulumi/extensions/AdminCustomDomains.d.ts +14 -0
- package/pulumi/extensions/AdminCustomDomains.js +16 -0
- package/pulumi/extensions/AdminCustomDomains.js.map +1 -0
- package/pulumi/extensions/AwsTags.d.ts +8 -0
- package/pulumi/extensions/AwsTags.js +15 -0
- package/pulumi/extensions/AwsTags.js.map +1 -0
- package/pulumi/extensions/BlueGreenDeployments.d.ts +134 -0
- package/pulumi/extensions/BlueGreenDeployments.js +34 -0
- package/pulumi/extensions/BlueGreenDeployments.js.map +1 -0
- package/pulumi/extensions/OpenSearch.d.ts +17 -0
- package/pulumi/extensions/OpenSearch.js +17 -0
- package/pulumi/extensions/OpenSearch.js.map +1 -0
- package/pulumi/extensions/Vpc.d.ts +71 -0
- package/pulumi/extensions/Vpc.js +25 -0
- package/pulumi/extensions/Vpc.js.map +1 -0
- package/pulumi/extensions/index.d.ts +220 -0
- package/pulumi/extensions/index.js +13 -0
- package/pulumi/extensions/index.js.map +1 -0
- package/pulumi/index.d.ts +3 -0
- package/pulumi/index.js +5 -0
- package/pulumi/index.js.map +1 -0
- package/pulumi/types.d.ts +44 -0
- package/pulumi/types.js +3 -0
- package/pulumi/types.js.map +1 -0
- package/pulumi/utils/addDomainsUrlsOutputs.d.ts +18 -0
- package/pulumi/utils/addDomainsUrlsOutputs.js +40 -0
- package/pulumi/utils/addDomainsUrlsOutputs.js.map +1 -0
- package/pulumi/utils/addServiceManifestTableItem.d.ts +12 -0
- package/pulumi/utils/addServiceManifestTableItem.js +28 -0
- package/pulumi/utils/addServiceManifestTableItem.js.map +1 -0
- package/pulumi/utils/crawlDirectory.d.ts +1 -0
- package/pulumi/utils/crawlDirectory.js +19 -0
- package/pulumi/utils/crawlDirectory.js.map +1 -0
- package/pulumi/utils/createAssetArchive.d.ts +2 -0
- package/pulumi/utils/createAssetArchive.js +8 -0
- package/pulumi/utils/createAssetArchive.js.map +1 -0
- package/pulumi/utils/dynamodb.d.ts +14 -0
- package/pulumi/utils/dynamodb.js +29 -0
- package/pulumi/utils/dynamodb.js.map +1 -0
- package/pulumi/utils/getPresignedPost.d.ts +11 -0
- package/pulumi/utils/getPresignedPost.js +34 -0
- package/pulumi/utils/getPresignedPost.js.map +1 -0
- package/pulumi/utils/index.d.ts +5 -0
- package/pulumi/utils/index.js +7 -0
- package/pulumi/utils/index.js.map +1 -0
- package/pulumi/utils/lambdaEnvVariables.d.ts +20 -0
- package/pulumi/utils/lambdaEnvVariables.js +62 -0
- package/pulumi/utils/lambdaEnvVariables.js.map +1 -0
- package/pulumi/utils/tagResources.d.ts +5 -0
- package/pulumi/utils/tagResources.js +33 -0
- package/pulumi/utils/tagResources.js.map +1 -0
- package/pulumi/utils/uploadFolderToS3.d.ts +26 -0
- package/pulumi/utils/uploadFolderToS3.js +147 -0
- package/pulumi/utils/uploadFolderToS3.js.map +1 -0
- package/pulumi/utils/withServiceManifest.d.ts +14 -0
- package/pulumi/utils/withServiceManifest.js +45 -0
- package/pulumi/utils/withServiceManifest.js.map +1 -0
- package/services/AdminStackOutputService.d.ts +10 -0
- package/services/AdminStackOutputService.js +16 -0
- package/services/AdminStackOutputService.js.map +1 -0
- package/services/ApiStackOutputService.d.ts +10 -0
- package/services/ApiStackOutputService.js +16 -0
- package/services/ApiStackOutputService.js.map +1 -0
- package/services/CoreStackOutputService.d.ts +10 -0
- package/services/CoreStackOutputService.js +16 -0
- package/services/CoreStackOutputService.js.map +1 -0
- package/utils/getTemplatesFolderPath.d.ts +1 -0
- package/utils/getTemplatesFolderPath.js +16 -0
- package/utils/getTemplatesFolderPath.js.map +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +3 -0
- package/utils/index.js.map +1 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as aws from "@pulumi/aws";
|
|
2
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
3
|
+
import { createPulumiApp } from "@webiny/pulumi";
|
|
4
|
+
import { addDomainsUrlsOutputs } from "../../utils/index.js";
|
|
5
|
+
import { createPrivateAppBucket } from "../createAppBucket.js";
|
|
6
|
+
import { applyCustomDomain } from "../customDomain.js";
|
|
7
|
+
import { withServiceManifest } from "../../utils/withServiceManifest.js";
|
|
8
|
+
import { ApiOutput, CoreOutput } from "../index.js";
|
|
9
|
+
import { getProjectSdk } from "@webiny/project";
|
|
10
|
+
import { applyAwsResourceTags } from "../awsUtils.js";
|
|
11
|
+
export const createReactPulumiApp = projectAppParams => {
|
|
12
|
+
const app = createPulumiApp({
|
|
13
|
+
name: projectAppParams.name,
|
|
14
|
+
path: projectAppParams.folder,
|
|
15
|
+
config: projectAppParams,
|
|
16
|
+
program: async app => {
|
|
17
|
+
const sdk = await getProjectSdk();
|
|
18
|
+
const pulumiResourceNamePrefix = await sdk.getPulumiResourceNamePrefix();
|
|
19
|
+
if (pulumiResourceNamePrefix) {
|
|
20
|
+
app.onResource(resource => {
|
|
21
|
+
if (!resource.name.startsWith(pulumiResourceNamePrefix)) {
|
|
22
|
+
resource.name = `${pulumiResourceNamePrefix}${resource.name}`;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const {
|
|
27
|
+
name
|
|
28
|
+
} = projectAppParams;
|
|
29
|
+
|
|
30
|
+
// Register core output as a module available for all other modules
|
|
31
|
+
const core = app.addModule(CoreOutput);
|
|
32
|
+
app.addModule(ApiOutput);
|
|
33
|
+
|
|
34
|
+
// Overrides must be applied via a handler, registered at the very start of the program.
|
|
35
|
+
// By doing this, we're ensuring user's adjustments are not applied to late.
|
|
36
|
+
if (projectAppParams.pulumi) {
|
|
37
|
+
app.addHandler(() => {
|
|
38
|
+
return projectAppParams.pulumi(app);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const bucket = createPrivateAppBucket(app, `${name}-app`);
|
|
42
|
+
const cloudfront = app.addResource(aws.cloudfront.Distribution, {
|
|
43
|
+
name: `${name}-app-cdn`,
|
|
44
|
+
config: {
|
|
45
|
+
httpVersion: "http2and3",
|
|
46
|
+
enabled: true,
|
|
47
|
+
waitForDeployment: true,
|
|
48
|
+
origins: [bucket.origin],
|
|
49
|
+
defaultRootObject: "index.html",
|
|
50
|
+
defaultCacheBehavior: {
|
|
51
|
+
compress: true,
|
|
52
|
+
targetOriginId: bucket.origin.originId,
|
|
53
|
+
viewerProtocolPolicy: "redirect-to-https",
|
|
54
|
+
allowedMethods: ["GET", "HEAD", "OPTIONS"],
|
|
55
|
+
cachedMethods: ["GET", "HEAD", "OPTIONS"],
|
|
56
|
+
forwardedValues: {
|
|
57
|
+
cookies: {
|
|
58
|
+
forward: "none"
|
|
59
|
+
},
|
|
60
|
+
queryString: false
|
|
61
|
+
},
|
|
62
|
+
// MinTTL <= DefaultTTL <= MaxTTL
|
|
63
|
+
minTtl: 0,
|
|
64
|
+
defaultTtl: 600,
|
|
65
|
+
maxTtl: 600
|
|
66
|
+
},
|
|
67
|
+
priceClass: "PriceClass_100",
|
|
68
|
+
customErrorResponses: [{
|
|
69
|
+
errorCode: 404,
|
|
70
|
+
responseCode: 404,
|
|
71
|
+
responsePagePath: "/index.html"
|
|
72
|
+
}],
|
|
73
|
+
restrictions: {
|
|
74
|
+
geoRestriction: {
|
|
75
|
+
restrictionType: "none"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
viewerCertificate: {
|
|
79
|
+
cloudfrontDefaultCertificate: true
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
opts: {
|
|
83
|
+
// We are ignoring changes to the "staging" property. This is because of the following.
|
|
84
|
+
// With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change
|
|
85
|
+
// with how Cloudfront distributions are deployed, where Pulumi now also controls the new
|
|
86
|
+
// `staging` property.
|
|
87
|
+
// If not set, Pulumi will default it to `false`. Which is fine, but, the problem is
|
|
88
|
+
// that, because this property did not exist before, it will always be considered as a change
|
|
89
|
+
// upon deployment.
|
|
90
|
+
// We might think this is fine, but, the problem is that a change in this property causes
|
|
91
|
+
// a full replacement of the Cloudfront distribution, which is not acceptable. Especially
|
|
92
|
+
// if a custom domain has already been associated with the distribution. This then would
|
|
93
|
+
// require the user to disassociate the domain, wait for the distribution to be replaced,
|
|
94
|
+
// and then re-associate the domain. This is not a good experience.
|
|
95
|
+
ignoreChanges: ["staging"]
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const domains = app.getParam(projectAppParams.domains);
|
|
99
|
+
if (domains) {
|
|
100
|
+
applyCustomDomain(cloudfront, domains);
|
|
101
|
+
}
|
|
102
|
+
app.addOutput("appStorage", bucket.bucket.output.id);
|
|
103
|
+
app.addHandler(() => {
|
|
104
|
+
addDomainsUrlsOutputs({
|
|
105
|
+
app,
|
|
106
|
+
cloudfrontDistribution: cloudfront,
|
|
107
|
+
map: {
|
|
108
|
+
distributionDomain: "cloudfrontAppDomain",
|
|
109
|
+
distributionUrl: "cloudfrontAppUrl",
|
|
110
|
+
usedDomain: "appDomain",
|
|
111
|
+
usedUrl: "appUrl"
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// Applies internal and user-defined AWS tags.
|
|
117
|
+
await applyAwsResourceTags(name);
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* We need to store the appUrl to the admin settings item in the dynamodb
|
|
121
|
+
*/
|
|
122
|
+
app.addResource(aws.dynamodb.TableItem, {
|
|
123
|
+
name: "adminSettings",
|
|
124
|
+
config: {
|
|
125
|
+
tableName: core.primaryDynamodbTableName,
|
|
126
|
+
hashKey: core.primaryDynamodbTableHashKey,
|
|
127
|
+
rangeKey: pulumi.output(core.primaryDynamodbTableRangeKey).apply(key => key || "SK"),
|
|
128
|
+
item: pulumi.interpolate`{
|
|
129
|
+
"PK": {"S": "ADMIN#SETTINGS"},
|
|
130
|
+
"SK": {"S": "default"},
|
|
131
|
+
"data": {
|
|
132
|
+
"M": {
|
|
133
|
+
"appUrl": {
|
|
134
|
+
"S": "${cloudfront.output.domainName.apply(value => `https://${value}`)}"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}`
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
return {
|
|
142
|
+
...bucket,
|
|
143
|
+
cloudfront
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
return withServiceManifest(app);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
//# sourceMappingURL=createReactPulumiApp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["aws","pulumi","createPulumiApp","addDomainsUrlsOutputs","createPrivateAppBucket","applyCustomDomain","withServiceManifest","ApiOutput","CoreOutput","getProjectSdk","applyAwsResourceTags","createReactPulumiApp","projectAppParams","app","name","path","folder","config","program","sdk","pulumiResourceNamePrefix","getPulumiResourceNamePrefix","onResource","resource","startsWith","core","addModule","addHandler","bucket","cloudfront","addResource","Distribution","httpVersion","enabled","waitForDeployment","origins","origin","defaultRootObject","defaultCacheBehavior","compress","targetOriginId","originId","viewerProtocolPolicy","allowedMethods","cachedMethods","forwardedValues","cookies","forward","queryString","minTtl","defaultTtl","maxTtl","priceClass","customErrorResponses","errorCode","responseCode","responsePagePath","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate","opts","ignoreChanges","domains","getParam","addOutput","output","id","cloudfrontDistribution","map","distributionDomain","distributionUrl","usedDomain","usedUrl","dynamodb","TableItem","tableName","primaryDynamodbTableName","hashKey","primaryDynamodbTableHashKey","rangeKey","primaryDynamodbTableRangeKey","apply","key","item","interpolate","domainName","value"],"sources":["createReactPulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport { createPulumiApp, type PulumiAppParamCallback } from \"@webiny/pulumi\";\nimport { addDomainsUrlsOutputs } from \"~/pulumi/utils/index.js\";\nimport { createPrivateAppBucket } from \"../createAppBucket.js\";\nimport { applyCustomDomain, type CustomDomainParams } from \"../customDomain.js\";\nimport { withServiceManifest } from \"~/pulumi/utils/withServiceManifest.js\";\nimport { ApiOutput, CoreOutput } from \"~/pulumi/apps/index.js\";\nimport { type AppName, getProjectSdk } from \"@webiny/project\";\nimport { applyAwsResourceTags } from \"~/pulumi/apps/awsUtils.js\";\n\nexport type ReactPulumiApp = ReturnType<typeof createReactPulumiApp>;\n\nexport interface CreateReactPulumiAppParams {\n /**\n * A name of the app, e.g., \"user-area\"\n */\n name: AppName;\n\n /**\n * A folder where the app is located, e.g., \"apps/user-area\"\n */\n folder: string;\n\n /** Custom domain configuration */\n domains?: PulumiAppParamCallback<CustomDomainParams>;\n\n /**\n * Provides a way to adjust existing Pulumi code (cloud infrastructure resources)\n * or add additional ones into the mix.\n */\n pulumi?: (app: ReactPulumiApp) => void | Promise<void>;\n}\n\nexport const createReactPulumiApp = (projectAppParams: CreateReactPulumiAppParams) => {\n const app = createPulumiApp({\n name: projectAppParams.name,\n path: projectAppParams.folder,\n config: projectAppParams,\n program: async app => {\n const sdk = await getProjectSdk();\n\n const pulumiResourceNamePrefix = await sdk.getPulumiResourceNamePrefix();\n\n if (pulumiResourceNamePrefix) {\n app.onResource(resource => {\n if (!resource.name.startsWith(pulumiResourceNamePrefix)) {\n resource.name = `${pulumiResourceNamePrefix}${resource.name}`;\n }\n });\n }\n\n const { name } = projectAppParams;\n\n // Register core output as a module available for all other modules\n const core = app.addModule(CoreOutput);\n app.addModule(ApiOutput);\n\n // Overrides must be applied via a handler, registered at the very start of the program.\n // By doing this, we're ensuring user's adjustments are not applied to late.\n if (projectAppParams.pulumi) {\n app.addHandler(() => {\n return projectAppParams.pulumi!(app as unknown as ReactPulumiApp);\n });\n }\n\n const bucket = createPrivateAppBucket(app, `${name}-app`);\n\n const cloudfront = app.addResource(aws.cloudfront.Distribution, {\n name: `${name}-app-cdn`,\n config: {\n httpVersion: \"http2and3\",\n enabled: true,\n waitForDeployment: true,\n origins: [bucket.origin],\n defaultRootObject: \"index.html\",\n defaultCacheBehavior: {\n compress: true,\n targetOriginId: bucket.origin.originId,\n viewerProtocolPolicy: \"redirect-to-https\",\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: { forward: \"none\" },\n queryString: false\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 600,\n maxTtl: 600\n },\n priceClass: \"PriceClass_100\",\n customErrorResponses: [\n { errorCode: 404, responseCode: 404, responsePagePath: \"/index.html\" }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n },\n opts: {\n // We are ignoring changes to the \"staging\" property. This is because of the following.\n // With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change\n // with how Cloudfront distributions are deployed, where Pulumi now also controls the new\n // `staging` property.\n // If not set, Pulumi will default it to `false`. Which is fine, but, the problem is\n // that, because this property did not exist before, it will always be considered as a change\n // upon deployment.\n // We might think this is fine, but, the problem is that a change in this property causes\n // a full replacement of the Cloudfront distribution, which is not acceptable. Especially\n // if a custom domain has already been associated with the distribution. This then would\n // require the user to disassociate the domain, wait for the distribution to be replaced,\n // and then re-associate the domain. This is not a good experience.\n ignoreChanges: [\"staging\"]\n }\n });\n\n const domains = app.getParam(projectAppParams.domains);\n if (domains) {\n applyCustomDomain(cloudfront, domains);\n }\n\n app.addOutput(\"appStorage\", bucket.bucket.output.id);\n\n app.addHandler(() => {\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: cloudfront,\n map: {\n distributionDomain: \"cloudfrontAppDomain\",\n distributionUrl: \"cloudfrontAppUrl\",\n usedDomain: \"appDomain\",\n usedUrl: \"appUrl\"\n }\n });\n });\n\n // Applies internal and user-defined AWS tags.\n await applyAwsResourceTags(name);\n\n /**\n * We need to store the appUrl to the admin settings item in the dynamodb\n */\n app.addResource(aws.dynamodb.TableItem, {\n name: \"adminSettings\",\n config: {\n tableName: core.primaryDynamodbTableName,\n hashKey: core.primaryDynamodbTableHashKey,\n rangeKey: pulumi\n .output(core.primaryDynamodbTableRangeKey)\n .apply(key => key || \"SK\"),\n item: pulumi.interpolate`{\n \"PK\": {\"S\": \"ADMIN#SETTINGS\"},\n \"SK\": {\"S\": \"default\"},\n \"data\": {\n \"M\": {\n \"appUrl\": {\n \"S\": \"${cloudfront.output.domainName.apply(\n value => `https://${value}`\n )}\"\n }\n }\n }\n }`\n }\n });\n\n return {\n ...bucket,\n cloudfront\n };\n }\n });\n\n return withServiceManifest(app);\n};\n"],"mappings":"AAAA,OAAO,KAAKA,GAAG,MAAM,aAAa;AAClC,OAAO,KAAKC,MAAM,MAAM,gBAAgB;AACxC,SAASC,eAAe,QAAqC,gBAAgB;AAC7E,SAASC,qBAAqB;AAC9B,SAASC,sBAAsB;AAC/B,SAASC,iBAAiB;AAC1B,SAASC,mBAAmB;AAC5B,SAASC,SAAS,EAAEC,UAAU;AAC9B,SAAuBC,aAAa,QAAQ,iBAAiB;AAC7D,SAASC,oBAAoB;AAyB7B,OAAO,MAAMC,oBAAoB,GAAIC,gBAA4C,IAAK;EAClF,MAAMC,GAAG,GAAGX,eAAe,CAAC;IACxBY,IAAI,EAAEF,gBAAgB,CAACE,IAAI;IAC3BC,IAAI,EAAEH,gBAAgB,CAACI,MAAM;IAC7BC,MAAM,EAAEL,gBAAgB;IACxBM,OAAO,EAAE,MAAML,GAAG,IAAI;MAClB,MAAMM,GAAG,GAAG,MAAMV,aAAa,CAAC,CAAC;MAEjC,MAAMW,wBAAwB,GAAG,MAAMD,GAAG,CAACE,2BAA2B,CAAC,CAAC;MAExE,IAAID,wBAAwB,EAAE;QAC1BP,GAAG,CAACS,UAAU,CAACC,QAAQ,IAAI;UACvB,IAAI,CAACA,QAAQ,CAACT,IAAI,CAACU,UAAU,CAACJ,wBAAwB,CAAC,EAAE;YACrDG,QAAQ,CAACT,IAAI,GAAG,GAAGM,wBAAwB,GAAGG,QAAQ,CAACT,IAAI,EAAE;UACjE;QACJ,CAAC,CAAC;MACN;MAEA,MAAM;QAAEA;MAAK,CAAC,GAAGF,gBAAgB;;MAEjC;MACA,MAAMa,IAAI,GAAGZ,GAAG,CAACa,SAAS,CAAClB,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AACA,wCAAwCzD,UAAU,CAACsC,MAAM,CAACoB,UAAU,CAACJ,KAAK,CACtCK,KAAK,IAAI,WAAWA,KAAK,EAC7B,CAAC;AACjC;AACA;AACA;AACA;QACgB;MACJ,CAAC,CAAC;MAEF,OAAO;QACH,GAAG5D,MAAM;QACTC;MACJ,CAAC;IACL;EACJ,CAAC,CAAC;EAEF,OAAOvB,mBAAmB,CAACO,GAAG,CAAC;AACnC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./createReactPulumiApp.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./createReactPulumiApp.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PulumiAppModule } from "@webiny/pulumi";
|
|
2
|
+
export type SyncSystemDynamo = PulumiAppModule<typeof SyncSystemDynamo>;
|
|
3
|
+
export declare const SyncSystemDynamo: import("@webiny/pulumi").PulumiAppModuleDefinition<import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/dynamodb/table").Table>, {
|
|
4
|
+
protect: boolean;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as aws from "@pulumi/aws";
|
|
2
|
+
import { createAppModule } from "@webiny/pulumi";
|
|
3
|
+
export const SyncSystemDynamo = createAppModule({
|
|
4
|
+
name: "SyncSystemDynamoDb",
|
|
5
|
+
config(app, params) {
|
|
6
|
+
return app.addResource(aws.dynamodb.Table, {
|
|
7
|
+
name: "sync-table",
|
|
8
|
+
config: {
|
|
9
|
+
attributes: [{
|
|
10
|
+
name: "PK",
|
|
11
|
+
type: "S"
|
|
12
|
+
}, {
|
|
13
|
+
name: "SK",
|
|
14
|
+
type: "S"
|
|
15
|
+
}, {
|
|
16
|
+
name: "GSI1_PK",
|
|
17
|
+
type: "S"
|
|
18
|
+
}, {
|
|
19
|
+
name: "GSI1_SK",
|
|
20
|
+
type: "S"
|
|
21
|
+
}, {
|
|
22
|
+
name: "GSI2_PK",
|
|
23
|
+
type: "S"
|
|
24
|
+
}, {
|
|
25
|
+
name: "GSI2_SK",
|
|
26
|
+
type: "S"
|
|
27
|
+
}],
|
|
28
|
+
billingMode: "PAY_PER_REQUEST",
|
|
29
|
+
hashKey: "PK",
|
|
30
|
+
rangeKey: "SK",
|
|
31
|
+
globalSecondaryIndexes: [
|
|
32
|
+
// TODO possibly add more indexes here
|
|
33
|
+
{
|
|
34
|
+
name: "GSI1",
|
|
35
|
+
hashKey: "GSI1_PK",
|
|
36
|
+
rangeKey: "GSI1_SK",
|
|
37
|
+
projectionType: "ALL"
|
|
38
|
+
}, {
|
|
39
|
+
name: "GSI2",
|
|
40
|
+
hashKey: "GSI2_PK",
|
|
41
|
+
rangeKey: "GSI2_SK",
|
|
42
|
+
projectionType: "ALL"
|
|
43
|
+
}],
|
|
44
|
+
ttl: {
|
|
45
|
+
attributeName: "expiresAt",
|
|
46
|
+
enabled: true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
opts: {
|
|
50
|
+
protect: params.protect
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=SyncSystemDynamo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["aws","createAppModule","SyncSystemDynamo","name","config","app","params","addResource","dynamodb","Table","attributes","type","billingMode","hashKey","rangeKey","globalSecondaryIndexes","projectionType","ttl","attributeName","enabled","opts","protect"],"sources":["SyncSystemDynamo.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport type { PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\nimport { createAppModule } from \"@webiny/pulumi\";\n\nexport type SyncSystemDynamo = PulumiAppModule<typeof SyncSystemDynamo>;\n\nexport const SyncSystemDynamo = createAppModule({\n name: \"SyncSystemDynamoDb\",\n config(app: PulumiApp, params: { protect: boolean }) {\n return app.addResource(aws.dynamodb.Table, {\n name: \"sync-table\",\n config: {\n attributes: [\n { name: \"PK\", type: \"S\" },\n { name: \"SK\", type: \"S\" },\n { name: \"GSI1_PK\", type: \"S\" },\n { name: \"GSI1_SK\", type: \"S\" },\n { name: \"GSI2_PK\", type: \"S\" },\n { name: \"GSI2_SK\", type: \"S\" }\n ],\n billingMode: \"PAY_PER_REQUEST\",\n hashKey: \"PK\",\n rangeKey: \"SK\",\n globalSecondaryIndexes: [\n // TODO possibly add more indexes here\n {\n name: \"GSI1\",\n hashKey: \"GSI1_PK\",\n rangeKey: \"GSI1_SK\",\n projectionType: \"ALL\"\n },\n {\n name: \"GSI2\",\n hashKey: \"GSI2_PK\",\n rangeKey: \"GSI2_SK\",\n projectionType: \"ALL\"\n }\n ],\n ttl: {\n attributeName: \"expiresAt\",\n enabled: true\n }\n },\n opts: {\n protect: params.protect\n }\n });\n }\n});\n"],"mappings":"AAAA,OAAO,KAAKA,GAAG,MAAM,aAAa;AAElC,SAASC,eAAe,QAAQ,gBAAgB;AAIhD,OAAO,MAAMC,gBAAgB,GAAGD,eAAe,CAAC;EAC5CE,IAAI,EAAE,oBAAoB;EAC1BC,MAAMA,CAACC,GAAc,EAAEC,MAA4B,EAAE;IACjD,OAAOD,GAAG,CAACE,WAAW,CAACP,GAAG,CAACQ,QAAQ,CAACC,KAAK,EAAE;MACvCN,IAAI,EAAE,YAAY;MAClBC,MAAM,EAAE;QACJM,UAAU,EAAE,CACR;UAAEP,IAAI,EAAE,IAAI;UAAEQ,IAAI,EAAE;QAAI,CAAC,EACzB;UAAER,IAAI,EAAE,IAAI;UAAEQ,IAAI,EAAE;QAAI,CAAC,EACzB;UAAER,IAAI,EAAE,SAAS;UAAEQ,IAAI,EAAE;QAAI,CAAC,EAC9B;UAAER,IAAI,EAAE,SAAS;UAAEQ,IAAI,EAAE;QAAI,CAAC,EAC9B;UAAER,IAAI,EAAE,SAAS;UAAEQ,IAAI,EAAE;QAAI,CAAC,EAC9B;UAAER,IAAI,EAAE,SAAS;UAAEQ,IAAI,EAAE;QAAI,CAAC,CACjC;QACDC,WAAW,EAAE,iBAAiB;QAC9BC,OAAO,EAAE,IAAI;QACbC,QAAQ,EAAE,IAAI;QACdC,sBAAsB,EAAE;QACpB;QACA;UACIZ,IAAI,EAAE,MAAM;UACZU,OAAO,EAAE,SAAS;UAClBC,QAAQ,EAAE,SAAS;UACnBE,cAAc,EAAE;QACpB,CAAC,EACD;UACIb,IAAI,EAAE,MAAM;UACZU,OAAO,EAAE,SAAS;UAClBC,QAAQ,EAAE,SAAS;UACnBE,cAAc,EAAE;QACpB,CAAC,CACJ;QACDC,GAAG,EAAE;UACDC,aAAa,EAAE,WAAW;UAC1BC,OAAO,EAAE;QACb;MACJ,CAAC;MACDC,IAAI,EAAE;QACFC,OAAO,EAAEf,MAAM,CAACe;MACpB;IACJ,CAAC,CAAC;EACN;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PulumiAppModule } from "@webiny/pulumi";
|
|
2
|
+
export type SyncSystemDynamoDb = PulumiAppModule<typeof SyncSystemDynamoDb>;
|
|
3
|
+
export declare const SyncSystemDynamoDb: import("@webiny/pulumi").PulumiAppModuleDefinition<import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/dynamodb/table").Table>, void>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as aws from "@pulumi/aws";
|
|
2
|
+
import { createAppModule } from "@webiny/pulumi";
|
|
3
|
+
import { createSyncResourceName } from "./createSyncResourceName.js";
|
|
4
|
+
export const SyncSystemDynamoDb = createAppModule({
|
|
5
|
+
name: "SyncSystemDynamoDb",
|
|
6
|
+
config(app) {
|
|
7
|
+
return app.addResource(aws.dynamodb.Table, {
|
|
8
|
+
name: createSyncResourceName("table"),
|
|
9
|
+
config: {
|
|
10
|
+
attributes: [{
|
|
11
|
+
name: "PK",
|
|
12
|
+
type: "S"
|
|
13
|
+
}, {
|
|
14
|
+
name: "SK",
|
|
15
|
+
type: "S"
|
|
16
|
+
}, {
|
|
17
|
+
name: "GSI1_PK",
|
|
18
|
+
type: "S"
|
|
19
|
+
}, {
|
|
20
|
+
name: "GSI1_SK",
|
|
21
|
+
type: "S"
|
|
22
|
+
}, {
|
|
23
|
+
name: "GSI2_PK",
|
|
24
|
+
type: "S"
|
|
25
|
+
}, {
|
|
26
|
+
name: "GSI2_SK",
|
|
27
|
+
type: "S"
|
|
28
|
+
}],
|
|
29
|
+
billingMode: "PAY_PER_REQUEST",
|
|
30
|
+
hashKey: "PK",
|
|
31
|
+
rangeKey: "SK",
|
|
32
|
+
globalSecondaryIndexes: [{
|
|
33
|
+
name: "GSI1",
|
|
34
|
+
hashKey: "GSI1_PK",
|
|
35
|
+
rangeKey: "GSI1_SK",
|
|
36
|
+
projectionType: "ALL"
|
|
37
|
+
}, {
|
|
38
|
+
name: "GSI2",
|
|
39
|
+
hashKey: "GSI2_PK",
|
|
40
|
+
rangeKey: "GSI2_SK",
|
|
41
|
+
projectionType: "ALL"
|
|
42
|
+
}],
|
|
43
|
+
ttl: {
|
|
44
|
+
attributeName: "expiresAt",
|
|
45
|
+
enabled: true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=SyncSystemDynamoDb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["aws","createAppModule","createSyncResourceName","SyncSystemDynamoDb","name","config","app","addResource","dynamodb","Table","attributes","type","billingMode","hashKey","rangeKey","globalSecondaryIndexes","projectionType","ttl","attributeName","enabled"],"sources":["SyncSystemDynamoDb.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport type { PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\nimport { createAppModule } from \"@webiny/pulumi\";\nimport { createSyncResourceName } from \"~/pulumi/apps/syncSystem/createSyncResourceName.js\";\n\nexport type SyncSystemDynamoDb = PulumiAppModule<typeof SyncSystemDynamoDb>;\n\nexport const SyncSystemDynamoDb = createAppModule({\n name: \"SyncSystemDynamoDb\",\n config(app: PulumiApp) {\n return app.addResource(aws.dynamodb.Table, {\n name: createSyncResourceName(\"table\"),\n config: {\n attributes: [\n { name: \"PK\", type: \"S\" },\n { name: \"SK\", type: \"S\" },\n { name: \"GSI1_PK\", type: \"S\" },\n { name: \"GSI1_SK\", type: \"S\" },\n { name: \"GSI2_PK\", type: \"S\" },\n { name: \"GSI2_SK\", type: \"S\" }\n ],\n billingMode: \"PAY_PER_REQUEST\",\n hashKey: \"PK\",\n rangeKey: \"SK\",\n globalSecondaryIndexes: [\n {\n name: \"GSI1\",\n hashKey: \"GSI1_PK\",\n rangeKey: \"GSI1_SK\",\n projectionType: \"ALL\"\n },\n {\n name: \"GSI2\",\n hashKey: \"GSI2_PK\",\n rangeKey: \"GSI2_SK\",\n projectionType: \"ALL\"\n }\n ],\n ttl: {\n attributeName: \"expiresAt\",\n enabled: true\n }\n }\n });\n }\n});\n"],"mappings":"AAAA,OAAO,KAAKA,GAAG,MAAM,aAAa;AAElC,SAASC,eAAe,QAAQ,gBAAgB;AAChD,SAASC,sBAAsB;AAI/B,OAAO,MAAMC,kBAAkB,GAAGF,eAAe,CAAC;EAC9CG,IAAI,EAAE,oBAAoB;EAC1BC,MAAMA,CAACC,GAAc,EAAE;IACnB,OAAOA,GAAG,CAACC,WAAW,CAACP,GAAG,CAACQ,QAAQ,CAACC,KAAK,EAAE;MACvCL,IAAI,EAAEF,sBAAsB,CAAC,OAAO,CAAC;MACrCG,MAAM,EAAE;QACJK,UAAU,EAAE,CACR;UAAEN,IAAI,EAAE,IAAI;UAAEO,IAAI,EAAE;QAAI,CAAC,EACzB;UAAEP,IAAI,EAAE,IAAI;UAAEO,IAAI,EAAE;QAAI,CAAC,EACzB;UAAEP,IAAI,EAAE,SAAS;UAAEO,IAAI,EAAE;QAAI,CAAC,EAC9B;UAAEP,IAAI,EAAE,SAAS;UAAEO,IAAI,EAAE;QAAI,CAAC,EAC9B;UAAEP,IAAI,EAAE,SAAS;UAAEO,IAAI,EAAE;QAAI,CAAC,EAC9B;UAAEP,IAAI,EAAE,SAAS;UAAEO,IAAI,EAAE;QAAI,CAAC,CACjC;QACDC,WAAW,EAAE,iBAAiB;QAC9BC,OAAO,EAAE,IAAI;QACbC,QAAQ,EAAE,IAAI;QACdC,sBAAsB,EAAE,CACpB;UACIX,IAAI,EAAE,MAAM;UACZS,OAAO,EAAE,SAAS;UAClBC,QAAQ,EAAE,SAAS;UACnBE,cAAc,EAAE;QACpB,CAAC,EACD;UACIZ,IAAI,EAAE,MAAM;UACZS,OAAO,EAAE,SAAS;UAClBC,QAAQ,EAAE,SAAS;UACnBE,cAAc,EAAE;QACpB,CAAC,CACJ;QACDC,GAAG,EAAE;UACDC,aAAa,EAAE,WAAW;UAC1BC,OAAO,EAAE;QACb;MACJ;IACJ,CAAC,CAAC;EACN;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const SyncSystemEventBus: import("@webiny/pulumi").PulumiAppModuleDefinition<{
|
|
2
|
+
eventBus: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudwatch/eventBus.js").EventBus>;
|
|
3
|
+
eventBusRule: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudwatch/eventRule.js").EventRule>;
|
|
4
|
+
eventBusTarget: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudwatch/eventTarget.js").EventTarget>;
|
|
5
|
+
eventBusPolicy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/sqs/queuePolicy.js").QueuePolicy>;
|
|
6
|
+
}, void>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as aws from "@pulumi/aws";
|
|
2
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
3
|
+
import { createAppModule } from "@webiny/pulumi";
|
|
4
|
+
import { createSyncResourceName } from "./createSyncResourceName.js";
|
|
5
|
+
import { SyncSystemSQS } from "./SyncSystemSQS.js";
|
|
6
|
+
export const SyncSystemEventBus = createAppModule({
|
|
7
|
+
name: "SyncSystemEventBus",
|
|
8
|
+
config: app => {
|
|
9
|
+
const {
|
|
10
|
+
sqsQueue
|
|
11
|
+
} = app.getModule(SyncSystemSQS);
|
|
12
|
+
const eventBusName = createSyncResourceName("eventBus");
|
|
13
|
+
const config = {
|
|
14
|
+
name: eventBusName,
|
|
15
|
+
description: "Connect deployed systems to Sync SQS"
|
|
16
|
+
};
|
|
17
|
+
const eventBus = app.addResource(aws.cloudwatch.EventBus, {
|
|
18
|
+
name: eventBusName,
|
|
19
|
+
config
|
|
20
|
+
});
|
|
21
|
+
const eventBusRuleConfig = {
|
|
22
|
+
eventBusName: eventBus.output.name,
|
|
23
|
+
eventPattern: JSON.stringify({
|
|
24
|
+
"detail-type": ["synchronization-input"]
|
|
25
|
+
})
|
|
26
|
+
};
|
|
27
|
+
const eventBusRule = app.addResource(aws.cloudwatch.EventRule, {
|
|
28
|
+
name: createSyncResourceName("eventBusRule"),
|
|
29
|
+
config: eventBusRuleConfig
|
|
30
|
+
});
|
|
31
|
+
const eventBusTargetConfig = {
|
|
32
|
+
rule: eventBusRule.output.name,
|
|
33
|
+
eventBusName: eventBus.output.name,
|
|
34
|
+
arn: sqsQueue.output.arn,
|
|
35
|
+
sqsTarget: {
|
|
36
|
+
messageGroupId: "default"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const eventBusTarget = app.addResource(aws.cloudwatch.EventTarget, {
|
|
40
|
+
name: createSyncResourceName("eventBusEventTarget"),
|
|
41
|
+
config: eventBusTargetConfig
|
|
42
|
+
});
|
|
43
|
+
const eventBusPolicy = app.addResource(aws.sqs.QueuePolicy, {
|
|
44
|
+
name: createSyncResourceName("queuePolicy"),
|
|
45
|
+
config: {
|
|
46
|
+
queueUrl: sqsQueue.output.url,
|
|
47
|
+
policy: pulumi.all([sqsQueue.output.arn, eventBusRule.output.arn]).apply(([sqsArn, eventBusRuleArn]) => {
|
|
48
|
+
return JSON.stringify({
|
|
49
|
+
Version: "2012-10-17",
|
|
50
|
+
Statement: [{
|
|
51
|
+
Effect: "Allow",
|
|
52
|
+
Principal: aws.iam.Principals.EventsPrincipal,
|
|
53
|
+
Action: ["sqs:SendMessage"],
|
|
54
|
+
Resource: [sqsArn, `${sqsArn}/*`],
|
|
55
|
+
Condition: {
|
|
56
|
+
ArnEquals: {
|
|
57
|
+
/**
|
|
58
|
+
* Not a mistake, source is the rule, not the bus.
|
|
59
|
+
*/
|
|
60
|
+
"aws:SourceArn": eventBusRuleArn
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}]
|
|
64
|
+
});
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
return {
|
|
69
|
+
eventBus,
|
|
70
|
+
eventBusRule,
|
|
71
|
+
eventBusTarget,
|
|
72
|
+
eventBusPolicy
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=SyncSystemEventBus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["aws","pulumi","createAppModule","createSyncResourceName","SyncSystemSQS","SyncSystemEventBus","name","config","app","sqsQueue","getModule","eventBusName","description","eventBus","addResource","cloudwatch","EventBus","eventBusRuleConfig","output","eventPattern","JSON","stringify","eventBusRule","EventRule","eventBusTargetConfig","rule","arn","sqsTarget","messageGroupId","eventBusTarget","EventTarget","eventBusPolicy","sqs","QueuePolicy","queueUrl","url","policy","all","apply","sqsArn","eventBusRuleArn","Version","Statement","Effect","Principal","iam","Principals","EventsPrincipal","Action","Resource","Condition","ArnEquals"],"sources":["SyncSystemEventBus.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport type { PulumiApp } from \"@webiny/pulumi\";\nimport { createAppModule } from \"@webiny/pulumi\";\nimport { createSyncResourceName } from \"./createSyncResourceName.js\";\nimport type { EventBusArgs } from \"@pulumi/aws/cloudwatch/eventBus.js\";\nimport { SyncSystemSQS } from \"~/pulumi/apps/syncSystem/SyncSystemSQS.js\";\nimport type { EventRuleArgs } from \"@pulumi/aws/cloudwatch/eventRule.js\";\nimport type { EventTargetArgs } from \"@pulumi/aws/cloudwatch/eventTarget.js\";\n\nexport const SyncSystemEventBus = createAppModule({\n name: \"SyncSystemEventBus\",\n config: (app: PulumiApp) => {\n const { sqsQueue } = app.getModule(SyncSystemSQS);\n\n const eventBusName = createSyncResourceName(\"eventBus\");\n\n const config: EventBusArgs = {\n name: eventBusName,\n description: \"Connect deployed systems to Sync SQS\"\n };\n const eventBus = app.addResource(aws.cloudwatch.EventBus, {\n name: eventBusName,\n config\n });\n\n const eventBusRuleConfig: EventRuleArgs = {\n eventBusName: eventBus.output.name,\n eventPattern: JSON.stringify({\n \"detail-type\": [\"synchronization-input\"]\n })\n };\n\n const eventBusRule = app.addResource(aws.cloudwatch.EventRule, {\n name: createSyncResourceName(\"eventBusRule\"),\n config: eventBusRuleConfig\n });\n\n const eventBusTargetConfig: EventTargetArgs = {\n rule: eventBusRule.output.name,\n eventBusName: eventBus.output.name,\n arn: sqsQueue.output.arn,\n sqsTarget: {\n messageGroupId: \"default\"\n }\n };\n\n const eventBusTarget = app.addResource(aws.cloudwatch.EventTarget, {\n name: createSyncResourceName(\"eventBusEventTarget\"),\n config: eventBusTargetConfig\n });\n\n const eventBusPolicy = app.addResource(aws.sqs.QueuePolicy, {\n name: createSyncResourceName(\"queuePolicy\"),\n config: {\n queueUrl: sqsQueue.output.url,\n policy: pulumi\n .all([sqsQueue.output.arn, eventBusRule.output.arn])\n .apply(([sqsArn, eventBusRuleArn]) => {\n return JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Effect: \"Allow\",\n Principal: aws.iam.Principals.EventsPrincipal,\n Action: [\"sqs:SendMessage\"],\n Resource: [sqsArn, `${sqsArn}/*`],\n Condition: {\n ArnEquals: {\n /**\n * Not a mistake, source is the rule, not the bus.\n */\n \"aws:SourceArn\": eventBusRuleArn\n }\n }\n }\n ]\n });\n })\n }\n });\n\n return {\n eventBus,\n eventBusRule,\n eventBusTarget,\n eventBusPolicy\n };\n }\n});\n"],"mappings":"AAAA,OAAO,KAAKA,GAAG,MAAM,aAAa;AAClC,OAAO,KAAKC,MAAM,MAAM,gBAAgB;AAExC,SAASC,eAAe,QAAQ,gBAAgB;AAChD,SAASC,sBAAsB;AAE/B,SAASC,aAAa;AAItB,OAAO,MAAMC,kBAAkB,GAAGH,eAAe,CAAC;EAC9CI,IAAI,EAAE,oBAAoB;EAC1BC,MAAM,EAAGC,GAAc,IAAK;IACxB,MAAM;MAAEC;IAAS,CAAC,GAAGD,GAAG,CAACE,SAAS,CAACN,aAAa,CAAC;IAEjD,MAAMO,YAAY,GAAGR,sBAAsB,CAAC,UAAU,CAAC;IAEvD,MAAMI,MAAoB,GAAG;MACzBD,IAAI,EAAEK,YAAY;MAClBC,WAAW,EAAE;IACjB,CAAC;IACD,MAAMC,QAAQ,GAAGL,GAAG,CAACM,WAAW,CAACd,GAAG,CAACe,UAAU,CAACC,QAAQ,EAAE;MACtDV,IAAI,EAAEK,YAAY;MAClBJ;IACJ,CAAC,CAAC;IAEF,MAAMU,kBAAiC,GAAG;MACtCN,YAAY,EAAEE,QAAQ,CAACK,MAAM,CAACZ,IAAI;MAClCa,YAAY,EAAEC,IAAI,CAACC,SAAS,CAAC;QACzB,aAAa,EAAE,CAAC,uBAAuB;MAC3C,CAAC;IACL,CAAC;IAED,MAAMC,YAAY,GAAGd,GAAG,CAACM,WAAW,CAACd,GAAG,CAACe,UAAU,CAACQ,SAAS,EAAE;MAC3DjB,IAAI,EAAEH,sBAAsB,CAAC,cAAc,CAAC;MAC5CI,MAAM,EAAEU;IACZ,CAAC,CAAC;IA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CAAC,CAAC;QACN,CAAC;MACT;IACJ,CAAC,CAAC;IAEF,OAAO;MACH3B,QAAQ;MACRS,YAAY;MACZO,cAAc;MACdE;IACJ,CAAC;EACL;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SyncSystemLambdaParams {
|
|
2
|
+
protect: boolean;
|
|
3
|
+
config: Record<string, string>;
|
|
4
|
+
}
|
|
5
|
+
export declare const SyncSystemLambda: import("@webiny/pulumi").PulumiAppModuleDefinition<{
|
|
6
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam/role.js").Role>;
|
|
7
|
+
policy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam/policy.js").Policy>;
|
|
8
|
+
functions: {
|
|
9
|
+
syncSystem: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda/function.js").Function>;
|
|
10
|
+
};
|
|
11
|
+
}, SyncSystemLambdaParams>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
3
|
+
import * as aws from "@pulumi/aws";
|
|
4
|
+
import { createAppModule } from "@webiny/pulumi";
|
|
5
|
+
import { createLambdaRole, getCommonLambdaEnvVariables } from "../lambdaUtils.js";
|
|
6
|
+
import { VpcConfig } from "../index.js";
|
|
7
|
+
import { getAwsAccountId, getAwsRegion } from "../awsUtils.js";
|
|
8
|
+
import { LAMBDA_RUNTIME } from "../../constants.js";
|
|
9
|
+
import { SyncSystemDynamo } from "./SyncSystemDynamo.js";
|
|
10
|
+
export const SyncSystemLambda = createAppModule({
|
|
11
|
+
name: "SyncSystemLambda",
|
|
12
|
+
// eslint-disable-next-line
|
|
13
|
+
config(app, _) {
|
|
14
|
+
const policy = createSyncSystemLambdaPolicy({
|
|
15
|
+
app,
|
|
16
|
+
// TODO - get bucket ids and dynamodb tables from the FileManager app
|
|
17
|
+
primary: {
|
|
18
|
+
fileManagerBucketId: "primaryFileManagerBucketId",
|
|
19
|
+
dynamoDbTableArn: ""
|
|
20
|
+
},
|
|
21
|
+
secondary: {
|
|
22
|
+
fileManagerBucketId: "secondaryFileManagerBucketId",
|
|
23
|
+
dynamoDbTableArn: ""
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const role = createLambdaRole(app, {
|
|
27
|
+
name: "sync-system-lambda-role",
|
|
28
|
+
policy: policy.output
|
|
29
|
+
});
|
|
30
|
+
const syncSystemLambda = app.addResource(aws.lambda.Function, {
|
|
31
|
+
name: "sync-system-lambda",
|
|
32
|
+
config: {
|
|
33
|
+
runtime: LAMBDA_RUNTIME,
|
|
34
|
+
handler: "handler.handler",
|
|
35
|
+
role: role.output.arn,
|
|
36
|
+
timeout: 900,
|
|
37
|
+
memorySize: 1024,
|
|
38
|
+
code: new pulumi.asset.AssetArchive({
|
|
39
|
+
".": new pulumi.asset.FileArchive(path.join(app.paths.workspace, "transfer/build"))
|
|
40
|
+
}),
|
|
41
|
+
environment: {
|
|
42
|
+
variables: getCommonLambdaEnvVariables().apply(value => ({
|
|
43
|
+
...value,
|
|
44
|
+
AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1"
|
|
45
|
+
}))
|
|
46
|
+
},
|
|
47
|
+
vpcConfig: app.getModule(VpcConfig).functionVpcConfig,
|
|
48
|
+
loggingConfig: {
|
|
49
|
+
logFormat: "JSON"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
role,
|
|
55
|
+
policy,
|
|
56
|
+
functions: {
|
|
57
|
+
syncSystem: syncSystemLambda
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
function createSyncSystemLambdaPolicy(params) {
|
|
63
|
+
const {
|
|
64
|
+
app,
|
|
65
|
+
primary,
|
|
66
|
+
secondary
|
|
67
|
+
} = params;
|
|
68
|
+
const dynamoDbTable = app.getModule(SyncSystemDynamo);
|
|
69
|
+
const awsAccountId = getAwsAccountId(app);
|
|
70
|
+
const awsRegion = getAwsRegion(app);
|
|
71
|
+
const policy = {
|
|
72
|
+
Version: "2012-10-17",
|
|
73
|
+
Statement: [{
|
|
74
|
+
Sid: "PermissionForDynamodb",
|
|
75
|
+
Effect: "Allow",
|
|
76
|
+
Action: ["dynamodb:BatchGetItem", "dynamodb:BatchWriteItem", "dynamodb:ConditionCheckItem", "dynamodb:CreateBackup", "dynamodb:CreateTable", "dynamodb:CreateTableReplica", "dynamodb:DeleteBackup", "dynamodb:DeleteItem", "dynamodb:DeleteTable", "dynamodb:DeleteTableReplica", "dynamodb:DescribeBackup", "dynamodb:DescribeContinuousBackups", "dynamodb:DescribeContributorInsights", "dynamodb:DescribeExport", "dynamodb:DescribeKinesisStreamingDestination", "dynamodb:DescribeLimits", "dynamodb:DescribeReservedCapacity", "dynamodb:DescribeReservedCapacityOfferings", "dynamodb:DescribeStream", "dynamodb:DescribeTable", "dynamodb:DescribeTableReplicaAutoScaling", "dynamodb:DescribeTimeToLive", "dynamodb:DisableKinesisStreamingDestination", "dynamodb:EnableKinesisStreamingDestination", "dynamodb:ExportTableToPointInTime", "dynamodb:GetItem", "dynamodb:GetRecords", "dynamodb:GetShardIterator", "dynamodb:ListBackups", "dynamodb:ListContributorInsights", "dynamodb:ListExports", "dynamodb:ListStreams", "dynamodb:ListTables", "dynamodb:ListTagsOfResource", "dynamodb:PartiQLDelete", "dynamodb:PartiQLInsert", "dynamodb:PartiQLSelect", "dynamodb:PartiQLUpdate", "dynamodb:PurchaseReservedCapacityOfferings", "dynamodb:PutItem", "dynamodb:Query", "dynamodb:RestoreTableFromBackup", "dynamodb:RestoreTableToPointInTime", "dynamodb:Scan", "dynamodb:UpdateContinuousBackups", "dynamodb:UpdateContributorInsights", "dynamodb:UpdateItem", "dynamodb:UpdateTable", "dynamodb:UpdateTableReplicaAutoScaling", "dynamodb:UpdateTimeToLive"],
|
|
77
|
+
Resource: [`${dynamoDbTable.output.arn}`, `${dynamoDbTable.output.arn}/*`]
|
|
78
|
+
}, {
|
|
79
|
+
Sid: "PermissionForS3",
|
|
80
|
+
Effect: "Allow",
|
|
81
|
+
Action: ["s3:ListBucket", "s3:GetObjectAcl", "s3:DeleteObject", "s3:PutObjectAcl", "s3:PutObject", "s3:GetObject"],
|
|
82
|
+
Resource: [pulumi.interpolate`arn:aws:s3:::${primary.fileManagerBucketId}`, pulumi.interpolate`arn:aws:s3:::${primary.fileManagerBucketId}/*`, pulumi.interpolate`arn:aws:s3:::${secondary.fileManagerBucketId}`, pulumi.interpolate`arn:aws:s3:::${secondary.fileManagerBucketId}/*`]
|
|
83
|
+
}, {
|
|
84
|
+
Sid: "PermissionForLambda",
|
|
85
|
+
Effect: "Allow",
|
|
86
|
+
Action: ["lambda:InvokeFunction"],
|
|
87
|
+
Resource: pulumi.interpolate`arn:aws:lambda:${awsRegion}:${awsAccountId}:function:*`
|
|
88
|
+
}]
|
|
89
|
+
};
|
|
90
|
+
return app.addResource(aws.iam.Policy, {
|
|
91
|
+
name: "SyncSystemLambdaPolicy",
|
|
92
|
+
config: {
|
|
93
|
+
description: "This policy enables access to Dynamodb, S3 and Lambda.",
|
|
94
|
+
policy
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//# sourceMappingURL=SyncSystemLambda.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["path","pulumi","aws","createAppModule","createLambdaRole","getCommonLambdaEnvVariables","VpcConfig","getAwsAccountId","getAwsRegion","LAMBDA_RUNTIME","SyncSystemDynamo","SyncSystemLambda","name","config","app","_","policy","createSyncSystemLambdaPolicy","primary","fileManagerBucketId","dynamoDbTableArn","secondary","role","output","syncSystemLambda","addResource","lambda","Function","runtime","handler","arn","timeout","memorySize","code","asset","AssetArchive","FileArchive","join","paths","workspace","environment","variables","apply","value","AWS_NODEJS_CONNECTION_REUSE_ENABLED","vpcConfig","getModule","functionVpcConfig","loggingConfig","logFormat","functions","syncSystem","params","dynamoDbTable","awsAccountId","awsRegion","Version","Statement","Sid","Effect","Action","Resource","interpolate","iam","Policy","description"],"sources":["SyncSystemLambda.ts"],"sourcesContent":["import path from \"path\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport type { PulumiApp } from \"@webiny/pulumi\";\nimport { createAppModule } from \"@webiny/pulumi\";\nimport { createLambdaRole, getCommonLambdaEnvVariables } from \"../lambdaUtils.js\";\nimport { VpcConfig } from \"~/pulumi/apps/index.js\";\nimport { getAwsAccountId, getAwsRegion } from \"../awsUtils.js\";\nimport { LAMBDA_RUNTIME } from \"~/pulumi/constants.js\";\nimport { SyncSystemDynamo } from \"./SyncSystemDynamo.js\";\n\nexport interface SyncSystemLambdaParams {\n protect: boolean;\n config: Record<string, string>;\n}\n\nexport const SyncSystemLambda = createAppModule({\n name: \"SyncSystemLambda\",\n // eslint-disable-next-line\n config(app: PulumiApp, _: SyncSystemLambdaParams) {\n const policy = createSyncSystemLambdaPolicy({\n app,\n // TODO - get bucket ids and dynamodb tables from the FileManager app\n primary: {\n fileManagerBucketId: \"primaryFileManagerBucketId\",\n dynamoDbTableArn: \"\"\n },\n secondary: {\n fileManagerBucketId: \"secondaryFileManagerBucketId\",\n dynamoDbTableArn: \"\"\n }\n });\n const role = createLambdaRole(app, {\n name: \"sync-system-lambda-role\",\n policy: policy.output\n });\n\n const syncSystemLambda = app.addResource(aws.lambda.Function, {\n name: \"sync-system-lambda\",\n config: {\n runtime: LAMBDA_RUNTIME,\n handler: \"handler.handler\",\n role: role.output.arn,\n timeout: 900,\n memorySize: 1024,\n code: new pulumi.asset.AssetArchive({\n \".\": new pulumi.asset.FileArchive(\n path.join(app.paths.workspace, \"transfer/build\")\n )\n }),\n environment: {\n variables: getCommonLambdaEnvVariables().apply(value => ({\n ...value,\n AWS_NODEJS_CONNECTION_REUSE_ENABLED: \"1\"\n }))\n },\n vpcConfig: app.getModule(VpcConfig).functionVpcConfig,\n loggingConfig: {\n logFormat: \"JSON\"\n }\n }\n });\n\n return {\n role,\n policy,\n functions: {\n syncSystem: syncSystemLambda\n }\n };\n }\n});\n\ninterface ICreateSyncSystemLambdaPolicyParamsType {\n fileManagerBucketId: string;\n dynamoDbTableArn: string;\n}\n\ninterface ICreateSyncSystemLambdaPolicyParams {\n app: PulumiApp;\n primary: ICreateSyncSystemLambdaPolicyParamsType;\n secondary: ICreateSyncSystemLambdaPolicyParamsType;\n}\n\nfunction createSyncSystemLambdaPolicy(params: ICreateSyncSystemLambdaPolicyParams) {\n const { app, primary, secondary } = params;\n const dynamoDbTable = app.getModule(SyncSystemDynamo);\n const awsAccountId = getAwsAccountId(app);\n const awsRegion = getAwsRegion(app);\n\n const policy: aws.iam.PolicyDocument = {\n Version: \"2012-10-17\",\n Statement: [\n {\n Sid: \"PermissionForDynamodb\",\n Effect: \"Allow\",\n Action: [\n \"dynamodb:BatchGetItem\",\n \"dynamodb:BatchWriteItem\",\n \"dynamodb:ConditionCheckItem\",\n \"dynamodb:CreateBackup\",\n \"dynamodb:CreateTable\",\n \"dynamodb:CreateTableReplica\",\n \"dynamodb:DeleteBackup\",\n \"dynamodb:DeleteItem\",\n \"dynamodb:DeleteTable\",\n \"dynamodb:DeleteTableReplica\",\n \"dynamodb:DescribeBackup\",\n \"dynamodb:DescribeContinuousBackups\",\n \"dynamodb:DescribeContributorInsights\",\n \"dynamodb:DescribeExport\",\n \"dynamodb:DescribeKinesisStreamingDestination\",\n \"dynamodb:DescribeLimits\",\n \"dynamodb:DescribeReservedCapacity\",\n \"dynamodb:DescribeReservedCapacityOfferings\",\n \"dynamodb:DescribeStream\",\n \"dynamodb:DescribeTable\",\n \"dynamodb:DescribeTableReplicaAutoScaling\",\n \"dynamodb:DescribeTimeToLive\",\n \"dynamodb:DisableKinesisStreamingDestination\",\n \"dynamodb:EnableKinesisStreamingDestination\",\n \"dynamodb:ExportTableToPointInTime\",\n \"dynamodb:GetItem\",\n \"dynamodb:GetRecords\",\n \"dynamodb:GetShardIterator\",\n \"dynamodb:ListBackups\",\n \"dynamodb:ListContributorInsights\",\n \"dynamodb:ListExports\",\n \"dynamodb:ListStreams\",\n \"dynamodb:ListTables\",\n \"dynamodb:ListTagsOfResource\",\n \"dynamodb:PartiQLDelete\",\n \"dynamodb:PartiQLInsert\",\n \"dynamodb:PartiQLSelect\",\n \"dynamodb:PartiQLUpdate\",\n \"dynamodb:PurchaseReservedCapacityOfferings\",\n \"dynamodb:PutItem\",\n \"dynamodb:Query\",\n \"dynamodb:RestoreTableFromBackup\",\n \"dynamodb:RestoreTableToPointInTime\",\n \"dynamodb:Scan\",\n \"dynamodb:UpdateContinuousBackups\",\n \"dynamodb:UpdateContributorInsights\",\n \"dynamodb:UpdateItem\",\n \"dynamodb:UpdateTable\",\n \"dynamodb:UpdateTableReplicaAutoScaling\",\n \"dynamodb:UpdateTimeToLive\"\n ],\n Resource: [`${dynamoDbTable.output.arn}`, `${dynamoDbTable.output.arn}/*`]\n },\n {\n Sid: \"PermissionForS3\",\n Effect: \"Allow\",\n Action: [\n \"s3:ListBucket\",\n \"s3:GetObjectAcl\",\n \"s3:DeleteObject\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n \"s3:GetObject\"\n ],\n Resource: [\n pulumi.interpolate`arn:aws:s3:::${primary.fileManagerBucketId}`,\n pulumi.interpolate`arn:aws:s3:::${primary.fileManagerBucketId}/*`,\n pulumi.interpolate`arn:aws:s3:::${secondary.fileManagerBucketId}`,\n pulumi.interpolate`arn:aws:s3:::${secondary.fileManagerBucketId}/*`\n ]\n },\n {\n Sid: \"PermissionForLambda\",\n Effect: \"Allow\",\n Action: [\"lambda:InvokeFunction\"],\n Resource: pulumi.interpolate`arn:aws:lambda:${awsRegion}:${awsAccountId}:function:*`\n }\n ]\n };\n\n return app.addResource(aws.iam.Policy, {\n name: \"SyncSystemLambdaPolicy\",\n config: {\n description: \"This policy enables access to Dynamodb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AC;EAET,CAAC;EAED,OAAOxC,GAAG,CAACW,WAAW,CAACvB,GAAG,CAAC6D,GAAG,CAACC,MAAM,EAAE;IACnCpD,IAAI,EAAE,wBAAwB;IAC9BC,MAAM,EAAE;MACJoD,WAAW,EAAE,wDAAwD;MACrEjD;IACJ;EACJ,CAAC,CAAC;AACN","ignoreList":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PulumiAppModule } from "@webiny/pulumi";
|
|
2
|
+
export type SyncSystemOutput = PulumiAppModule<typeof SyncSystemOutput>;
|
|
3
|
+
export declare const SyncSystemOutput: import("@webiny/pulumi").PulumiAppModuleDefinition<import("@pulumi/pulumi").Output<import("@pulumi/pulumi").UnwrappedObject<import("./types").IGetSyncSystemOutputResult> | null>, void>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createAppModule } from "@webiny/pulumi";
|
|
2
|
+
import { getSyncSystemOutput } from "./getSyncSystemOutput.js";
|
|
3
|
+
export const SyncSystemOutput = createAppModule({
|
|
4
|
+
name: "SyncSystemOutput",
|
|
5
|
+
config(app) {
|
|
6
|
+
return app.addHandler(async () => {
|
|
7
|
+
const output = await getSyncSystemOutput();
|
|
8
|
+
const keys = Object.keys(output || {});
|
|
9
|
+
if (keys.length === 0) {
|
|
10
|
+
console.log("Sync System application is not deployed.");
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return output;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=SyncSystemOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createAppModule","getSyncSystemOutput","SyncSystemOutput","name","config","app","addHandler","output","keys","Object","length","console","log"],"sources":["SyncSystemOutput.ts"],"sourcesContent":["import type { PulumiAppModule } from \"@webiny/pulumi\";\nimport { createAppModule } from \"@webiny/pulumi\";\nimport { getSyncSystemOutput } from \"~/pulumi/apps/syncSystem/getSyncSystemOutput.js\";\n\nexport type SyncSystemOutput = PulumiAppModule<typeof SyncSystemOutput>;\n\nexport const SyncSystemOutput = createAppModule({\n name: \"SyncSystemOutput\",\n config(app) {\n return app.addHandler(async () => {\n const output = await getSyncSystemOutput();\n\n const keys = Object.keys(output || {});\n\n if (keys.length === 0) {\n console.log(\"Sync System application is not deployed.\");\n return null;\n }\n return output;\n });\n }\n});\n"],"mappings":"AACA,SAASA,eAAe,QAAQ,gBAAgB;AAChD,SAASC,mBAAmB;AAI5B,OAAO,MAAMC,gBAAgB,GAAGF,eAAe,CAAC;EAC5CG,IAAI,EAAE,kBAAkB;EACxBC,MAAMA,CAACC,GAAG,EAAE;IACR,OAAOA,GAAG,CAACC,UAAU,CAAC,YAAY;MAC9B,MAAMC,MAAM,GAAG,MAAMN,mBAAmB,CAAC,CAAC;MAE1C,MAAMO,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACD,MAAM,IAAI,CAAC,CAAC,CAAC;MAEtC,IAAIC,IAAI,CAACE,MAAM,KAAK,CAAC,EAAE;QACnBC,OAAO,CAACC,GAAG,CAAC,0CAA0C,CAAC;QACvD,OAAO,IAAI;MACf;MACA,OAAOL,MAAM;IACjB,CAAC,CAAC;EACN;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PulumiAppModule } from "@webiny/pulumi";
|
|
2
|
+
export type SyncSystemResolverLambda = PulumiAppModule<typeof SyncSystemResolverLambda>;
|
|
3
|
+
export declare const SyncSystemResolverLambda: import("@webiny/pulumi").PulumiAppModuleDefinition<{
|
|
4
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam/role.js").Role>;
|
|
5
|
+
policy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam/policy.js").Policy>;
|
|
6
|
+
lambda: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda/function.js").Function>;
|
|
7
|
+
eventSourceMapping: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda/eventSourceMapping.js").EventSourceMapping>;
|
|
8
|
+
}, void>;
|