@webiny/project-aws 6.6.0-alpha.1 → 6.6.0-alpha.11
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/AwsProjectSdk.d.ts +38 -0
- package/AwsProjectSdk.js +61 -0
- package/AwsProjectSdk.js.map +1 -0
- package/abstractions/features/DestroyApp.d.ts +18 -0
- package/abstractions/features/DestroyApp.js +5 -0
- package/abstractions/features/DestroyApp.js.map +1 -0
- package/abstractions/features/ExportStack.d.ts +18 -0
- package/abstractions/features/ExportStack.js +5 -0
- package/abstractions/features/ExportStack.js.map +1 -0
- package/abstractions/features/GetAppOutput.d.ts +18 -0
- package/abstractions/features/GetAppOutput.js +5 -0
- package/abstractions/features/GetAppOutput.js.map +1 -0
- package/abstractions/features/GetAppStackOutput.d.ts +18 -0
- package/abstractions/features/GetAppStackOutput.js +5 -0
- package/abstractions/features/GetAppStackOutput.js.map +1 -0
- package/abstractions/features/GetPulumiResourceNamePrefix.d.ts +7 -0
- package/abstractions/features/GetPulumiResourceNamePrefix.js +5 -0
- package/abstractions/features/GetPulumiResourceNamePrefix.js.map +1 -0
- package/abstractions/features/RefreshApp.d.ts +18 -0
- package/abstractions/features/RefreshApp.js +5 -0
- package/abstractions/features/RefreshApp.js.map +1 -0
- package/abstractions/features/RunPulumiCommand.d.ts +19 -0
- package/abstractions/features/RunPulumiCommand.js +5 -0
- package/abstractions/features/RunPulumiCommand.js.map +1 -0
- package/abstractions/index.d.ts +21 -6
- package/abstractions/index.js +21 -6
- package/abstractions/pulumiTypes.d.ts +18 -0
- package/abstractions/pulumiTypes.js +0 -0
- package/abstractions/services/GetPulumiService.d.ts +20 -0
- package/abstractions/services/GetPulumiService.js +5 -0
- package/abstractions/services/GetPulumiService.js.map +1 -0
- package/abstractions/services/GetPulumiVersionService.d.ts +12 -0
- package/abstractions/services/GetPulumiVersionService.js +5 -0
- package/abstractions/services/GetPulumiVersionService.js.map +1 -0
- package/abstractions/services/IsRemotePulumiBackendService.d.ts +7 -0
- package/abstractions/services/IsRemotePulumiBackendService.js +5 -0
- package/abstractions/services/IsRemotePulumiBackendService.js.map +1 -0
- package/abstractions/services/ListAppLambdaFunctionsService.d.ts +23 -0
- package/abstractions/services/ListAppLambdaFunctionsService.js +5 -0
- package/abstractions/services/ListAppLambdaFunctionsService.js.map +1 -0
- package/abstractions/services/ListDeployedEnvironmentsService.d.ts +12 -0
- package/abstractions/services/ListDeployedEnvironmentsService.js +5 -0
- package/abstractions/services/ListDeployedEnvironmentsService.js.map +1 -0
- package/abstractions/services/PulumiExportService.d.ts +13 -0
- package/abstractions/services/PulumiExportService.js +6 -0
- package/abstractions/services/PulumiExportService.js.map +1 -0
- package/abstractions/services/PulumiGetConfigPassphraseService.d.ts +7 -0
- package/abstractions/services/PulumiGetConfigPassphraseService.js +5 -0
- package/abstractions/services/PulumiGetConfigPassphraseService.js.map +1 -0
- package/abstractions/services/PulumiGetSecretsProviderService.d.ts +7 -0
- package/abstractions/services/PulumiGetSecretsProviderService.js +5 -0
- package/abstractions/services/PulumiGetSecretsProviderService.js.map +1 -0
- package/abstractions/services/PulumiGetStackOutputService.d.ts +13 -0
- package/abstractions/services/PulumiGetStackOutputService.js +5 -0
- package/abstractions/services/PulumiGetStackOutputService.js.map +1 -0
- package/abstractions/services/PulumiImportService.d.ts +8 -0
- package/abstractions/services/PulumiImportService.js +5 -0
- package/abstractions/services/PulumiImportService.js.map +1 -0
- package/abstractions/services/PulumiLoginService.d.ts +19 -0
- package/abstractions/services/PulumiLoginService.js +5 -0
- package/abstractions/services/PulumiLoginService.js.map +1 -0
- package/abstractions/services/PulumiSelectStackService.d.ts +10 -0
- package/abstractions/services/PulumiSelectStackService.js +5 -0
- package/abstractions/services/PulumiSelectStackService.js.map +1 -0
- package/abstractions/services/StackOutputCacheService.d.ts +10 -0
- package/abstractions/services/StackOutputCacheService.js +5 -0
- package/abstractions/services/StackOutputCacheService.js.map +1 -0
- package/abstractions/services/WatchedLambdaFunctionsService.d.ts +28 -0
- package/abstractions/services/WatchedLambdaFunctionsService.js +5 -0
- package/abstractions/services/WatchedLambdaFunctionsService.js.map +1 -0
- package/api.d.ts +1 -15
- package/api.js +1 -3
- package/api.js.map +1 -1
- package/decorators/DeployAppClearWatchedLambdaFunctions.d.ts +20 -0
- package/decorators/DeployAppClearWatchedLambdaFunctions.js +35 -0
- package/decorators/DeployAppClearWatchedLambdaFunctions.js.map +1 -0
- package/decorators/DeployAppRefreshStackOutputCache.d.ts +20 -0
- package/decorators/DeployAppRefreshStackOutputCache.js +34 -0
- package/decorators/DeployAppRefreshStackOutputCache.js.map +1 -0
- package/decorators/DeployAppWithHooks.d.ts +25 -0
- package/decorators/DeployAppWithHooks.js +58 -0
- package/decorators/DeployAppWithHooks.js.map +1 -0
- package/decorators/DeployAppWithWatchedLambdaReplacement.d.ts +20 -0
- package/decorators/DeployAppWithWatchedLambdaReplacement.js +42 -0
- package/decorators/DeployAppWithWatchedLambdaReplacement.js.map +1 -0
- package/decorators/DestroyAppClearStackOutputCache.d.ts +28 -0
- package/decorators/DestroyAppClearStackOutputCache.js +31 -0
- package/decorators/DestroyAppClearStackOutputCache.js.map +1 -0
- package/decorators/GetPulumiServiceWithDownloadInfo.d.ts +13 -0
- package/decorators/GetPulumiServiceWithDownloadInfo.js +28 -0
- package/decorators/GetPulumiServiceWithDownloadInfo.js.map +1 -0
- package/decorators/ProjectInfoWithPulumi.d.ts +34 -0
- package/decorators/ProjectInfoWithPulumi.js +36 -0
- package/decorators/ProjectInfoWithPulumi.js.map +1 -0
- package/exports/infra/admin.d.ts +1 -3
- package/exports/infra/admin.js +0 -3
- package/exports/infra/api.d.ts +1 -3
- package/exports/infra/api.js +0 -3
- package/exports/infra/core.d.ts +1 -2
- package/exports/infra/core.js +0 -2
- package/extensions/ApiLambdaFunction.js +3 -2
- package/extensions/ApiLambdaFunction.js.map +1 -1
- package/extensions/ApiRoute.d.ts +7 -16
- package/extensions/ApiRoute.js +5 -73
- package/extensions/ApiRoute.js.map +1 -1
- package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.d.ts +3 -2
- package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js +2 -1
- package/extensions/OpenSearch/EnsureOsServiceRoleBeforeCoreDeploy.js.map +1 -1
- package/extensions/OpenSearch/EnsureOsWasDeployed.d.ts +3 -3
- package/extensions/OpenSearch/EnsureOsWasDeployed.js +1 -2
- package/extensions/OpenSearch/EnsureOsWasDeployed.js.map +1 -1
- package/extensions/OpenSearch.d.ts +9 -10
- package/extensions/OpenSearch.js +8 -16
- package/extensions/OpenSearch.js.map +1 -1
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.d.ts +3 -3
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js +3 -2
- package/extensions/ProjectAws/AutoInstall/AutoInstallAfterApiDeploy.js.map +1 -1
- package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.d.ts +3 -2
- package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js +2 -1
- package/extensions/ProjectAws/BlueGreenDeployments/EnsureVariantBeforeDeploy.js.map +1 -1
- package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.d.ts +5 -2
- package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js +3 -1
- package/extensions/ProjectAws/BlueGreenDeployments/PrintDeploymentInfoAfterDeploy.js.map +1 -1
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.d.ts +3 -1
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.js +2 -1
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminBuild.js.map +1 -1
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.d.ts +3 -1
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.js +2 -1
- package/extensions/ProjectAws/EnsureApiDeployedBeforeAdminWatch.js.map +1 -1
- package/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.d.ts +3 -1
- package/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.js +2 -1
- package/extensions/ProjectAws/EnsureApiDeployedBeforeWatch.js.map +1 -1
- package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.d.ts +3 -2
- package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js +3 -2
- package/extensions/ProjectAws/EnsureAwsCredentialsBeforeDeploy.js.map +1 -1
- package/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.d.ts +4 -2
- package/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.js +3 -1
- package/extensions/ProjectAws/EnsureCoreDeployedBeforeApiDeploy.js.map +1 -1
- package/extensions/ProjectAws/EnsureTelemetryEnabledForOss.d.ts +6 -2
- package/extensions/ProjectAws/EnsureTelemetryEnabledForOss.js +2 -1
- package/extensions/ProjectAws/EnsureTelemetryEnabledForOss.js.map +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.d.ts +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.js +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVars.js.map +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.d.ts +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeBuild.js.map +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.d.ts +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js +1 -1
- package/extensions/ProjectAws/SetAdminEnvVars/SetAdminEnvVarsBeforeWatch.js.map +1 -1
- package/extensions/ProjectAws/SetDatabaseSetupOutput.d.ts +2 -2
- package/extensions/ProjectAws/SetDatabaseSetupOutput.js +1 -1
- package/extensions/ProjectAws/SetDatabaseSetupOutput.js.map +1 -1
- package/extensions/ProjectAws/TelemetryNoLongerNewUser.d.ts +2 -2
- package/extensions/ProjectAws/TelemetryNoLongerNewUser.js +1 -1
- package/extensions/ProjectAws/TelemetryNoLongerNewUser.js.map +1 -1
- package/extensions/ProjectAws/UploadAdminAppToS3.d.ts +5 -3
- package/extensions/ProjectAws/UploadAdminAppToS3.js +3 -3
- package/extensions/ProjectAws/UploadAdminAppToS3.js.map +1 -1
- package/extensions/ProjectAws/ValidateEncryptionBeforeDeploy.d.ts +5 -2
- package/extensions/ProjectAws/ValidateEncryptionBeforeDeploy.js +2 -1
- package/extensions/ProjectAws/ValidateEncryptionBeforeDeploy.js.map +1 -1
- package/extensions/ProjectAws/ValidateProductionPulumiState.d.ts +5 -2
- package/extensions/ProjectAws/ValidateProductionPulumiState.js +3 -1
- package/extensions/ProjectAws/ValidateProductionPulumiState.js.map +1 -1
- package/extensions/ProjectAws/definitions.js +6 -2
- package/extensions/ProjectAws/definitions.js.map +1 -1
- package/extensions/ProjectAws.d.ts +1 -0
- package/extensions/ProjectAws.js +3 -1
- package/extensions/ProjectAws.js.map +1 -1
- package/extensions/RegisterRoutesPulumi.d.ts +2 -2
- package/extensions/RegisterRoutesPulumi.js +4 -4
- package/extensions/RegisterRoutesPulumi.js.map +1 -1
- package/extensions/definitions.js +1 -5
- package/extensions/definitions.js.map +1 -1
- package/extensions/index.d.ts +2 -3
- package/extensions/index.js +2 -3
- package/extensions/registerExtensionImplementations.js +11 -0
- package/extensions/registerExtensionImplementations.js.map +1 -0
- package/extensions/toApiGatewayPath.d.ts +2 -0
- package/extensions/toApiGatewayPath.js +6 -0
- package/extensions/toApiGatewayPath.js.map +1 -0
- package/features/ApiGqlClient.d.ts +4 -4
- package/features/ApiGqlClient.js +3 -3
- package/features/ApiGqlClient.js.map +1 -1
- package/features/DeployApp/DeployApp.d.ts +22 -0
- package/features/DeployApp/DeployApp.js +91 -0
- package/features/DeployApp/DeployApp.js.map +1 -0
- package/features/DeployApp/index.d.ts +1 -0
- package/features/DeployApp/index.js +1 -0
- package/features/DestroyApp/DestroyApp.d.ts +20 -0
- package/features/DestroyApp/DestroyApp.js +70 -0
- package/features/DestroyApp/DestroyApp.js.map +1 -0
- package/features/DestroyApp/index.d.ts +1 -0
- package/features/DestroyApp/index.js +1 -0
- package/features/ExportStack/ExportStack.d.ts +12 -0
- package/features/ExportStack/ExportStack.js +28 -0
- package/features/ExportStack/ExportStack.js.map +1 -0
- package/features/ExportStack/index.d.ts +1 -0
- package/features/ExportStack/index.js +1 -0
- package/features/GetAppOutput/GetAppOutput.d.ts +16 -0
- package/features/GetAppOutput/GetAppOutput.js +55 -0
- package/features/GetAppOutput/GetAppOutput.js.map +1 -0
- package/features/GetAppOutput/index.d.ts +1 -0
- package/features/GetAppOutput/index.js +1 -0
- package/features/GetAppStackOutput/GetAppStackOutput.d.ts +13 -0
- package/features/GetAppStackOutput/GetAppStackOutput.js +28 -0
- package/features/GetAppStackOutput/GetAppStackOutput.js.map +1 -0
- package/features/GetAppStackOutput/index.d.ts +1 -0
- package/features/GetAppStackOutput/index.js +1 -0
- package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.d.ts +8 -0
- package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.js +26 -0
- package/features/GetPulumiResourceNamePrefix/GetPulumiResourceNamePrefix.js.map +1 -0
- package/features/GetPulumiResourceNamePrefix/index.d.ts +1 -0
- package/features/GetPulumiResourceNamePrefix/index.js +1 -0
- package/features/InvokeLambdaFunction.d.ts +3 -3
- package/features/InvokeLambdaFunction.js +3 -3
- package/features/InvokeLambdaFunction.js.map +1 -1
- package/features/RefreshApp/RefreshApp.d.ts +18 -0
- package/features/RefreshApp/RefreshApp.js +68 -0
- package/features/RefreshApp/RefreshApp.js.map +1 -0
- package/features/RefreshApp/index.d.ts +1 -0
- package/features/RefreshApp/index.js +1 -0
- package/features/RunPulumiCommand/RunPulumiCommand.d.ts +18 -0
- package/features/RunPulumiCommand/RunPulumiCommand.js +65 -0
- package/features/RunPulumiCommand/RunPulumiCommand.js.map +1 -0
- package/features/RunPulumiCommand/index.d.ts +1 -0
- package/features/RunPulumiCommand/index.js +1 -0
- package/features/Watch/AwsWatch.d.ts +9 -1
- package/features/Watch/AwsWatch.js +8 -4
- package/features/Watch/AwsWatch.js.map +1 -1
- package/features/Watch/getIotEndpoint.d.ts +2 -2
- package/features/Watch/getIotEndpoint.js.map +1 -1
- package/features/Watch/initInvocationForwarding.d.ts +9 -0
- package/features/Watch/initInvocationForwarding.js +91 -0
- package/features/Watch/initInvocationForwarding.js.map +1 -0
- package/features/Watch/localInvocationWorker.d.ts +1 -0
- package/features/Watch/localInvocationWorker.js +31 -0
- package/features/Watch/localInvocationWorker.js.map +1 -0
- package/features/Watch/replaceLambdaFunctions.d.ts +7 -3
- package/features/Watch/replaceLambdaFunctions.js.map +1 -1
- package/features/hooks/AdminAfterDeploy/AdminAfterDeploy.d.ts +7 -0
- package/features/hooks/AdminAfterDeploy/AdminAfterDeploy.js +25 -0
- package/features/hooks/AdminAfterDeploy/AdminAfterDeploy.js.map +1 -0
- package/features/hooks/AdminAfterDeploy/index.d.ts +1 -0
- package/features/hooks/AdminAfterDeploy/index.js +1 -0
- package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.d.ts +7 -0
- package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.js +25 -0
- package/features/hooks/AdminBeforeDeploy/AdminBeforeDeploy.js.map +1 -0
- package/features/hooks/AdminBeforeDeploy/index.d.ts +1 -0
- package/features/hooks/AdminBeforeDeploy/index.js +1 -0
- package/features/hooks/AfterDeploy/AfterDeploy.d.ts +7 -0
- package/features/hooks/AfterDeploy/AfterDeploy.js +25 -0
- package/features/hooks/AfterDeploy/AfterDeploy.js.map +1 -0
- package/features/hooks/AfterDeploy/index.d.ts +1 -0
- package/features/hooks/AfterDeploy/index.js +1 -0
- package/features/hooks/ApiAfterDeploy/ApiAfterDeploy.d.ts +7 -0
- package/features/hooks/ApiAfterDeploy/ApiAfterDeploy.js +25 -0
- package/features/hooks/ApiAfterDeploy/ApiAfterDeploy.js.map +1 -0
- package/features/hooks/ApiAfterDeploy/index.d.ts +1 -0
- package/features/hooks/ApiAfterDeploy/index.js +1 -0
- package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.d.ts +7 -0
- package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.js +25 -0
- package/features/hooks/ApiBeforeDeploy/ApiBeforeDeploy.js.map +1 -0
- package/features/hooks/ApiBeforeDeploy/index.d.ts +1 -0
- package/features/hooks/ApiBeforeDeploy/index.js +1 -0
- package/features/hooks/BeforeDeploy/BeforeDeploy.d.ts +7 -0
- package/features/hooks/BeforeDeploy/BeforeDeploy.js +25 -0
- package/features/hooks/BeforeDeploy/BeforeDeploy.js.map +1 -0
- package/features/hooks/BeforeDeploy/index.d.ts +1 -0
- package/features/hooks/BeforeDeploy/index.js +1 -0
- package/features/hooks/CoreAfterDeploy/CoreAfterDeploy.d.ts +7 -0
- package/features/hooks/CoreAfterDeploy/CoreAfterDeploy.js +25 -0
- package/features/hooks/CoreAfterDeploy/CoreAfterDeploy.js.map +1 -0
- package/features/hooks/CoreAfterDeploy/index.d.ts +1 -0
- package/features/hooks/CoreAfterDeploy/index.js +1 -0
- package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.d.ts +7 -0
- package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.js +25 -0
- package/features/hooks/CoreBeforeDeploy/CoreBeforeDeploy.js.map +1 -0
- package/features/hooks/CoreBeforeDeploy/index.d.ts +1 -0
- package/features/hooks/CoreBeforeDeploy/index.js +1 -0
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/infra.d.ts +49 -2
- package/infra.js +16 -4
- package/infra.js.map +1 -1
- package/package.json +26 -23
- package/project.d.ts +12 -1
- package/project.js +3 -2
- package/project.js.map +1 -1
- package/pulumi/apps/admin/createAdminPulumiApp.js +7 -4
- package/pulumi/apps/admin/createAdminPulumiApp.js.map +1 -1
- package/pulumi/apps/api/ApiCloudfront.js +2 -1
- package/pulumi/apps/api/ApiCloudfront.js.map +1 -1
- package/pulumi/apps/api/ApiOutput.d.ts +6 -6
- package/pulumi/apps/api/createApiPulumiApp.js +9 -7
- package/pulumi/apps/api/createApiPulumiApp.js.map +1 -1
- package/pulumi/apps/awsUtils.js +1 -1
- package/pulumi/apps/awsUtils.js.map +1 -1
- package/pulumi/apps/blueGreen/domains/resolveDomains.js +1 -1
- package/pulumi/apps/blueGreen/domains/resolveDomains.js.map +1 -1
- package/pulumi/apps/blueGreen/types.d.ts +2 -5
- package/pulumi/apps/common/CoreOutput.d.ts +2 -1
- package/pulumi/apps/common/CoreOutput.js.map +1 -1
- package/pulumi/apps/core/CoreAuditLogsDynamo.d.ts +1 -0
- package/pulumi/apps/core/CoreAuditLogsDynamo.js +3 -0
- package/pulumi/apps/core/CoreAuditLogsDynamo.js.map +1 -1
- package/pulumi/apps/core/CoreDynamo.d.ts +1 -0
- package/pulumi/apps/core/CoreDynamo.js +3 -0
- package/pulumi/apps/core/CoreDynamo.js.map +1 -1
- package/pulumi/apps/core/CoreFileManager.d.ts +2 -0
- package/pulumi/apps/core/CoreFileManager.js +11 -1
- package/pulumi/apps/core/CoreFileManager.js.map +1 -1
- package/pulumi/apps/core/CoreOpenSearch.d.ts +1 -0
- package/pulumi/apps/core/CoreOpenSearch.js +3 -0
- package/pulumi/apps/core/CoreOpenSearch.js.map +1 -1
- package/pulumi/apps/core/configureS3BucketMalwareProtection.js +12 -2
- package/pulumi/apps/core/configureS3BucketMalwareProtection.js.map +1 -1
- package/pulumi/apps/core/createCorePulumiApp.js +16 -7
- package/pulumi/apps/core/createCorePulumiApp.js.map +1 -1
- package/pulumi/apps/customDomain.d.ts +10 -0
- package/pulumi/apps/customDomain.js +5 -1
- package/pulumi/apps/customDomain.js.map +1 -1
- package/pulumi/apps/extensions/getAwsTagsFromExtension.js +1 -1
- package/pulumi/apps/extensions/getAwsTagsFromExtension.js.map +1 -1
- package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.d.ts +2 -2
- package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.js +1 -1
- package/pulumi/apps/extensions/getBgDeploymentsConfigFromExtension.js.map +1 -1
- package/pulumi/apps/extensions/getOsConfigFromExtension.js +2 -2
- package/pulumi/apps/extensions/getOsConfigFromExtension.js.map +1 -1
- package/pulumi/apps/extensions/getVpcConfigFromExtension.js +1 -1
- package/pulumi/apps/extensions/getVpcConfigFromExtension.js.map +1 -1
- package/pulumi/apps/extensions/isProductionDefaultEnabled.d.ts +16 -0
- package/pulumi/apps/extensions/isProductionDefaultEnabled.js +9 -0
- package/pulumi/apps/extensions/isProductionDefaultEnabled.js.map +1 -0
- package/pulumi/apps/extensions/isVpcEnabled.d.ts +14 -0
- package/pulumi/apps/extensions/isVpcEnabled.js +8 -0
- package/pulumi/apps/extensions/isVpcEnabled.js.map +1 -0
- package/pulumi/apps/syncSystem/types.d.ts +2 -2
- package/pulumi/extensions/AdminPulumi.js +3 -2
- package/pulumi/extensions/AdminPulumi.js.map +1 -1
- package/pulumi/extensions/ApiPulumi.js +3 -2
- package/pulumi/extensions/ApiPulumi.js.map +1 -1
- package/pulumi/extensions/CorePulumi.js +3 -2
- package/pulumi/extensions/CorePulumi.js.map +1 -1
- package/pulumi/extensions/index.d.ts +53 -22
- package/pulumi/extensions/index.js +12 -9
- package/pulumi/extensions/index.js.map +1 -1
- package/pulumi/features/AdminPulumi/AdminPulumi.d.ts +1 -1
- package/pulumi/features/AdminPulumi/AdminPulumi.js +1 -1
- package/pulumi/features/AdminPulumi/AdminPulumi.js.map +1 -1
- package/pulumi/features/ApiPulumi/ApiPulumi.d.ts +1 -1
- package/pulumi/features/ApiPulumi/ApiPulumi.js +1 -1
- package/pulumi/features/ApiPulumi/ApiPulumi.js.map +1 -1
- package/pulumi/features/CorePulumi/CorePulumi.d.ts +1 -1
- package/pulumi/features/CorePulumi/CorePulumi.js +1 -1
- package/pulumi/features/CorePulumi/CorePulumi.js.map +1 -1
- package/pulumi/features/DefaultSetAdminCustomDomains.d.ts +1 -1
- package/pulumi/features/DefaultSetAdminCustomDomains.js.map +1 -1
- package/pulumi/features/DefaultSetApiCustomDomains.d.ts +1 -1
- package/pulumi/features/DefaultSetApiCustomDomains.js.map +1 -1
- package/pulumi/getAwsProjectSdk.d.ts +2 -12
- package/pulumi/getAwsProjectSdk.js +2 -3
- package/pulumi/getAwsProjectSdk.js.map +1 -1
- package/pulumi/getStackOutput.d.ts +4 -5
- package/pulumi/getStackOutput.js.map +1 -1
- package/pulumi/types.d.ts +4 -3
- package/pulumi/utils/getDistributionUrl.d.ts +9 -0
- package/pulumi/utils/getDistributionUrl.js +8 -0
- package/pulumi/utils/getDistributionUrl.js.map +1 -0
- package/pulumi/utils/index.d.ts +1 -0
- package/pulumi/utils/index.js +1 -0
- package/pulumi/utils/lambdaEnvVariables.js.map +1 -1
- package/registerAwsProjectFeatures.js +38 -9
- package/registerAwsProjectFeatures.js.map +1 -1
- package/services/AdminStackOutputService.d.ts +3 -3
- package/services/AdminStackOutputService.js +2 -2
- package/services/AdminStackOutputService.js.map +1 -1
- package/services/ApiStackOutputService.d.ts +3 -3
- package/services/ApiStackOutputService.js +2 -2
- package/services/ApiStackOutputService.js.map +1 -1
- package/services/AwsDeployInitHostingSdkService/AwsDeployInitHostingSdkService.d.ts +10 -0
- package/services/AwsDeployInitHostingSdkService/AwsDeployInitHostingSdkService.js +30 -0
- package/services/AwsDeployInitHostingSdkService/AwsDeployInitHostingSdkService.js.map +1 -0
- package/services/AwsPulumiInitHostingSdkService/AwsPulumiInitHostingSdkService.d.ts +9 -0
- package/services/AwsPulumiInitHostingSdkService/AwsPulumiInitHostingSdkService.js +24 -0
- package/services/AwsPulumiInitHostingSdkService/AwsPulumiInitHostingSdkService.js.map +1 -0
- package/services/CoreStackOutputService.d.ts +3 -3
- package/services/CoreStackOutputService.js +2 -2
- package/services/CoreStackOutputService.js.map +1 -1
- package/services/GetPulumiService/GetPulumiService.d.ts +4 -3
- package/services/GetPulumiService/GetPulumiService.js +3 -2
- package/services/GetPulumiService/GetPulumiService.js.map +1 -1
- package/services/GetPulumiVersionService/GetPulumiVersionService.d.ts +5 -0
- package/services/GetPulumiVersionService/GetPulumiVersionService.js +46 -0
- package/services/GetPulumiVersionService/GetPulumiVersionService.js.map +1 -0
- package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.d.ts +14 -0
- package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.js +15 -0
- package/services/IsRemotePulumiBackendService/IsRemotePulumiBackendService.js.map +1 -0
- package/services/IsRemotePulumiBackendService/index.d.ts +1 -0
- package/services/IsRemotePulumiBackendService/index.js +1 -0
- package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.d.ts +20 -0
- package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.js +63 -0
- package/services/ListAppLambdaFunctionsService/ListAppLambdaFunctionsService.js.map +1 -0
- package/services/ListAppLambdaFunctionsService/index.d.ts +1 -0
- package/services/ListAppLambdaFunctionsService/index.js +1 -0
- package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.d.ts +8 -0
- package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.js +31 -0
- package/services/ListDeployedEnvironmentsService/ListDeployedEnvironmentsService.js.map +1 -0
- package/services/ListDeployedEnvironmentsService/index.d.ts +1 -0
- package/services/ListDeployedEnvironmentsService/index.js +1 -0
- package/services/PulumiExportService/PulumiExportService.d.ts +16 -0
- package/services/PulumiExportService/PulumiExportService.js +54 -0
- package/services/PulumiExportService/PulumiExportService.js.map +1 -0
- package/services/PulumiExportService/index.d.ts +1 -0
- package/services/PulumiExportService/index.js +1 -0
- package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.d.ts +5 -0
- package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.js +15 -0
- package/services/PulumiGetConfigPassphraseService/PulumiGetConfigPassphraseService.js.map +1 -0
- package/services/PulumiGetConfigPassphraseService/index.d.ts +1 -0
- package/services/PulumiGetConfigPassphraseService/index.js +1 -0
- package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.d.ts +5 -0
- package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.js +15 -0
- package/services/PulumiGetSecretsProviderService/PulumiGetSecretsProviderService.js.map +1 -0
- package/services/PulumiGetSecretsProviderService/index.d.ts +1 -0
- package/services/PulumiGetSecretsProviderService/index.js +1 -0
- package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.d.ts +16 -0
- package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.js +69 -0
- package/services/PulumiGetStackOutputService/PulumiGetStackOutputService.js.map +1 -0
- package/services/PulumiGetStackOutputService/index.d.ts +1 -0
- package/services/PulumiGetStackOutputService/index.js +1 -0
- package/services/PulumiGetStackOutputService/mapStackOutput.d.ts +1 -0
- package/services/PulumiGetStackOutputService/mapStackOutput.js +22 -0
- package/services/PulumiGetStackOutputService/mapStackOutput.js.map +1 -0
- package/services/PulumiImportService/PulumiImportService.d.ts +13 -0
- package/services/PulumiImportService/PulumiImportService.js +64 -0
- package/services/PulumiImportService/PulumiImportService.js.map +1 -0
- package/services/PulumiImportService/index.d.ts +1 -0
- package/services/PulumiImportService/index.js +1 -0
- package/services/PulumiLoginService/PulumiLoginService.d.ts +13 -0
- package/services/PulumiLoginService/PulumiLoginService.js +59 -0
- package/services/PulumiLoginService/PulumiLoginService.js.map +1 -0
- package/services/PulumiLoginService/index.d.ts +1 -0
- package/services/PulumiLoginService/index.js +1 -0
- package/services/PulumiSelectStackService/PulumiSelectStackService.d.ts +20 -0
- package/services/PulumiSelectStackService/PulumiSelectStackService.js +106 -0
- package/services/PulumiSelectStackService/PulumiSelectStackService.js.map +1 -0
- package/services/PulumiSelectStackService/index.d.ts +1 -0
- package/services/PulumiSelectStackService/index.js +1 -0
- package/services/StackOutputCacheService/StackOutputCacheService.d.ts +21 -0
- package/services/StackOutputCacheService/StackOutputCacheService.js +90 -0
- package/services/StackOutputCacheService/StackOutputCacheService.js.map +1 -0
- package/services/StackOutputCacheService/index.d.ts +1 -0
- package/services/StackOutputCacheService/index.js +1 -0
- package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.d.ts +14 -0
- package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.js +55 -0
- package/services/WatchedLambdaFunctionsService/WatchedLambdaFunctionsService.js.map +1 -0
- package/services/WatchedLambdaFunctionsService/index.d.ts +1 -0
- package/services/WatchedLambdaFunctionsService/index.js +1 -0
- package/utils/withPulumiConfigPassphrase.d.ts +1 -0
- package/utils/withPulumiConfigPassphrase.js +7 -0
- package/utils/withPulumiConfigPassphrase.js.map +1 -0
- package/abstractions/ApiGqlClient.d.ts +0 -23
- package/abstractions/ApiGqlClient.js +0 -5
- package/abstractions/ApiGqlClient.js.map +0 -1
- package/abstractions/InvokeLambdaFunction.d.ts +0 -18
- package/abstractions/InvokeLambdaFunction.js +0 -5
- package/abstractions/InvokeLambdaFunction.js.map +0 -1
- package/abstractions/features/pulumi/AdminPulumi.d.ts +0 -9
- package/abstractions/features/pulumi/AdminPulumi.js +0 -5
- package/abstractions/features/pulumi/AdminPulumi.js.map +0 -1
- package/abstractions/features/pulumi/ApiPulumi.d.ts +0 -9
- package/abstractions/features/pulumi/ApiPulumi.js +0 -5
- package/abstractions/features/pulumi/ApiPulumi.js.map +0 -1
- package/abstractions/features/pulumi/CorePulumi.d.ts +0 -9
- package/abstractions/features/pulumi/CorePulumi.js +0 -5
- package/abstractions/features/pulumi/CorePulumi.js.map +0 -1
- package/abstractions/features/pulumi/SetAdminCustomDomains.d.ts +0 -9
- package/abstractions/features/pulumi/SetAdminCustomDomains.js +0 -5
- package/abstractions/features/pulumi/SetAdminCustomDomains.js.map +0 -1
- package/abstractions/features/pulumi/SetApiCustomDomains.d.ts +0 -9
- package/abstractions/features/pulumi/SetApiCustomDomains.js +0 -5
- package/abstractions/features/pulumi/SetApiCustomDomains.js.map +0 -1
- package/abstractions/features/pulumi/index.d.ts +0 -5
- package/abstractions/features/pulumi/index.js +0 -5
- package/abstractions/services/AdminStackOutputService.d.ts +0 -13
- package/abstractions/services/AdminStackOutputService.js +0 -5
- package/abstractions/services/AdminStackOutputService.js.map +0 -1
- package/abstractions/services/ApiStackOutputService.d.ts +0 -29
- package/abstractions/services/ApiStackOutputService.js +0 -5
- package/abstractions/services/ApiStackOutputService.js.map +0 -1
- package/abstractions/services/CoreStackOutputService.d.ts +0 -16
- package/abstractions/services/CoreStackOutputService.js +0 -5
- package/abstractions/services/CoreStackOutputService.js.map +0 -1
- package/exports/extensions.d.ts +0 -5
- package/exports/extensions.js +0 -5
- package/exports/infra.d.ts +0 -1
- package/exports/infra.js +0 -1
- package/extensions/AwsDefaultRegion.d.ts +0 -4
- package/extensions/AwsDefaultRegion.js +0 -23
- package/extensions/AwsDefaultRegion.js.map +0 -1
- package/extensions/BackgroundTasks.d.ts +0 -4
- package/extensions/BackgroundTasks.js +0 -24
- package/extensions/BackgroundTasks.js.map +0 -1
- package/extensions/Cms/ModelFieldCompression.d.ts +0 -4
- package/extensions/Cms/ModelFieldCompression.js +0 -24
- package/extensions/Cms/ModelFieldCompression.js.map +0 -1
- package/extensions/Mailer/Smtp.d.ts +0 -8
- package/extensions/Mailer/Smtp.js +0 -21
- package/extensions/Mailer/Smtp.js.map +0 -1
- package/extensions/Mailer/Smtp.test.js +0 -127
- package/extensions/Mailer/Smtp.test.js.map +0 -1
- package/extensions/Mailer/SmtpParamsSchema.d.ts +0 -9
- package/extensions/Mailer/SmtpParamsSchema.js +0 -17
- package/extensions/Mailer/SmtpParamsSchema.js.map +0 -1
- package/extensions/ProjectAws/AutoInstall.d.ts +0 -9
- package/extensions/ProjectAws/AutoInstall.js +0 -20
- package/extensions/ProjectAws/AutoInstall.js.map +0 -1
- package/extensions/routePath.d.ts +0 -20
- package/extensions/routePath.js +0 -13
- package/extensions/routePath.js.map +0 -1
- package/pulumi/extensions/AdminCustomDomains.d.ts +0 -9
- package/pulumi/extensions/AdminCustomDomains.js +0 -20
- package/pulumi/extensions/AdminCustomDomains.js.map +0 -1
- package/pulumi/extensions/ApiCustomDomains.d.ts +0 -9
- package/pulumi/extensions/ApiCustomDomains.js +0 -20
- package/pulumi/extensions/ApiCustomDomains.js.map +0 -1
- package/pulumi/extensions/AwsTags.d.ts +0 -4
- package/pulumi/extensions/AwsTags.js +0 -16
- package/pulumi/extensions/AwsTags.js.map +0 -1
- package/pulumi/extensions/BlueGreenDeployments.d.ts +0 -34
- package/pulumi/extensions/BlueGreenDeployments.js +0 -38
- package/pulumi/extensions/BlueGreenDeployments.js.map +0 -1
- package/pulumi/extensions/OpenSearch.d.ts +0 -10
- package/pulumi/extensions/OpenSearch.js +0 -21
- package/pulumi/extensions/OpenSearch.js.map +0 -1
- package/pulumi/extensions/Vpc.d.ts +0 -15
- package/pulumi/extensions/Vpc.js +0 -26
- package/pulumi/extensions/Vpc.js.map +0 -1
- /package/extensions/{Mailer/Smtp.test.d.ts → registerExtensionImplementations.d.ts} +0 -0
|
@@ -7,16 +7,16 @@ export declare const ApiOutput: import("@webiny/pulumi").PulumiAppModuleDefiniti
|
|
|
7
7
|
graphqlLambdaRoleName: string;
|
|
8
8
|
cognitoAppClientId: string;
|
|
9
9
|
cognitoUserPoolId: string;
|
|
10
|
-
cognitoUserPoolPasswordPolicy:
|
|
10
|
+
cognitoUserPoolPasswordPolicy: import("@webiny/project-extensions-aws/abstractions").IApiStackOutputPasswordPolicy;
|
|
11
11
|
dynamoDbTable: string;
|
|
12
12
|
region: string;
|
|
13
|
-
websocketApiId: string | number | boolean | string[] | number[] | undefined;
|
|
13
|
+
websocketApiId: string | number | boolean | object | string[] | number[] | undefined;
|
|
14
14
|
websocketApiUrl: string;
|
|
15
|
-
graphqlLambdaName: string | number | boolean | string[] | number[] | undefined;
|
|
16
|
-
backgroundTaskLambdaArn: string | number | boolean | string[] | number[] | undefined;
|
|
17
|
-
backgroundTaskStepFunctionArn: string | number | boolean | string[] | number[] | undefined;
|
|
15
|
+
graphqlLambdaName: string | number | boolean | object | string[] | number[] | undefined;
|
|
16
|
+
backgroundTaskLambdaArn: string | number | boolean | object | string[] | number[] | undefined;
|
|
17
|
+
backgroundTaskStepFunctionArn: string | number | boolean | object | string[] | number[] | undefined;
|
|
18
18
|
fileManagerManageLambdaArn: string;
|
|
19
19
|
fileManagerManageLambdaRole: string;
|
|
20
20
|
fileManagerManageLambdaRoleName: string;
|
|
21
|
-
fileManagerDownloadLambdaArn: string | number | boolean | string[] | number[] | undefined;
|
|
21
|
+
fileManagerDownloadLambdaArn: string | number | boolean | object | string[] | number[] | undefined;
|
|
22
22
|
}>>, void>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { createPulumiApp, isResourceOfType } from "@webiny/pulumi";
|
|
2
2
|
import { ApiBackgroundTask, ApiCloudfront, ApiFileManager, ApiGateway, ApiGraphql, ApiGraphqlStream, ApiWebsocket, CoreOutput, VpcConfig } from "../index.js";
|
|
3
|
-
import { addDomainsUrlsOutputs, withCommonLambdaEnvVariables, withServiceManifest } from "../../utils/index.js";
|
|
3
|
+
import { addDomainsUrlsOutputs, getDistributionUrl, withCommonLambdaEnvVariables, withServiceManifest } from "../../utils/index.js";
|
|
4
4
|
import { getEnvVariableAwsRegion } from "../../env/awsRegion.js";
|
|
5
5
|
import { applyAwsResourceTags, getAwsAccountId } from "../awsUtils.js";
|
|
6
6
|
import { ApiScheduler } from "./ApiScheduler.js";
|
|
7
7
|
import { getAwsProjectSdk } from "../../getAwsProjectSdk.js";
|
|
8
8
|
import { getVpcConfigFromExtension } from "../extensions/getVpcConfigFromExtension.js";
|
|
9
|
+
import { isVpcEnabled } from "../extensions/isVpcEnabled.js";
|
|
9
10
|
import { getOsConfigFromExtension } from "../extensions/getOsConfigFromExtension.js";
|
|
10
11
|
import { handleGuardDutyEvents } from "./handleGuardDutyEvents.js";
|
|
11
|
-
import { ApiPulumi, SetApiCustomDomains } from "
|
|
12
|
+
import { ApiPulumi, SetApiCustomDomains } from "@webiny/project-extensions-aws/abstractions/features/pulumi/index.js";
|
|
12
13
|
import { apiPulumi } from "../../features/ApiPulumi/index.js";
|
|
13
14
|
import { DefaultSetApiCustomDomains } from "../../features/DefaultSetApiCustomDomains.js";
|
|
14
|
-
import { ApiCustomDomains } from "
|
|
15
|
+
import { ApiCustomDomains } from "@webiny/project-extensions-aws/extensions/ApiCustomDomains.js";
|
|
15
16
|
import { applyCustomDomain } from "../customDomain.js";
|
|
16
17
|
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
17
18
|
const createApiPulumiApp = ()=>{
|
|
@@ -73,9 +74,8 @@ const createApiPulumiApp = ()=>{
|
|
|
73
74
|
app.addHandler(()=>pulumiHandlers.execute(app));
|
|
74
75
|
const isProduction = app.env.isProduction;
|
|
75
76
|
const core = app.addModule(CoreOutput);
|
|
76
|
-
const vpcEnabled = true === vpcExtensionsConfig || "object" == typeof vpcExtensionsConfig || isProduction;
|
|
77
77
|
app.addModule(VpcConfig, {
|
|
78
|
-
enabled:
|
|
78
|
+
enabled: isVpcEnabled(vpcExtensionsConfig, isProduction)
|
|
79
79
|
});
|
|
80
80
|
const graphqlEnv = {
|
|
81
81
|
COGNITO_REGION: getEnvVariableAwsRegion(),
|
|
@@ -157,11 +157,12 @@ const createApiPulumiApp = ()=>{
|
|
|
157
157
|
const scheduler = app.addModule(ApiScheduler);
|
|
158
158
|
const [apiCustomDomains] = projectConfig.extensionsByType(ApiCustomDomains);
|
|
159
159
|
if (apiCustomDomains) {
|
|
160
|
-
const { domains, sslMethod, certificateArn } = apiCustomDomains.params;
|
|
160
|
+
const { domains, sslMethod, certificateArn, minimumProtocolVersion } = apiCustomDomains.params;
|
|
161
161
|
applyCustomDomain(cloudfront, {
|
|
162
162
|
domains,
|
|
163
163
|
sslSupportMethod: sslMethod,
|
|
164
|
-
acmCertificateArn: certificateArn
|
|
164
|
+
acmCertificateArn: certificateArn,
|
|
165
|
+
minimumProtocolVersion
|
|
165
166
|
});
|
|
166
167
|
}
|
|
167
168
|
app.addOutputs({
|
|
@@ -217,6 +218,7 @@ const createApiPulumiApp = ()=>{
|
|
|
217
218
|
app.addServiceManifest({
|
|
218
219
|
name: "api",
|
|
219
220
|
manifest: {
|
|
221
|
+
url: getDistributionUrl(baseApp.resources.cloudfront),
|
|
220
222
|
bgTaskSfn: baseApp.resources.backgroundTask.stepFunction.output.arn,
|
|
221
223
|
cloudfront: {
|
|
222
224
|
distributionId: baseApp.resources.cloudfront.output.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi/apps/api/createApiPulumiApp.js","sources":["../../../../src/pulumi/apps/api/createApiPulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createPulumiApp, isResourceOfType, type PulumiApp } from \"@webiny/pulumi\";\nimport {\n ApiBackgroundTask,\n ApiCloudfront,\n ApiFileManager,\n ApiGateway,\n ApiGraphql,\n ApiGraphqlStream,\n ApiWebsocket,\n CoreOutput,\n VpcConfig\n} from \"~/pulumi/apps/index.js\";\nimport {\n addDomainsUrlsOutputs,\n withCommonLambdaEnvVariables,\n withServiceManifest\n} from \"~/pulumi/utils/index.js\";\nimport { getEnvVariableAwsRegion } from \"~/pulumi/env/awsRegion.js\";\n// import { attachSyncSystem } from \"../syncSystem/api/index.js\";\nimport { applyAwsResourceTags, getAwsAccountId } from \"~/pulumi/apps/awsUtils.js\";\nimport type { WithServiceManifest } from \"~/pulumi/utils/withServiceManifest.js\";\nimport { ApiScheduler } from \"~/pulumi/apps/api/ApiScheduler.js\";\nimport { getAwsProjectSdk } from \"~/pulumi/getAwsProjectSdk.js\";\nimport { getVpcConfigFromExtension } from \"~/pulumi/apps/extensions/getVpcConfigFromExtension.js\";\nimport { getOsConfigFromExtension } from \"~/pulumi/apps/extensions/getOsConfigFromExtension.js\";\nimport { handleGuardDutyEvents } from \"./handleGuardDutyEvents.js\";\nimport { ApiPulumi, SetApiCustomDomains } from \"~/abstractions/features/pulumi/index.js\";\nimport { apiPulumi } from \"~/pulumi/features/ApiPulumi/index.js\";\nimport { DefaultSetApiCustomDomains } from \"~/pulumi/features/DefaultSetApiCustomDomains.js\";\nimport { ApiCustomDomains as apiCustomDomainsExt } from \"~/pulumi/extensions/ApiCustomDomains.js\";\nimport { applyCustomDomain } from \"~/pulumi/apps/customDomain.js\";\n\nexport type ApiPulumiApp = ReturnType<typeof createApiPulumiApp>;\n\nexport const createApiPulumiApp = () => {\n const baseApp = createPulumiApp({\n name: \"api\",\n path: \"apps/api\",\n program: async (app: PulumiApp & WithServiceManifest) => {\n const sdk = await getAwsProjectSdk();\n const projectConfig = await sdk.getProjectConfig();\n\n const pulumiResourceNamePrefix = await sdk.getPulumiResourceNamePrefix();\n const vpcExtensionsConfig = getVpcConfigFromExtension(projectConfig);\n const openSearchExtensionConfig = getOsConfigFromExtension(projectConfig);\n\n let searchEngineParams: typeof openSearchExtensionConfig | null = null;\n\n if (openSearchExtensionConfig) {\n searchEngineParams = openSearchExtensionConfig;\n }\n\n if (searchEngineParams) {\n const params = searchEngineParams;\n if (typeof params === \"object\") {\n if (params.endpoint) {\n process.env.OPENSEARCH_ENDPOINT = params.endpoint;\n }\n\n if (params.domainName) {\n process.env.AWS_OS_DOMAIN_NAME = params.domainName;\n }\n\n if (params.indexPrefix) {\n process.env.OPENSEARCH_INDEX_PREFIX = params.indexPrefix;\n }\n\n if (params.sharedIndexes) {\n process.env.OPENSEARCH_SHARED_INDEXES = \"true\";\n }\n\n if (params.username) {\n process.env.OPENSEARCH_USERNAME = params.username;\n }\n\n if (params.password) {\n process.env.OPENSEARCH_PASSWORD = params.password;\n }\n }\n }\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 // <-------------------- Enterprise start -------------------->\n app.addHandler(async () => {\n const featureFlags = await sdk.getFeatureFlags();\n\n const usingAdvancedVpcParams =\n vpcExtensionsConfig && typeof vpcExtensionsConfig !== \"boolean\";\n\n if (featureFlags.isEnabled(\"fileManager.threatDetection\")) {\n handleGuardDutyEvents(app as ApiPulumiApp);\n }\n\n // Not using advanced VPC params? Then immediately exit.\n if (usingAdvancedVpcParams) {\n const { onResource, addResource } = app;\n const { useExistingVpc } = vpcExtensionsConfig;\n\n // 1. We first deal with \"existing VPC\" setup.\n if (useExistingVpc) {\n if (!useExistingVpc.lambdaFunctionsVpcConfig) {\n throw new Error(\n \"Cannot specify `useExistingVpc` parameter because the `lambdaFunctionsVpcConfig` parameter wasn't provided.\"\n );\n }\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.lambda.Function)) {\n const canUseVpc = resource.meta.canUseVpc !== false;\n if (canUseVpc) {\n resource.config.vpcConfig(\n useExistingVpc!.lambdaFunctionsVpcConfig\n );\n }\n }\n\n if (isResourceOfType(resource, aws.iam.Role)) {\n if (resource.meta.isLambdaFunctionRole) {\n addResource(aws.iam.RolePolicyAttachment, {\n name: `${resource.name}-vpc-access-execution-role`,\n config: {\n role: resource.output.name,\n policyArn:\n aws.iam.ManagedPolicy\n .AWSLambdaVPCAccessExecutionRole\n }\n });\n }\n }\n });\n }\n }\n });\n // <-------------------- Enterprise end -------------------->\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 sdk.getContainer().registerComposite(apiPulumi);\n\n // Make the `SetApiCustomDomains` service injectable into user-defined `ApiPulumi`\n // implementations. This allows applying custom domains using dynamically created\n // Pulumi resources (e.g. ACM certificates), from within a single implementation file.\n // We register an instance (bound to the current `app`) so that user implementations\n // only need to pass the custom domain params - not the `app` itself.\n sdk.getContainer().registerInstance(\n SetApiCustomDomains,\n new DefaultSetApiCustomDomains(app as ApiPulumiApp)\n );\n\n const pulumiHandlers = sdk.getContainer().resolve(ApiPulumi);\n\n app.addHandler(() => {\n return pulumiHandlers.execute(app as ApiPulumiApp);\n });\n\n const isProduction = app.env.isProduction;\n\n // Register core output as a module available to all the other modules\n const core = app.addModule(CoreOutput);\n\n // Register VPC config module to be available to other modules.\n const vpcEnabled =\n vpcExtensionsConfig === true ||\n typeof vpcExtensionsConfig === \"object\" ||\n isProduction;\n\n app.addModule(VpcConfig, { enabled: vpcEnabled });\n\n // Shared by the buffered `graphql` function and its response-streaming twin: both run the\n // same code bundle, so they must see the same environment.\n const graphqlEnv = {\n COGNITO_REGION: getEnvVariableAwsRegion(),\n COGNITO_USER_POOL_ID: core.cognitoUserPoolId,\n DB_TABLE: core.primaryDynamodbTableName,\n DB_TABLE_AUDIT_LOGS: core.auditLogsDynamodbTableName,\n DB_TABLE_OPENSEARCH: core.opensearchDynamodbTableName,\n OPENSEARCH_ENDPOINT: core.opensearchDomainEndpoint,\n\n // Not required. Useful for testing purposes / ephemeral environments.\n // https://www.webiny.com/docs/key-topics/ci-cd/testing/slow-ephemeral-environments\n OPENSEARCH_INDEX_PREFIX: process.env.OPENSEARCH_INDEX_PREFIX,\n OPENSEARCH_SHARED_INDEXES: process.env.OPENSEARCH_SHARED_INDEXES,\n OPENSEARCH_USERNAME: process.env.OPENSEARCH_USERNAME,\n OPENSEARCH_PASSWORD: process.env.OPENSEARCH_PASSWORD,\n\n S3_BUCKET: core.fileManagerBucketId,\n EVENT_BUS: core.eventBusArn,\n // TODO: move to okta plugin\n OKTA_ISSUER: process.env[\"OKTA_ISSUER\"]\n };\n\n const graphql = app.addModule(ApiGraphql, { env: graphqlEnv });\n\n // Second Lambda function off the same bundle, fronted by a Function URL instead of API\n // Gateway, because API Gateway buffers the whole response and cannot stream. Added before\n // ApiCloudfront, which resolves this module to wire the `/stream/*` origin and behavior.\n const graphqlStream = app.addModule(ApiGraphqlStream, { env: graphqlEnv });\n\n const websocket = app.addModule(ApiWebsocket);\n\n const fileManager = app.addModule(ApiFileManager, {\n env: {\n DB_TABLE: core.primaryDynamodbTableName,\n DB_TABLE_AUDIT_LOGS: core.auditLogsDynamodbTableName\n }\n });\n\n const apiGateway = app.addModule(ApiGateway, {\n \"graphql-post\": {\n path: \"/graphql\",\n method: \"POST\",\n function: graphql.functions.graphql.output.arn\n },\n \"graphql-options\": {\n path: \"/graphql\",\n method: \"OPTIONS\",\n function: graphql.functions.graphql.output.arn\n },\n \"files-any\": {\n path: \"/files/{path+}\",\n method: \"ANY\",\n function: fileManager.functions.download.output.arn\n },\n \"private-any\": {\n path: \"/private/{path+}\",\n method: \"ANY\",\n function: fileManager.functions.download.output.arn\n },\n \"cms-post\": {\n path: \"/cms/{key+}\",\n method: \"POST\",\n function: graphql.functions.graphql.output.arn\n },\n \"cms-options\": {\n path: \"/cms/{key+}\",\n method: \"OPTIONS\",\n function: graphql.functions.graphql.output.arn\n },\n \"redirects-get\": {\n path: \"/wb/redirects\",\n method: \"GET\",\n function: graphql.functions.graphql.output.arn\n },\n \"redirects-options\": {\n path: \"/wb/redirects\",\n method: \"OPTIONS\",\n function: graphql.functions.graphql.output.arn\n },\n \"files-catch-all\": {\n path: \"/{path+}\",\n method: \"ANY\",\n function: fileManager.functions.download.output.arn\n }\n });\n\n const cloudfront = app.addModule(ApiCloudfront);\n const backgroundTask = app.addModule(ApiBackgroundTask);\n const scheduler = app.addModule(ApiScheduler);\n\n const [apiCustomDomains] = projectConfig.extensionsByType(apiCustomDomainsExt);\n if (apiCustomDomains) {\n const { domains, sslMethod, certificateArn } = apiCustomDomains.params;\n applyCustomDomain(cloudfront, {\n domains,\n sslSupportMethod: sslMethod,\n acmCertificateArn: certificateArn\n });\n }\n\n app.addOutputs({\n awsAccountId: getAwsAccountId(app),\n region: aws.config.region,\n cognitoUserPoolId: core.cognitoUserPoolId,\n cognitoAppClientId: core.cognitoAppClientId,\n cognitoUserPoolPasswordPolicy: core.cognitoUserPoolPasswordPolicy,\n dynamoDbTable: core.primaryDynamodbTableName,\n auditLogsDynamoDbTable: core.auditLogsDynamodbTableName,\n graphqlLambdaName: graphql.functions.graphql.output.name,\n graphqlLambdaRole: graphql.role.output.arn,\n graphqlLambdaRoleName: graphql.role.output.name,\n graphqlStreamLambdaName: graphqlStream.functions.graphqlStream.output.name,\n graphqlStreamFunctionUrl: graphqlStream.functionUrl.output.functionUrl,\n backgroundTaskLambdaArn: backgroundTask.backgroundTask.output.arn,\n backgroundTaskStepFunctionArn: backgroundTask.stepFunction.output.arn,\n fileManagerDownloadLambdaArn: fileManager.functions.download.output.arn,\n websocketApiId: websocket.websocketApi.output.id,\n websocketApiUrl: websocket.websocketApiUrl,\n schedulerLambdaInvokeRole: scheduler.invokeRole.output.arn\n });\n\n // Only add `dynamoDbOpensearchTable` output if using search engine (ES/OS).\n if (searchEngineParams) {\n app.addOutputs({\n dynamoDbOpensearchTable: core.opensearchDynamodbTableName\n });\n }\n\n app.addHandler(() => {\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: cloudfront,\n map: {\n distributionDomain: \"cloudfrontApiDomain\",\n distributionUrl: \"cloudfrontApiUrl\",\n usedDomain: \"apiDomain\",\n usedUrl: \"apiUrl\"\n }\n });\n });\n // /**\n // * We need to attach the Sync System if it exists.\n // */\n // await attachSyncSystem({\n // app,\n // core,\n // env: app.params.run.env\n // });\n\n // Applies internal and user-defined AWS tags.\n await applyAwsResourceTags(\"api\");\n\n return {\n fileManager,\n graphql,\n graphqlStream,\n apiGateway,\n websocket,\n cloudfront,\n backgroundTask,\n scheduler\n };\n }\n });\n\n const app = withServiceManifest(withCommonLambdaEnvVariables(baseApp));\n\n app.addHandler(() => {\n app.addServiceManifest({\n name: \"api\",\n manifest: {\n bgTaskSfn: baseApp.resources.backgroundTask.stepFunction.output.arn,\n cloudfront: {\n distributionId: baseApp.resources.cloudfront.output.id,\n domain: baseApp.resources.cloudfront.output.domainName.apply(\n v => `https://${v}`\n )\n }\n }\n });\n\n app.addServiceManifest({\n name: \"scheduler\",\n manifest: {\n lambdaArn: baseApp.resources.graphql.functions.graphql.output.arn,\n roleArn: baseApp.resources.scheduler.invokeRole.output.arn\n }\n });\n });\n\n return app;\n};\n"],"names":["createApiPulumiApp","baseApp","createPulumiApp","app","sdk","getAwsProjectSdk","projectConfig","pulumiResourceNamePrefix","vpcExtensionsConfig","getVpcConfigFromExtension","openSearchExtensionConfig","getOsConfigFromExtension","searchEngineParams","params","process","resource","featureFlags","usingAdvancedVpcParams","handleGuardDutyEvents","onResource","addResource","useExistingVpc","Error","isResourceOfType","aws","canUseVpc","apiPulumi","SetApiCustomDomains","DefaultSetApiCustomDomains","pulumiHandlers","ApiPulumi","isProduction","core","CoreOutput","vpcEnabled","VpcConfig","graphqlEnv","getEnvVariableAwsRegion","graphql","ApiGraphql","graphqlStream","ApiGraphqlStream","websocket","ApiWebsocket","fileManager","ApiFileManager","apiGateway","ApiGateway","cloudfront","ApiCloudfront","backgroundTask","ApiBackgroundTask","scheduler","ApiScheduler","apiCustomDomains","apiCustomDomainsExt","domains","sslMethod","certificateArn","applyCustomDomain","getAwsAccountId","addDomainsUrlsOutputs","applyAwsResourceTags","withServiceManifest","withCommonLambdaEnvVariables","v"],"mappings":";;;;;;;;;;;;;;;;AAmCO,MAAMA,qBAAqB;IAC9B,MAAMC,UAAUC,gBAAgB;QAC5B,MAAM;QACN,MAAM;QACN,SAAS,OAAOC;YACZ,MAAMC,MAAM,MAAMC;YAClB,MAAMC,gBAAgB,MAAMF,IAAI,gBAAgB;YAEhD,MAAMG,2BAA2B,MAAMH,IAAI,2BAA2B;YACtE,MAAMI,sBAAsBC,0BAA0BH;YACtD,MAAMI,4BAA4BC,yBAAyBL;YAE3D,IAAIM,qBAA8D;YAElE,IAAIF,2BACAE,qBAAqBF;YAGzB,IAAIE,oBAAoB;gBACpB,MAAMC,SAASD;gBACf,IAAI,AAAkB,YAAlB,OAAOC,QAAqB;oBAC5B,IAAIA,OAAO,QAAQ,EACfC,QAAQ,GAAG,CAAC,mBAAmB,GAAGD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pulumi/apps/api/createApiPulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createPulumiApp, isResourceOfType, type PulumiApp } from \"@webiny/pulumi\";\nimport {\n ApiBackgroundTask,\n ApiCloudfront,\n ApiFileManager,\n ApiGateway,\n ApiGraphql,\n ApiGraphqlStream,\n ApiWebsocket,\n CoreOutput,\n VpcConfig\n} from \"~/pulumi/apps/index.js\";\nimport {\n addDomainsUrlsOutputs,\n getDistributionUrl,\n withCommonLambdaEnvVariables,\n withServiceManifest\n} from \"~/pulumi/utils/index.js\";\nimport { getEnvVariableAwsRegion } from \"~/pulumi/env/awsRegion.js\";\n// import { attachSyncSystem } from \"../syncSystem/api/index.js\";\nimport { applyAwsResourceTags, getAwsAccountId } from \"~/pulumi/apps/awsUtils.js\";\nimport type { WithServiceManifest } from \"~/pulumi/utils/withServiceManifest.js\";\nimport { ApiScheduler } from \"~/pulumi/apps/api/ApiScheduler.js\";\nimport { getAwsProjectSdk } from \"~/pulumi/getAwsProjectSdk.js\";\nimport { getVpcConfigFromExtension } from \"~/pulumi/apps/extensions/getVpcConfigFromExtension.js\";\nimport { isVpcEnabled } from \"~/pulumi/apps/extensions/isVpcEnabled.js\";\nimport { getOsConfigFromExtension } from \"~/pulumi/apps/extensions/getOsConfigFromExtension.js\";\nimport { handleGuardDutyEvents } from \"./handleGuardDutyEvents.js\";\nimport {\n ApiPulumi,\n SetApiCustomDomains\n} from \"@webiny/project-extensions-aws/abstractions/features/pulumi/index.js\";\nimport { apiPulumi } from \"~/pulumi/features/ApiPulumi/index.js\";\nimport { DefaultSetApiCustomDomains } from \"~/pulumi/features/DefaultSetApiCustomDomains.js\";\nimport { ApiCustomDomains as apiCustomDomainsExt } from \"@webiny/project-extensions-aws/extensions/ApiCustomDomains.js\";\nimport { applyCustomDomain } from \"~/pulumi/apps/customDomain.js\";\n\nexport type ApiPulumiApp = ReturnType<typeof createApiPulumiApp>;\n\nexport const createApiPulumiApp = () => {\n const baseApp = createPulumiApp({\n name: \"api\",\n path: \"apps/api\",\n program: async (app: PulumiApp & WithServiceManifest) => {\n const sdk = await getAwsProjectSdk();\n const projectConfig = await sdk.getProjectConfig();\n\n const pulumiResourceNamePrefix = await sdk.getPulumiResourceNamePrefix();\n const vpcExtensionsConfig = getVpcConfigFromExtension(projectConfig);\n const openSearchExtensionConfig = getOsConfigFromExtension(projectConfig);\n\n let searchEngineParams: typeof openSearchExtensionConfig | null = null;\n\n if (openSearchExtensionConfig) {\n searchEngineParams = openSearchExtensionConfig;\n }\n\n if (searchEngineParams) {\n const params = searchEngineParams;\n if (typeof params === \"object\") {\n if (params.endpoint) {\n process.env.OPENSEARCH_ENDPOINT = params.endpoint;\n }\n\n if (params.domainName) {\n process.env.AWS_OS_DOMAIN_NAME = params.domainName;\n }\n\n if (params.indexPrefix) {\n process.env.OPENSEARCH_INDEX_PREFIX = params.indexPrefix;\n }\n\n if (params.sharedIndexes) {\n process.env.OPENSEARCH_SHARED_INDEXES = \"true\";\n }\n\n if (params.username) {\n process.env.OPENSEARCH_USERNAME = params.username;\n }\n\n if (params.password) {\n process.env.OPENSEARCH_PASSWORD = params.password;\n }\n }\n }\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 // <-------------------- Enterprise start -------------------->\n app.addHandler(async () => {\n const featureFlags = await sdk.getFeatureFlags();\n\n const usingAdvancedVpcParams =\n vpcExtensionsConfig && typeof vpcExtensionsConfig !== \"boolean\";\n\n if (featureFlags.isEnabled(\"fileManager.threatDetection\")) {\n handleGuardDutyEvents(app as ApiPulumiApp);\n }\n\n // Not using advanced VPC params? Then immediately exit.\n if (usingAdvancedVpcParams) {\n const { onResource, addResource } = app;\n const { useExistingVpc } = vpcExtensionsConfig;\n\n // 1. We first deal with \"existing VPC\" setup.\n if (useExistingVpc) {\n if (!useExistingVpc.lambdaFunctionsVpcConfig) {\n throw new Error(\n \"Cannot specify `useExistingVpc` parameter because the `lambdaFunctionsVpcConfig` parameter wasn't provided.\"\n );\n }\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.lambda.Function)) {\n const canUseVpc = resource.meta.canUseVpc !== false;\n if (canUseVpc) {\n resource.config.vpcConfig(\n useExistingVpc!.lambdaFunctionsVpcConfig\n );\n }\n }\n\n if (isResourceOfType(resource, aws.iam.Role)) {\n if (resource.meta.isLambdaFunctionRole) {\n addResource(aws.iam.RolePolicyAttachment, {\n name: `${resource.name}-vpc-access-execution-role`,\n config: {\n role: resource.output.name,\n policyArn:\n aws.iam.ManagedPolicy\n .AWSLambdaVPCAccessExecutionRole\n }\n });\n }\n }\n });\n }\n }\n });\n // <-------------------- Enterprise end -------------------->\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 sdk.getContainer().registerComposite(apiPulumi);\n\n // Make the `SetApiCustomDomains` service injectable into user-defined `ApiPulumi`\n // implementations. This allows applying custom domains using dynamically created\n // Pulumi resources (e.g. ACM certificates), from within a single implementation file.\n // We register an instance (bound to the current `app`) so that user implementations\n // only need to pass the custom domain params - not the `app` itself.\n sdk.getContainer().registerInstance(\n SetApiCustomDomains,\n new DefaultSetApiCustomDomains(app as ApiPulumiApp)\n );\n\n const pulumiHandlers = sdk.getContainer().resolve(ApiPulumi);\n\n app.addHandler(() => {\n return pulumiHandlers.execute(app as ApiPulumiApp);\n });\n\n const isProduction = app.env.isProduction;\n\n // Register core output as a module available to all the other modules\n const core = app.addModule(CoreOutput);\n\n // Register VPC config module to be available to other modules.\n app.addModule(VpcConfig, {\n enabled: isVpcEnabled(vpcExtensionsConfig, isProduction)\n });\n\n // Shared by the buffered `graphql` function and its response-streaming twin: both run the\n // same code bundle, so they must see the same environment.\n const graphqlEnv = {\n COGNITO_REGION: getEnvVariableAwsRegion(),\n COGNITO_USER_POOL_ID: core.cognitoUserPoolId,\n DB_TABLE: core.primaryDynamodbTableName,\n DB_TABLE_AUDIT_LOGS: core.auditLogsDynamodbTableName,\n DB_TABLE_OPENSEARCH: core.opensearchDynamodbTableName,\n OPENSEARCH_ENDPOINT: core.opensearchDomainEndpoint,\n\n // Not required. Useful for testing purposes / ephemeral environments.\n // https://www.webiny.com/docs/key-topics/ci-cd/testing/slow-ephemeral-environments\n OPENSEARCH_INDEX_PREFIX: process.env.OPENSEARCH_INDEX_PREFIX,\n OPENSEARCH_SHARED_INDEXES: process.env.OPENSEARCH_SHARED_INDEXES,\n OPENSEARCH_USERNAME: process.env.OPENSEARCH_USERNAME,\n OPENSEARCH_PASSWORD: process.env.OPENSEARCH_PASSWORD,\n\n S3_BUCKET: core.fileManagerBucketId,\n EVENT_BUS: core.eventBusArn,\n // TODO: move to okta plugin\n OKTA_ISSUER: process.env[\"OKTA_ISSUER\"]\n };\n\n const graphql = app.addModule(ApiGraphql, { env: graphqlEnv });\n\n // Second Lambda function off the same bundle, fronted by a Function URL instead of API\n // Gateway, because API Gateway buffers the whole response and cannot stream. Added before\n // ApiCloudfront, which resolves this module to wire the `/stream/*` origin and behavior.\n const graphqlStream = app.addModule(ApiGraphqlStream, { env: graphqlEnv });\n\n const websocket = app.addModule(ApiWebsocket);\n\n const fileManager = app.addModule(ApiFileManager, {\n env: {\n DB_TABLE: core.primaryDynamodbTableName,\n DB_TABLE_AUDIT_LOGS: core.auditLogsDynamodbTableName\n }\n });\n\n const apiGateway = app.addModule(ApiGateway, {\n \"graphql-post\": {\n path: \"/graphql\",\n method: \"POST\",\n function: graphql.functions.graphql.output.arn\n },\n \"graphql-options\": {\n path: \"/graphql\",\n method: \"OPTIONS\",\n function: graphql.functions.graphql.output.arn\n },\n \"files-any\": {\n path: \"/files/{path+}\",\n method: \"ANY\",\n function: fileManager.functions.download.output.arn\n },\n \"private-any\": {\n path: \"/private/{path+}\",\n method: \"ANY\",\n function: fileManager.functions.download.output.arn\n },\n \"cms-post\": {\n path: \"/cms/{key+}\",\n method: \"POST\",\n function: graphql.functions.graphql.output.arn\n },\n \"cms-options\": {\n path: \"/cms/{key+}\",\n method: \"OPTIONS\",\n function: graphql.functions.graphql.output.arn\n },\n \"redirects-get\": {\n path: \"/wb/redirects\",\n method: \"GET\",\n function: graphql.functions.graphql.output.arn\n },\n \"redirects-options\": {\n path: \"/wb/redirects\",\n method: \"OPTIONS\",\n function: graphql.functions.graphql.output.arn\n },\n \"files-catch-all\": {\n path: \"/{path+}\",\n method: \"ANY\",\n function: fileManager.functions.download.output.arn\n }\n });\n\n const cloudfront = app.addModule(ApiCloudfront);\n const backgroundTask = app.addModule(ApiBackgroundTask);\n const scheduler = app.addModule(ApiScheduler);\n\n const [apiCustomDomains] = projectConfig.extensionsByType(apiCustomDomainsExt);\n if (apiCustomDomains) {\n const { domains, sslMethod, certificateArn, minimumProtocolVersion } =\n apiCustomDomains.params;\n applyCustomDomain(cloudfront, {\n domains,\n sslSupportMethod: sslMethod,\n acmCertificateArn: certificateArn,\n minimumProtocolVersion\n });\n }\n\n app.addOutputs({\n awsAccountId: getAwsAccountId(app),\n region: aws.config.region,\n cognitoUserPoolId: core.cognitoUserPoolId,\n cognitoAppClientId: core.cognitoAppClientId,\n cognitoUserPoolPasswordPolicy: core.cognitoUserPoolPasswordPolicy,\n dynamoDbTable: core.primaryDynamodbTableName,\n auditLogsDynamoDbTable: core.auditLogsDynamodbTableName,\n graphqlLambdaName: graphql.functions.graphql.output.name,\n graphqlLambdaRole: graphql.role.output.arn,\n graphqlLambdaRoleName: graphql.role.output.name,\n graphqlStreamLambdaName: graphqlStream.functions.graphqlStream.output.name,\n graphqlStreamFunctionUrl: graphqlStream.functionUrl.output.functionUrl,\n backgroundTaskLambdaArn: backgroundTask.backgroundTask.output.arn,\n backgroundTaskStepFunctionArn: backgroundTask.stepFunction.output.arn,\n fileManagerDownloadLambdaArn: fileManager.functions.download.output.arn,\n websocketApiId: websocket.websocketApi.output.id,\n websocketApiUrl: websocket.websocketApiUrl,\n schedulerLambdaInvokeRole: scheduler.invokeRole.output.arn\n });\n\n // Only add `dynamoDbOpensearchTable` output if using search engine (ES/OS).\n if (searchEngineParams) {\n app.addOutputs({\n dynamoDbOpensearchTable: core.opensearchDynamodbTableName\n });\n }\n\n app.addHandler(() => {\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: cloudfront,\n map: {\n distributionDomain: \"cloudfrontApiDomain\",\n distributionUrl: \"cloudfrontApiUrl\",\n usedDomain: \"apiDomain\",\n usedUrl: \"apiUrl\"\n }\n });\n });\n // /**\n // * We need to attach the Sync System if it exists.\n // */\n // await attachSyncSystem({\n // app,\n // core,\n // env: app.params.run.env\n // });\n\n // Applies internal and user-defined AWS tags.\n await applyAwsResourceTags(\"api\");\n\n return {\n fileManager,\n graphql,\n graphqlStream,\n apiGateway,\n websocket,\n cloudfront,\n backgroundTask,\n scheduler\n };\n }\n });\n\n const app = withServiceManifest(withCommonLambdaEnvVariables(baseApp));\n\n app.addHandler(() => {\n app.addServiceManifest({\n name: \"api\",\n manifest: {\n // Read by the API through `PublicUrls.getApiUrl()`.\n url: getDistributionUrl(baseApp.resources.cloudfront),\n bgTaskSfn: baseApp.resources.backgroundTask.stepFunction.output.arn,\n cloudfront: {\n distributionId: baseApp.resources.cloudfront.output.id,\n domain: baseApp.resources.cloudfront.output.domainName.apply(\n v => `https://${v}`\n )\n }\n }\n });\n\n app.addServiceManifest({\n name: \"scheduler\",\n manifest: {\n lambdaArn: baseApp.resources.graphql.functions.graphql.output.arn,\n roleArn: baseApp.resources.scheduler.invokeRole.output.arn\n }\n });\n });\n\n return app;\n};\n"],"names":["createApiPulumiApp","baseApp","createPulumiApp","app","sdk","getAwsProjectSdk","projectConfig","pulumiResourceNamePrefix","vpcExtensionsConfig","getVpcConfigFromExtension","openSearchExtensionConfig","getOsConfigFromExtension","searchEngineParams","params","process","resource","featureFlags","usingAdvancedVpcParams","handleGuardDutyEvents","onResource","addResource","useExistingVpc","Error","isResourceOfType","aws","canUseVpc","apiPulumi","SetApiCustomDomains","DefaultSetApiCustomDomains","pulumiHandlers","ApiPulumi","isProduction","core","CoreOutput","VpcConfig","isVpcEnabled","graphqlEnv","getEnvVariableAwsRegion","graphql","ApiGraphql","graphqlStream","ApiGraphqlStream","websocket","ApiWebsocket","fileManager","ApiFileManager","apiGateway","ApiGateway","cloudfront","ApiCloudfront","backgroundTask","ApiBackgroundTask","scheduler","ApiScheduler","apiCustomDomains","apiCustomDomainsExt","domains","sslMethod","certificateArn","minimumProtocolVersion","applyCustomDomain","getAwsAccountId","addDomainsUrlsOutputs","applyAwsResourceTags","withServiceManifest","withCommonLambdaEnvVariables","getDistributionUrl","v"],"mappings":";;;;;;;;;;;;;;;;;AAwCO,MAAMA,qBAAqB;IAC9B,MAAMC,UAAUC,gBAAgB;QAC5B,MAAM;QACN,MAAM;QACN,SAAS,OAAOC;YACZ,MAAMC,MAAM,MAAMC;YAClB,MAAMC,gBAAgB,MAAMF,IAAI,gBAAgB;YAEhD,MAAMG,2BAA2B,MAAMH,IAAI,2BAA2B;YACtE,MAAMI,sBAAsBC,0BAA0BH;YACtD,MAAMI,4BAA4BC,yBAAyBL;YAE3D,IAAIM,qBAA8D;YAElE,IAAIF,2BACAE,qBAAqBF;YAGzB,IAAIE,oBAAoB;gBACpB,MAAMC,SAASD;gBACf,IAAI,AAAkB,YAAlB,OAAOC,QAAqB;oBAC5B,IAAIA,OAAO,QAAQ,EACfC,QAAQ,GAAG,CAAC,mBAAmB,GAAGD,OAAO,QAAQ;oBAGrD,IAAIA,OAAO,UAAU,EACjBC,QAAQ,GAAG,CAAC,kBAAkB,GAAGD,OAAO,UAAU;oBAGtD,IAAIA,OAAO,WAAW,EAClBC,QAAQ,GAAG,CAAC,uBAAuB,GAAGD,OAAO,WAAW;oBAG5D,IAAIA,OAAO,aAAa,EACpBC,QAAQ,GAAG,CAAC,yBAAyB,GAAG;oBAG5C,IAAID,OAAO,QAAQ,EACfC,QAAQ,GAAG,CAAC,mBAAmB,GAAGD,OAAO,QAAQ;oB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ACZ,SAAS;oBACb;gBACJ;YACJ;YAWA,MAAMe,qBAAqB;YAE3B,OAAO;gBACHnB;gBACAN;gBACAE;gBACAM;gBACAJ;gBACAM;gBACAE;gBACAE;YACJ;QACJ;IACJ;IAEA,MAAMjD,MAAM6D,oBAAoBC,6BAA6BhE;IAE7DE,IAAI,UAAU,CAAC;QACXA,IAAI,kBAAkB,CAAC;YACnB,MAAM;YACN,UAAU;gBAEN,KAAK+D,mBAAmBjE,QAAQ,SAAS,CAAC,UAAU;gBACpD,WAAWA,QAAQ,SAAS,CAAC,cAAc,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG;gBACnE,YAAY;oBACR,gBAAgBA,QAAQ,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;oBACtD,QAAQA,QAAQ,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CACxDkE,CAAAA,IAAK,CAAC,QAAQ,EAAEA,GAAG;gBAE3B;YACJ;QACJ;QAEAhE,IAAI,kBAAkB,CAAC;YACnB,MAAM;YACN,UAAU;gBACN,WAAWF,QAAQ,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG;gBACjE,SAASA,QAAQ,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG;YAC9D;QACJ;IACJ;IAEA,OAAOE;AACX"}
|
package/pulumi/apps/awsUtils.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getEnvVariableWebinyProjectName } from "../env/projectName.js";
|
|
|
3
3
|
import { getEnvVariableWebinyEnv } from "../env/env.js";
|
|
4
4
|
import { getEnvVariableWebinyVariant } from "../env/variant.js";
|
|
5
5
|
import { getAwsProjectSdk } from "../getAwsProjectSdk.js";
|
|
6
|
-
import { AwsTags } from "
|
|
6
|
+
import { AwsTags } from "@webiny/project-extensions-aws/extensions/AwsTags.js";
|
|
7
7
|
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
8
8
|
function getAwsAccountId(app) {
|
|
9
9
|
return app.addHandler(()=>__rspack_external__pulumi_aws_9e2bee2d.getCallerIdentity({}).then((x)=>x.accountId));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi/apps/awsUtils.js","sources":["../../../src/pulumi/apps/awsUtils.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { type PulumiApp } from \"@webiny/pulumi\";\nimport { tagResources } from \"~/pulumi/utils/index.js\";\nimport { getEnvVariableWebinyProjectName } from \"~/pulumi/env/projectName.js\";\nimport { getEnvVariableWebinyEnv } from \"~/pulumi/env/env.js\";\nimport { getEnvVariableWebinyVariant } from \"~/pulumi/env/variant.js\";\nimport { type AppName } from \"@webiny/project\";\nimport { getAwsProjectSdk } from \"~/pulumi/getAwsProjectSdk.js\";\nimport { AwsTags as awsTagsExt } from \"
|
|
1
|
+
{"version":3,"file":"pulumi/apps/awsUtils.js","sources":["../../../src/pulumi/apps/awsUtils.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { type PulumiApp } from \"@webiny/pulumi\";\nimport { tagResources } from \"~/pulumi/utils/index.js\";\nimport { getEnvVariableWebinyProjectName } from \"~/pulumi/env/projectName.js\";\nimport { getEnvVariableWebinyEnv } from \"~/pulumi/env/env.js\";\nimport { getEnvVariableWebinyVariant } from \"~/pulumi/env/variant.js\";\nimport { type AppName } from \"@webiny/project\";\nimport { getAwsProjectSdk } from \"~/pulumi/getAwsProjectSdk.js\";\nimport { AwsTags as awsTagsExt } from \"@webiny/project-extensions-aws/extensions/AwsTags.js\";\n\nexport function getAwsAccountId(app: PulumiApp) {\n return app.addHandler(() => {\n return aws.getCallerIdentity({}).then(x => x.accountId);\n });\n}\n\nexport function getAwsRegion(app: PulumiApp) {\n return app.addHandler(() => {\n return aws.config.requireRegion();\n });\n}\n\nexport async function applyAwsResourceTags(appName: AppName) {\n const sdk = await getAwsProjectSdk();\n const projectConfig = await sdk.getProjectConfig();\n\n const awsTagsFromExtensions: Record<string, string> = {};\n projectConfig.extensionsByType(awsTagsExt).forEach(ext => {\n Object.assign(awsTagsFromExtensions, ext.params.tags);\n });\n\n tagResources({\n ...awsTagsFromExtensions,\n WbyApp: appName,\n WbyProjectName: getEnvVariableWebinyProjectName(),\n WbyEnvironment: getEnvVariableWebinyEnv(),\n WbyEnvironmentVariant: getEnvVariableWebinyVariant()\n });\n}\n"],"names":["getAwsAccountId","app","aws","x","getAwsRegion","applyAwsResourceTags","appName","sdk","getAwsProjectSdk","projectConfig","awsTagsFromExtensions","awsTagsExt","ext","Object","tagResources","getEnvVariableWebinyProjectName","getEnvVariableWebinyEnv","getEnvVariableWebinyVariant"],"mappings":";;;;;;;AAUO,SAASA,gBAAgBC,GAAc;IAC1C,OAAOA,IAAI,UAAU,CAAC,IACXC,uCAAAA,iBAAqB,CAAC,CAAC,GAAG,IAAI,CAACC,CAAAA,IAAKA,EAAE,SAAS;AAE9D;AAEO,SAASC,aAAaH,GAAc;IACvC,OAAOA,IAAI,UAAU,CAAC,IACXC,uCAAAA,MAAAA,CAAAA,aAAwB;AAEvC;AAEO,eAAeG,qBAAqBC,OAAgB;IACvD,MAAMC,MAAM,MAAMC;IAClB,MAAMC,gBAAgB,MAAMF,IAAI,gBAAgB;IAEhD,MAAMG,wBAAgD,CAAC;IACvDD,cAAc,gBAAgB,CAACE,SAAY,OAAO,CAACC,CAAAA;QAC/CC,OAAO,MAAM,CAACH,uBAAuBE,IAAI,MAAM,CAAC,IAAI;IACxD;IAEAE,aAAa;QACT,GAAGJ,qBAAqB;QACxB,QAAQJ;QACR,gBAAgBS;QAChB,gBAAgBC;QAChB,uBAAuBC;IAC3B;AACJ"}
|
|
@@ -6,7 +6,7 @@ const resolveDomains = (params)=>{
|
|
|
6
6
|
return types.reduce((output, type)=>{
|
|
7
7
|
const value = domains[type];
|
|
8
8
|
if (!value) return output;
|
|
9
|
-
if (0 === value.length) throw new Error(`Missing domains for "${type}" deployment.`);
|
|
9
|
+
else if (0 === value.length) throw new Error(`Missing domains for "${type}" deployment.`);
|
|
10
10
|
for (const domain of deploymentsDomains){
|
|
11
11
|
const target = domain.domains[type];
|
|
12
12
|
if (!target) throw new Error(`Missing "${type}" domain in deployment "${domain.name}".`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi/apps/blueGreen/domains/resolveDomains.js","sources":["../../../../../src/pulumi/apps/blueGreen/domains/resolveDomains.ts"],"sourcesContent":["import type {\n IAttachedDomainKey,\n IAttachedDomains,\n IDeploymentsDomains,\n IResolvedDomains\n} from \"../types.js\";\n\nexport interface IResolveDomainsParams {\n attachedDomains: IAttachedDomains;\n deploymentsDomains: IDeploymentsDomains;\n}\n\nexport const resolveDomains = (params: IResolveDomainsParams): IResolvedDomains => {\n const { attachedDomains, deploymentsDomains } = params;\n\n const domains = attachedDomains.domains;\n\n if (!domains) {\n return [];\n }\n const types = Object.keys(domains).filter(key => {\n return !!domains[key as IAttachedDomainKey];\n }) as IAttachedDomainKey[];\n\n return types.reduce<IResolvedDomains>((output, type) => {\n const value = domains[type];\n /**\n * Should not happen because we are filtering out undefined values when creating the `types` array.\n */\n if (!value) {\n return output;\n } else if (value.length === 0) {\n throw new Error(`Missing domains for \"${type}\" deployment.`);\n }\n for (const domain of deploymentsDomains) {\n const target = domain.domains[type];\n if (!target) {\n throw new Error(`Missing \"${type}\" domain in deployment \"${domain.name}\".`);\n }\n\n output.push({\n type,\n env: domain.env,\n variant: domain.variant,\n name: domain.name,\n sources: value,\n target\n });\n }\n\n return output;\n }, []);\n};\n"],"names":["resolveDomains","params","attachedDomains","deploymentsDomains","domains","types","Object","key","output","type","value","Error","domain","target"],"mappings":"AAYO,MAAMA,iBAAiB,CAACC;IAC3B,MAAM,EAAEC,eAAe,EAAEC,kBAAkB,EAAE,GAAGF;IAEhD,MAAMG,UAAUF,gBAAgB,OAAO;IAEvC,IAAI,CAACE,SACD,OAAO,EAAE;IAEb,MAAMC,QAAQC,OAAO,IAAI,CAACF,SAAS,MAAM,CAACG,CAAAA,MAC/B,CAAC,CAACH,OAAO,CAACG,IAA0B;IAG/C,OAAOF,MAAM,MAAM,CAAmB,CAACG,QAAQC;QAC3C,MAAMC,QAAQN,OAAO,CAACK,KAAK;QAI3B,IAAI,CAACC,OACD,OAAOF;
|
|
1
|
+
{"version":3,"file":"pulumi/apps/blueGreen/domains/resolveDomains.js","sources":["../../../../../src/pulumi/apps/blueGreen/domains/resolveDomains.ts"],"sourcesContent":["import type {\n IAttachedDomainKey,\n IAttachedDomains,\n IDeploymentsDomains,\n IResolvedDomains\n} from \"../types.js\";\n\nexport interface IResolveDomainsParams {\n attachedDomains: IAttachedDomains;\n deploymentsDomains: IDeploymentsDomains;\n}\n\nexport const resolveDomains = (params: IResolveDomainsParams): IResolvedDomains => {\n const { attachedDomains, deploymentsDomains } = params;\n\n const domains = attachedDomains.domains;\n\n if (!domains) {\n return [];\n }\n const types = Object.keys(domains).filter(key => {\n return !!domains[key as IAttachedDomainKey];\n }) as IAttachedDomainKey[];\n\n return types.reduce<IResolvedDomains>((output, type) => {\n const value = domains[type];\n /**\n * Should not happen because we are filtering out undefined values when creating the `types` array.\n */\n if (!value) {\n return output;\n } else if (value.length === 0) {\n throw new Error(`Missing domains for \"${type}\" deployment.`);\n }\n for (const domain of deploymentsDomains) {\n const target = domain.domains[type];\n if (!target) {\n throw new Error(`Missing \"${type}\" domain in deployment \"${domain.name}\".`);\n }\n\n output.push({\n type,\n env: domain.env,\n variant: domain.variant,\n name: domain.name,\n sources: value,\n target\n });\n }\n\n return output;\n }, []);\n};\n"],"names":["resolveDomains","params","attachedDomains","deploymentsDomains","domains","types","Object","key","output","type","value","Error","domain","target"],"mappings":"AAYO,MAAMA,iBAAiB,CAACC;IAC3B,MAAM,EAAEC,eAAe,EAAEC,kBAAkB,EAAE,GAAGF;IAEhD,MAAMG,UAAUF,gBAAgB,OAAO;IAEvC,IAAI,CAACE,SACD,OAAO,EAAE;IAEb,MAAMC,QAAQC,OAAO,IAAI,CAACF,SAAS,MAAM,CAACG,CAAAA,MAC/B,CAAC,CAACH,OAAO,CAACG,IAA0B;IAG/C,OAAOF,MAAM,MAAM,CAAmB,CAACG,QAAQC;QAC3C,MAAMC,QAAQN,OAAO,CAACK,KAAK;QAI3B,IAAI,CAACC,OACD,OAAOF;aACJ,IAAIE,AAAiB,MAAjBA,MAAM,MAAM,EACnB,MAAM,IAAIC,MAAM,CAAC,qBAAqB,EAAEF,KAAK,aAAa,CAAC;QAE/D,KAAK,MAAMG,UAAUT,mBAAoB;YACrC,MAAMU,SAASD,OAAO,OAAO,CAACH,KAAK;YACnC,IAAI,CAACI,QACD,MAAM,IAAIF,MAAM,CAAC,SAAS,EAAEF,KAAK,wBAAwB,EAAEG,OAAO,IAAI,CAAC,EAAE,CAAC;YAG9EJ,OAAO,IAAI,CAAC;gBACRC;gBACA,KAAKG,OAAO,GAAG;gBACf,SAASA,OAAO,OAAO;gBACvB,MAAMA,OAAO,IAAI;gBACjB,SAASF;gBACTG;YACJ;QACJ;QAEA,OAAOL;IACX,GAAG,EAAE;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type GetAppStackOutput } from "../../../abstractions/features/GetAppStackOutput.js";
|
|
2
2
|
export type GenericRecord<K extends PropertyKey = PropertyKey, V = any> = Record<K, V>;
|
|
3
3
|
export type NonEmptyArray<T> = [T, ...T[]];
|
|
4
4
|
export interface IDeploymentDomain {
|
|
@@ -66,12 +66,9 @@ export interface IResolvedDomain {
|
|
|
66
66
|
target: string;
|
|
67
67
|
}
|
|
68
68
|
export type IResolvedDomains = IResolvedDomain[];
|
|
69
|
-
export interface IBlueGreenStackOutput extends
|
|
69
|
+
export interface IBlueGreenStackOutput extends GetAppStackOutput.StackOutput {
|
|
70
70
|
distributionDomain: string;
|
|
71
71
|
distributionUrl: string;
|
|
72
|
-
/**
|
|
73
|
-
* TODO fix later
|
|
74
|
-
*/
|
|
75
72
|
environments?: IResolvedDomains;
|
|
76
73
|
domains?: string[];
|
|
77
74
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type PulumiAppModule } from "@webiny/pulumi";
|
|
2
|
+
import type { ApiStackOutputService } from "@webiny/project-extensions-aws/abstractions/services/ApiStackOutputService.js";
|
|
2
3
|
export type CoreOutput = PulumiAppModule<typeof CoreOutput>;
|
|
3
4
|
export interface ICoreOutput {
|
|
4
5
|
deploymentId: string;
|
|
@@ -8,7 +9,7 @@ export interface ICoreOutput {
|
|
|
8
9
|
cognitoUserPoolArn: string;
|
|
9
10
|
cognitoAppClientId: string;
|
|
10
11
|
cognitoUserPoolId: string;
|
|
11
|
-
cognitoUserPoolPasswordPolicy:
|
|
12
|
+
cognitoUserPoolPasswordPolicy: ApiStackOutputService.PasswordPolicy;
|
|
12
13
|
fileManagerBucketId: string;
|
|
13
14
|
fileManagerBucketArn: string;
|
|
14
15
|
primaryDynamodbTableArn: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi/apps/common/CoreOutput.js","sources":["../../../../src/pulumi/apps/common/CoreOutput.ts"],"sourcesContent":["import { createAppModule, type PulumiAppModule } from \"@webiny/pulumi\";\nimport { getAwsProjectSdk } from \"~/pulumi/getAwsProjectSdk.js\";\n\nexport type CoreOutput = PulumiAppModule<typeof CoreOutput>;\n\nexport interface ICoreOutput {\n deploymentId: string;\n region: string;\n dynamoDbTable: string;\n iotAuthorizerName: string;\n cognitoUserPoolArn: string;\n cognitoAppClientId: string;\n cognitoUserPoolId: string;\n cognitoUserPoolPasswordPolicy:
|
|
1
|
+
{"version":3,"file":"pulumi/apps/common/CoreOutput.js","sources":["../../../../src/pulumi/apps/common/CoreOutput.ts"],"sourcesContent":["import { createAppModule, type PulumiAppModule } from \"@webiny/pulumi\";\nimport { getAwsProjectSdk } from \"~/pulumi/getAwsProjectSdk.js\";\nimport type { ApiStackOutputService } from \"@webiny/project-extensions-aws/abstractions/services/ApiStackOutputService.js\";\n\nexport type CoreOutput = PulumiAppModule<typeof CoreOutput>;\n\nexport interface ICoreOutput {\n deploymentId: string;\n region: string;\n dynamoDbTable: string;\n iotAuthorizerName: string;\n cognitoUserPoolArn: string;\n cognitoAppClientId: string;\n cognitoUserPoolId: string;\n cognitoUserPoolPasswordPolicy: ApiStackOutputService.PasswordPolicy;\n fileManagerBucketId: string;\n fileManagerBucketArn: string;\n primaryDynamodbTableArn: string;\n primaryDynamodbTableName: string;\n primaryDynamodbTableHashKey: string;\n primaryDynamodbTableRangeKey: string;\n auditLogsDynamodbTableArn: string;\n auditLogsDynamodbTableName: string;\n auditLogsDynamodbTableHashKey: string;\n auditLogsDynamodbTableRangeKey: string;\n eventBusName: string;\n eventBusArn: string;\n vpcPublicSubnetIds: string[] | undefined;\n vpcPrivateSubnetIds: string[] | undefined;\n vpcSecurityGroupIds: string[] | undefined;\n opensearchDomainArn: string | undefined;\n opensearchDomainEndpoint: string | undefined;\n opensearchDynamodbTableHashKey: string;\n opensearchDynamodbTableRangeKey: string;\n opensearchDynamodbTableArn: string | undefined;\n opensearchDynamodbTableName: string | undefined;\n}\n\nexport const CoreOutput = createAppModule({\n name: \"CoreOutput\",\n config(app) {\n return app.addHandler(async () => {\n const sdk = await getAwsProjectSdk();\n\n const output = await sdk.getAppStackOutput(\"core\");\n if (!output) {\n throw new Error(\"Core application is not deployed.\");\n }\n\n return {\n fileManagerBucketId: output[\"fileManagerBucketId\"],\n primaryDynamodbTableArn: output[\"primaryDynamodbTableArn\"],\n primaryDynamodbTableName: output[\"primaryDynamodbTableName\"],\n primaryDynamodbTableHashKey: output[\"primaryDynamodbTableHashKey\"],\n primaryDynamodbTableRangeKey: output[\"primaryDynamodbTableRangeKey\"],\n auditLogsDynamodbTableArn: output[\"auditLogsDynamodbTableArn\"],\n auditLogsDynamodbTableName: output[\"auditLogsDynamodbTableName\"],\n auditLogsDynamodbTableHashKey: output[\"auditLogsDynamodbTableHashKey\"],\n auditLogsDynamodbTableRangeKey: output[\"auditLogsDynamodbTableRangeKey\"],\n cognitoUserPoolId: output[\"cognitoUserPoolId\"],\n cognitoUserPoolArn: output[\"cognitoUserPoolArn\"],\n cognitoUserPoolPasswordPolicy: output[\"cognitoUserPoolPasswordPolicy\"],\n cognitoAppClientId: output[\"cognitoAppClientId\"],\n eventBusName: output[\"eventBusName\"],\n eventBusArn: output[\"eventBusArn\"],\n // These outputs are optional, since VPC is not always enabled.\n vpcPublicSubnetIds: output[\"vpcPublicSubnetIds\"],\n vpcPrivateSubnetIds: output[\"vpcPrivateSubnetIds\"],\n vpcSecurityGroupIds: output[\"vpcSecurityGroupIds\"],\n // These outputs are optional, since Opensearch is not always enabled.\n opensearchDomainArn: output[\"opensearchDomainArn\"],\n opensearchDomainEndpoint: output[\"opensearchDomainEndpoint\"],\n opensearchDynamodbTableArn: output[\"opensearchDynamodbTableArn\"],\n opensearchDynamodbTableName: output[\"opensearchDynamodbTableName\"]\n } as ICoreOutput;\n });\n }\n});\n"],"names":["CoreOutput","createAppModule","app","sdk","getAwsProjectSdk","output","Error"],"mappings":";;AAsCO,MAAMA,aAAaC,gBAAgB;IACtC,MAAM;IACN,QAAOC,GAAG;QACN,OAAOA,IAAI,UAAU,CAAC;YAClB,MAAMC,MAAM,MAAMC;YAElB,MAAMC,SAAS,MAAMF,IAAI,iBAAiB,CAAC;YAC3C,IAAI,CAACE,QACD,MAAM,IAAIC,MAAM;YAGpB,OAAO;gBACH,qBAAqBD,MAAM,CAAC,sBAAsB;gBAClD,yBAAyBA,MAAM,CAAC,0BAA0B;gBAC1D,0BAA0BA,MAAM,CAAC,2BAA2B;gBAC5D,6BAA6BA,MAAM,CAAC,8BAA8B;gBAClE,8BAA8BA,MAAM,CAAC,+BAA+B;gBACpE,2BAA2BA,MAAM,CAAC,4BAA4B;gBAC9D,4BAA4BA,MAAM,CAAC,6BAA6B;gBAChE,+BAA+BA,MAAM,CAAC,gCAAgC;gBACtE,gCAAgCA,MAAM,CAAC,iCAAiC;gBACxE,mBAAmBA,MAAM,CAAC,oBAAoB;gBAC9C,oBAAoBA,MAAM,CAAC,qBAAqB;gBAChD,+BAA+BA,MAAM,CAAC,gCAAgC;gBACtE,oBAAoBA,MAAM,CAAC,qBAAqB;gBAChD,cAAcA,MAAM,CAAC,eAAe;gBACpC,aAAaA,MAAM,CAAC,cAAc;gBAElC,oBAAoBA,MAAM,CAAC,qBAAqB;gBAChD,qBAAqBA,MAAM,CAAC,sBAAsB;gBAClD,qBAAqBA,MAAM,CAAC,sBAAsB;gBAElD,qBAAqBA,MAAM,CAAC,sBAAsB;gBAClD,0BAA0BA,MAAM,CAAC,2BAA2B;gBAC5D,4BAA4BA,MAAM,CAAC,6BAA6B;gBAChE,6BAA6BA,MAAM,CAAC,8BAA8B;YACtE;QACJ;IACJ;AACJ"}
|
|
@@ -2,4 +2,5 @@ import type { PulumiAppModule } from "@webiny/pulumi";
|
|
|
2
2
|
export type CoreAuditLogsDynamo = PulumiAppModule<typeof CoreAuditLogsDynamo>;
|
|
3
3
|
export declare const CoreAuditLogsDynamo: import("@webiny/pulumi").PulumiAppModuleDefinition<import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/dynamodb/table").Table>, {
|
|
4
4
|
protect: boolean;
|
|
5
|
+
pointInTimeRecovery: boolean;
|
|
5
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi/apps/core/CoreAuditLogsDynamo.js","sources":["../../../../src/pulumi/apps/core/CoreAuditLogsDynamo.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport type { PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\nimport { createAppModule } from \"@webiny/pulumi\";\n\nexport type CoreAuditLogsDynamo = PulumiAppModule<typeof CoreAuditLogsDynamo>;\n\nexport const CoreAuditLogsDynamo = createAppModule({\n name: \"AuditLogsDynamoDb\",\n config(app: PulumiApp, params: { protect: boolean }) {\n return app.addResource(aws.dynamodb.Table, {\n name: \"webiny-audit-logs\",\n config: {\n attributes: [\n { name: \"PK\", type: \"S\" },\n { name: \"SK\", type: \"S\" },\n { name: \"GSI_TENANT\", type: \"S\" },\n { name: \"GSI1_PK\", type: \"S\" },\n { name: \"GSI1_SK\", type: \"N\" },\n { name: \"GSI2_PK\", type: \"S\" },\n { name: \"GSI2_SK\", type: \"N\" },\n { name: \"GSI3_PK\", type: \"S\" },\n { name: \"GSI3_SK\", type: \"N\" },\n { name: \"GSI4_PK\", type: \"S\" },\n { name: \"GSI4_SK\", type: \"N\" },\n { name: \"GSI5_PK\", type: \"S\" },\n { name: \"GSI5_SK\", type: \"N\" },\n { name: \"GSI6_PK\", type: \"S\" },\n { name: \"GSI6_SK\", type: \"N\" },\n { name: \"GSI7_PK\", type: \"S\" },\n { name: \"GSI7_SK\", type: \"N\" },\n { name: \"GSI8_PK\", type: \"S\" },\n { name: \"GSI8_SK\", type: \"N\" },\n { name: \"GSI9_PK\", type: \"S\" },\n { name: \"GSI9_SK\", type: \"N\" }\n ],\n billingMode: \"PAY_PER_REQUEST\",\n hashKey: \"PK\",\n rangeKey: \"SK\",\n globalSecondaryIndexes: [\n {\n name: \"GSI_TENANT\",\n keySchemas: [\n {\n attributeName: \"GSI_TENANT\",\n keyType: \"HASH\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI1\",\n keySchemas: [\n {\n attributeName: \"GSI1_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI1_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI2\",\n keySchemas: [\n {\n attributeName: \"GSI2_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI2_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI3\",\n keySchemas: [\n {\n attributeName: \"GSI3_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI3_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI4\",\n keySchemas: [\n {\n attributeName: \"GSI4_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI4_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI5\",\n keySchemas: [\n {\n attributeName: \"GSI5_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI5_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI6\",\n keySchemas: [\n {\n attributeName: \"GSI6_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI6_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI7\",\n keySchemas: [\n {\n attributeName: \"GSI7_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI7_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI8\",\n keySchemas: [\n {\n attributeName: \"GSI8_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI8_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI9\",\n keySchemas: [\n {\n attributeName: \"GSI9_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI9_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n }\n ],\n ttl: {\n attributeName: \"expiresAt\",\n enabled: true\n }\n },\n opts: {\n protect: params.protect\n }\n });\n }\n});\n"],"names":["CoreAuditLogsDynamo","createAppModule","app","params","aws"],"mappings":";;AAMO,MAAMA,sBAAsBC,gBAAgB;IAC/C,MAAM;IACN,QAAOC,GAAc,EAAEC,MAA4B;QAC/C,OAAOD,IAAI,WAAW,CAACE,uCAAAA,QAAAA,CAAAA,KAAkB,EAAE;YACvC,MAAM;YACN,QAAQ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AAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;iBACH;gBACD,KAAK;oBACD,eAAe;oBACf,SAAS;gBACb;YACJ;YACA,MAAM;gBACF,SAASD,OAAO,OAAO;YAC3B;QACJ;IACJ;AACJ"}
|
|
1
|
+
{"version":3,"file":"pulumi/apps/core/CoreAuditLogsDynamo.js","sources":["../../../../src/pulumi/apps/core/CoreAuditLogsDynamo.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport type { PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\nimport { createAppModule } from \"@webiny/pulumi\";\n\nexport type CoreAuditLogsDynamo = PulumiAppModule<typeof CoreAuditLogsDynamo>;\n\nexport const CoreAuditLogsDynamo = createAppModule({\n name: \"AuditLogsDynamoDb\",\n config(app: PulumiApp, params: { protect: boolean; pointInTimeRecovery: boolean }) {\n return app.addResource(aws.dynamodb.Table, {\n name: \"webiny-audit-logs\",\n config: {\n attributes: [\n { name: \"PK\", type: \"S\" },\n { name: \"SK\", type: \"S\" },\n { name: \"GSI_TENANT\", type: \"S\" },\n { name: \"GSI1_PK\", type: \"S\" },\n { name: \"GSI1_SK\", type: \"N\" },\n { name: \"GSI2_PK\", type: \"S\" },\n { name: \"GSI2_SK\", type: \"N\" },\n { name: \"GSI3_PK\", type: \"S\" },\n { name: \"GSI3_SK\", type: \"N\" },\n { name: \"GSI4_PK\", type: \"S\" },\n { name: \"GSI4_SK\", type: \"N\" },\n { name: \"GSI5_PK\", type: \"S\" },\n { name: \"GSI5_SK\", type: \"N\" },\n { name: \"GSI6_PK\", type: \"S\" },\n { name: \"GSI6_SK\", type: \"N\" },\n { name: \"GSI7_PK\", type: \"S\" },\n { name: \"GSI7_SK\", type: \"N\" },\n { name: \"GSI8_PK\", type: \"S\" },\n { name: \"GSI8_SK\", type: \"N\" },\n { name: \"GSI9_PK\", type: \"S\" },\n { name: \"GSI9_SK\", type: \"N\" }\n ],\n billingMode: \"PAY_PER_REQUEST\",\n hashKey: \"PK\",\n rangeKey: \"SK\",\n globalSecondaryIndexes: [\n {\n name: \"GSI_TENANT\",\n keySchemas: [\n {\n attributeName: \"GSI_TENANT\",\n keyType: \"HASH\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI1\",\n keySchemas: [\n {\n attributeName: \"GSI1_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI1_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI2\",\n keySchemas: [\n {\n attributeName: \"GSI2_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI2_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI3\",\n keySchemas: [\n {\n attributeName: \"GSI3_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI3_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI4\",\n keySchemas: [\n {\n attributeName: \"GSI4_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI4_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI5\",\n keySchemas: [\n {\n attributeName: \"GSI5_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI5_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI6\",\n keySchemas: [\n {\n attributeName: \"GSI6_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI6_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI7\",\n keySchemas: [\n {\n attributeName: \"GSI7_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI7_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI8\",\n keySchemas: [\n {\n attributeName: \"GSI8_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI8_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI9\",\n keySchemas: [\n {\n attributeName: \"GSI9_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI9_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n }\n ],\n ttl: {\n attributeName: \"expiresAt\",\n enabled: true\n },\n pointInTimeRecovery: {\n enabled: params.pointInTimeRecovery\n }\n },\n opts: {\n protect: params.protect\n }\n });\n }\n});\n"],"names":["CoreAuditLogsDynamo","createAppModule","app","params","aws"],"mappings":";;AAMO,MAAMA,sBAAsBC,gBAAgB;IAC/C,MAAM;IACN,QAAOC,GAAc,EAAEC,MAA0D;QAC7E,OAAOD,IAAI,WAAW,CAACE,uCAAAA,QAAAA,CAAAA,KAAkB,EAAE;YACvC,MAAM;YACN,QAAQ;gBACJ,YAAY;oBACR;wBAAE,MAAM;wBAAM,MAAM;oBAAI;oBACxB;wBAAE,MAAM;wBAAM,MAAM;oBAAI;oBACxB;wBAAE,MAAM;wBAAc,MAAM;oBAAI;oBAChC;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;iBAChC;gBACD,aAAa;gBACb,SAAS;gBACT,UAAU;gBACV,wBAAwB;oBACpB;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;iBACH;gBACD,KAAK;oBACD,eAAe;oBACf,SAAS;gBACb;gBACA,qBAAqB;oBACjB,SAASD,OAAO,mBAAmB;gBACvC;YACJ;YACA,MAAM;gBACF,SAASA,OAAO,OAAO;YAC3B;QACJ;IACJ;AACJ"}
|
|
@@ -2,4 +2,5 @@ import { type PulumiAppModule } from "@webiny/pulumi";
|
|
|
2
2
|
export type CoreDynamo = PulumiAppModule<typeof CoreDynamo>;
|
|
3
3
|
export declare const CoreDynamo: import("@webiny/pulumi").PulumiAppModuleDefinition<import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/dynamodb/table").Table>, {
|
|
4
4
|
protect: boolean;
|
|
5
|
+
pointInTimeRecovery: boolean;
|
|
5
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi/apps/core/CoreDynamo.js","sources":["../../../../src/pulumi/apps/core/CoreDynamo.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, type PulumiApp, type PulumiAppModule } from \"@webiny/pulumi\";\n\nexport type CoreDynamo = PulumiAppModule<typeof CoreDynamo>;\n\nexport const CoreDynamo = createAppModule({\n name: \"DynamoDb\",\n config(app: PulumiApp, params: { protect: boolean }) {\n return app.addResource(aws.dynamodb.Table, {\n name: \"webiny\",\n config: {\n attributes: [\n { name: \"PK\", type: \"S\" },\n { name: \"SK\", type: \"S\" },\n { name: \"GSI_TENANT\", 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: \"GSI_TENANT\",\n keySchemas: [\n {\n attributeName: \"GSI_TENANT\",\n keyType: \"HASH\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI1\",\n keySchemas: [\n {\n attributeName: \"GSI1_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI1_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"ALL\"\n },\n {\n name: \"GSI2\",\n keySchemas: [\n {\n attributeName: \"GSI2_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI2_SK\",\n keyType: \"RANGE\"\n }\n ],\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"],"names":["CoreDynamo","createAppModule","app","params","aws"],"mappings":";;AAKO,MAAMA,aAAaC,gBAAgB;IACtC,MAAM;IACN,QAAOC,GAAc,EAAEC,
|
|
1
|
+
{"version":3,"file":"pulumi/apps/core/CoreDynamo.js","sources":["../../../../src/pulumi/apps/core/CoreDynamo.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, type PulumiApp, type PulumiAppModule } from \"@webiny/pulumi\";\n\nexport type CoreDynamo = PulumiAppModule<typeof CoreDynamo>;\n\nexport const CoreDynamo = createAppModule({\n name: \"DynamoDb\",\n config(app: PulumiApp, params: { protect: boolean; pointInTimeRecovery: boolean }) {\n return app.addResource(aws.dynamodb.Table, {\n name: \"webiny\",\n config: {\n attributes: [\n { name: \"PK\", type: \"S\" },\n { name: \"SK\", type: \"S\" },\n { name: \"GSI_TENANT\", 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: \"GSI_TENANT\",\n keySchemas: [\n {\n attributeName: \"GSI_TENANT\",\n keyType: \"HASH\"\n }\n ],\n projectionType: \"KEYS_ONLY\"\n },\n {\n name: \"GSI1\",\n keySchemas: [\n {\n attributeName: \"GSI1_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI1_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"ALL\"\n },\n {\n name: \"GSI2\",\n keySchemas: [\n {\n attributeName: \"GSI2_PK\",\n keyType: \"HASH\"\n },\n {\n attributeName: \"GSI2_SK\",\n keyType: \"RANGE\"\n }\n ],\n projectionType: \"ALL\"\n }\n ],\n ttl: {\n attributeName: \"expiresAt\",\n enabled: true\n },\n pointInTimeRecovery: {\n enabled: params.pointInTimeRecovery\n }\n },\n opts: {\n protect: params.protect\n }\n });\n }\n});\n"],"names":["CoreDynamo","createAppModule","app","params","aws"],"mappings":";;AAKO,MAAMA,aAAaC,gBAAgB;IACtC,MAAM;IACN,QAAOC,GAAc,EAAEC,MAA0D;QAC7E,OAAOD,IAAI,WAAW,CAACE,uCAAAA,QAAAA,CAAAA,KAAkB,EAAE;YACvC,MAAM;YACN,QAAQ;gBACJ,YAAY;oBACR;wBAAE,MAAM;wBAAM,MAAM;oBAAI;oBACxB;wBAAE,MAAM;wBAAM,MAAM;oBAAI;oBACxB;wBAAE,MAAM;wBAAc,MAAM;oBAAI;oBAChC;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;oBAC7B;wBAAE,MAAM;wBAAW,MAAM;oBAAI;iBAChC;gBACD,aAAa;gBACb,SAAS;gBACT,UAAU;gBACV,wBAAwB;oBACpB;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;oBACA;wBACI,MAAM;wBACN,YAAY;4BACR;gCACI,eAAe;gCACf,SAAS;4BACb;4BACA;gCACI,eAAe;gCACf,SAAS;4BACb;yBACH;wBACD,gBAAgB;oBACpB;iBACH;gBACD,KAAK;oBACD,eAAe;oBACf,SAAS;gBACb;gBACA,qBAAqB;oBACjB,SAASD,OAAO,mBAAmB;gBACvC;YACJ;YACA,MAAM;gBACF,SAASA,OAAO,OAAO;YAC3B;QACJ;IACJ;AACJ"}
|
|
@@ -6,6 +6,8 @@ export declare const CoreFileManger: import("@webiny/pulumi").PulumiAppModuleDef
|
|
|
6
6
|
bucketAcl: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/s3/bucketAcl").BucketAcl>;
|
|
7
7
|
blockPublicAccessBlock: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/s3/bucketPublicAccessBlock").BucketPublicAccessBlock>;
|
|
8
8
|
bucketCorsConfiguration: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/s3/bucketCorsConfiguration").BucketCorsConfiguration>;
|
|
9
|
+
bucketVersioning: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/s3/bucketVersioning").BucketVersioning> | null;
|
|
9
10
|
}, {
|
|
10
11
|
protect: boolean;
|
|
12
|
+
versioning: boolean;
|
|
11
13
|
}>;
|
|
@@ -66,12 +66,22 @@ const CoreFileManger = createAppModule({
|
|
|
66
66
|
restrictPublicBuckets: true
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
+
const bucketVersioning = params.versioning ? app.addResource(__rspack_external__pulumi_aws_9e2bee2d.s3.BucketVersioning, {
|
|
70
|
+
name: `${name}-versioning`,
|
|
71
|
+
config: {
|
|
72
|
+
bucket: bucket.output.id,
|
|
73
|
+
versioningConfiguration: {
|
|
74
|
+
status: "Enabled"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}) : null;
|
|
69
78
|
return {
|
|
70
79
|
bucket,
|
|
71
80
|
bucketOwnershipControls,
|
|
72
81
|
bucketAcl,
|
|
73
82
|
blockPublicAccessBlock,
|
|
74
|
-
bucketCorsConfiguration
|
|
83
|
+
bucketCorsConfiguration,
|
|
84
|
+
bucketVersioning
|
|
75
85
|
};
|
|
76
86
|
}
|
|
77
87
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi/apps/core/CoreFileManager.js","sources":["../../../../src/pulumi/apps/core/CoreFileManager.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, type PulumiApp, type PulumiAppModule } from \"@webiny/pulumi\";\n\nexport type CoreFileManger = PulumiAppModule<typeof CoreFileManger>;\n\nexport const CoreFileManger = createAppModule({\n name: \"FileManagerBucket\",\n config(app: PulumiApp, params: { protect: boolean }) {\n const name = \"fm-bucket\";\n\n const bucket = app.addResource(aws.s3.Bucket, {\n name,\n config: {\n // We definitely don't want to force-destroy if \"protected\" flag is true.\n forceDestroy: !params.protect\n },\n opts: {\n protect: params.protect\n }\n });\n\n const bucketOwnershipControls = app.addResource(aws.s3.BucketOwnershipControls, {\n name: `${name}-ownership-controls`,\n config: {\n bucket: bucket.output.id,\n rule: {\n objectOwnership: \"BucketOwnerPreferred\"\n }\n }\n });\n\n const bucketAcl = app.addResource(aws.s3.BucketAcl, {\n name: `${name}-acl`,\n config: {\n bucket: bucket.output.id,\n acl: aws.s3.CannedAcl.Private\n },\n opts: {\n dependsOn: [bucketOwnershipControls.output]\n }\n });\n\n // We need these rules to be able to upload to this bucket from the browser.\n const bucketCorsConfiguration = app.addResource(aws.s3.BucketCorsConfiguration, {\n name: `${name}-cors`,\n config: {\n bucket: bucket.output.id,\n corsRules: [\n {\n allowedHeaders: [\"*\"],\n allowedMethods: [\"POST\", \"GET\", \"PUT\"],\n allowedOrigins: [\"*\"],\n maxAgeSeconds: 3000\n }\n ]\n }\n });\n\n // Block any public access\n const blockPublicAccessBlock = app.addResource(aws.s3.BucketPublicAccessBlock, {\n name: `${name}-block-public-access`,\n config: {\n bucket: bucket.output.id,\n blockPublicAcls: true,\n blockPublicPolicy: true,\n ignorePublicAcls: true,\n restrictPublicBuckets: true\n }\n });\n\n return {\n bucket,\n bucketOwnershipControls,\n bucketAcl,\n blockPublicAccessBlock,\n bucketCorsConfiguration\n };\n }\n});\n"],"names":["CoreFileManger","createAppModule","app","params","name","bucket","aws","bucketOwnershipControls","bucketAcl","bucketCorsConfiguration","blockPublicAccessBlock"],"mappings":";;AAKO,MAAMA,iBAAiBC,gBAAgB;IAC1C,MAAM;IACN,QAAOC,GAAc,EAAEC,
|
|
1
|
+
{"version":3,"file":"pulumi/apps/core/CoreFileManager.js","sources":["../../../../src/pulumi/apps/core/CoreFileManager.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, type PulumiApp, type PulumiAppModule } from \"@webiny/pulumi\";\n\nexport type CoreFileManger = PulumiAppModule<typeof CoreFileManger>;\n\nexport const CoreFileManger = createAppModule({\n name: \"FileManagerBucket\",\n config(app: PulumiApp, params: { protect: boolean; versioning: boolean }) {\n const name = \"fm-bucket\";\n\n const bucket = app.addResource(aws.s3.Bucket, {\n name,\n config: {\n // We definitely don't want to force-destroy if \"protected\" flag is true.\n forceDestroy: !params.protect\n },\n opts: {\n protect: params.protect\n }\n });\n\n const bucketOwnershipControls = app.addResource(aws.s3.BucketOwnershipControls, {\n name: `${name}-ownership-controls`,\n config: {\n bucket: bucket.output.id,\n rule: {\n objectOwnership: \"BucketOwnerPreferred\"\n }\n }\n });\n\n const bucketAcl = app.addResource(aws.s3.BucketAcl, {\n name: `${name}-acl`,\n config: {\n bucket: bucket.output.id,\n acl: aws.s3.CannedAcl.Private\n },\n opts: {\n dependsOn: [bucketOwnershipControls.output]\n }\n });\n\n // We need these rules to be able to upload to this bucket from the browser.\n const bucketCorsConfiguration = app.addResource(aws.s3.BucketCorsConfiguration, {\n name: `${name}-cors`,\n config: {\n bucket: bucket.output.id,\n corsRules: [\n {\n allowedHeaders: [\"*\"],\n allowedMethods: [\"POST\", \"GET\", \"PUT\"],\n allowedOrigins: [\"*\"],\n maxAgeSeconds: 3000\n }\n ]\n }\n });\n\n // Block any public access\n const blockPublicAccessBlock = app.addResource(aws.s3.BucketPublicAccessBlock, {\n name: `${name}-block-public-access`,\n config: {\n bucket: bucket.output.id,\n blockPublicAcls: true,\n blockPublicPolicy: true,\n ignorePublicAcls: true,\n restrictPublicBuckets: true\n }\n });\n\n // Keeps previous versions of overwritten and deleted files, so they can be restored.\n const bucketVersioning = params.versioning\n ? app.addResource(aws.s3.BucketVersioning, {\n name: `${name}-versioning`,\n config: {\n bucket: bucket.output.id,\n versioningConfiguration: {\n status: \"Enabled\"\n }\n }\n })\n : null;\n\n return {\n bucket,\n bucketOwnershipControls,\n bucketAcl,\n blockPublicAccessBlock,\n bucketCorsConfiguration,\n bucketVersioning\n };\n }\n});\n"],"names":["CoreFileManger","createAppModule","app","params","name","bucket","aws","bucketOwnershipControls","bucketAcl","bucketCorsConfiguration","blockPublicAccessBlock","bucketVersioning"],"mappings":";;AAKO,MAAMA,iBAAiBC,gBAAgB;IAC1C,MAAM;IACN,QAAOC,GAAc,EAAEC,MAAiD;QACpE,MAAMC,OAAO;QAEb,MAAMC,SAASH,IAAI,WAAW,CAACI,uCAAAA,EAAAA,CAAAA,MAAa,EAAE;YAC1CF;YACA,QAAQ;gBAEJ,cAAc,CAACD,OAAO,OAAO;YACjC;YACA,MAAM;gBACF,SAASA,OAAO,OAAO;YAC3B;QACJ;QAEA,MAAMI,0BAA0BL,IAAI,WAAW,CAACI,uCAAAA,EAAAA,CAAAA,uBAA8B,EAAE;YAC5E,MAAM,GAAGF,KAAK,mBAAmB,CAAC;YAClC,QAAQ;gBACJ,QAAQC,OAAO,MAAM,CAAC,EAAE;gBACxB,MAAM;oBACF,iBAAiB;gBACrB;YACJ;QACJ;QAEA,MAAMG,YAAYN,IAAI,WAAW,CAACI,uCAAAA,EAAAA,CAAAA,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
|
|
7
|
+
pointInTimeRecovery: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const OpenSearch: import("@webiny/pulumi").PulumiAppModuleDefinition<{
|
|
9
10
|
domain: PulumiAppRemoteResource<aws.opensearch.GetDomainResult> | PulumiAppResource<PulumiAppResourceConstructor<import("@pulumi/aws/opensearch/domain.js").Domain, any>>;
|