@webiny/pulumi-aws 0.0.0-ee-vpcs.549378cf03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +328 -0
- package/apps/admin/createAdminPulumiApp.d.ts +24 -0
- package/apps/admin/createAdminPulumiApp.js +21 -0
- package/apps/admin/createAdminPulumiApp.js.map +1 -0
- package/apps/admin/index.d.ts +1 -0
- package/apps/admin/index.js +18 -0
- package/apps/admin/index.js.map +1 -0
- package/apps/api/ApiApwScheduler.d.ts +20 -0
- package/apps/api/ApiApwScheduler.js +246 -0
- package/apps/api/ApiApwScheduler.js.map +1 -0
- package/apps/api/ApiCloudfront.d.ts +3 -0
- package/apps/api/ApiCloudfront.js +101 -0
- package/apps/api/ApiCloudfront.js.map +1 -0
- package/apps/api/ApiFileManager.d.ts +10 -0
- package/apps/api/ApiFileManager.js +166 -0
- package/apps/api/ApiFileManager.js.map +1 -0
- package/apps/api/ApiGateway.d.ts +18 -0
- package/apps/api/ApiGateway.js +88 -0
- package/apps/api/ApiGateway.js.map +1 -0
- package/apps/api/ApiGraphql.d.ts +26 -0
- package/apps/api/ApiGraphql.js +167 -0
- package/apps/api/ApiGraphql.js.map +1 -0
- package/apps/api/ApiHeadlessCMS.d.ts +13 -0
- package/apps/api/ApiHeadlessCMS.js +94 -0
- package/apps/api/ApiHeadlessCMS.js.map +1 -0
- package/apps/api/ApiOutput.d.ts +15 -0
- package/apps/api/ApiOutput.js +43 -0
- package/apps/api/ApiOutput.js.map +1 -0
- package/apps/api/ApiPageBuilder.d.ts +24 -0
- package/apps/api/ApiPageBuilder.js +248 -0
- package/apps/api/ApiPageBuilder.js.map +1 -0
- package/apps/api/createApiPulumiApp.d.ts +71 -0
- package/apps/api/createApiPulumiApp.js +188 -0
- package/apps/api/createApiPulumiApp.js.map +1 -0
- package/apps/api/index.d.ts +9 -0
- package/apps/api/index.js +122 -0
- package/apps/api/index.js.map +1 -0
- package/apps/awsUtils.d.ts +3 -0
- package/apps/awsUtils.js +23 -0
- package/apps/awsUtils.js.map +1 -0
- package/apps/common/CoreOutput.d.ts +21 -0
- package/apps/common/CoreOutput.js +50 -0
- package/apps/common/CoreOutput.js.map +1 -0
- package/apps/common/VpcConfig.d.ts +8 -0
- package/apps/common/VpcConfig.js +37 -0
- package/apps/common/VpcConfig.js.map +1 -0
- package/apps/common/index.d.ts +2 -0
- package/apps/common/index.js +31 -0
- package/apps/common/index.js.map +1 -0
- package/apps/core/CoreCognito.d.ts +10 -0
- package/apps/core/CoreCognito.js +100 -0
- package/apps/core/CoreCognito.js.map +1 -0
- package/apps/core/CoreDynamo.d.ts +5 -0
- package/apps/core/CoreDynamo.js +51 -0
- package/apps/core/CoreDynamo.js.map +1 -0
- package/apps/core/CoreElasticSearch.d.ts +16 -0
- package/apps/core/CoreElasticSearch.js +286 -0
- package/apps/core/CoreElasticSearch.js.map +1 -0
- package/apps/core/CoreEventBus.d.ts +1 -0
- package/apps/core/CoreEventBus.js +25 -0
- package/apps/core/CoreEventBus.js.map +1 -0
- package/apps/core/CoreFileManager.d.ts +8 -0
- package/apps/core/CoreFileManager.js +55 -0
- package/apps/core/CoreFileManager.js.map +1 -0
- package/apps/core/CoreVpc.d.ts +13 -0
- package/apps/core/CoreVpc.js +148 -0
- package/apps/core/CoreVpc.js.map +1 -0
- package/apps/core/createCorePulumiApp.d.ts +64 -0
- package/apps/core/createCorePulumiApp.js +104 -0
- package/apps/core/createCorePulumiApp.js.map +1 -0
- package/apps/core/index.d.ts +6 -0
- package/apps/core/index.js +83 -0
- package/apps/core/index.js.map +1 -0
- package/apps/createAppBucket.d.ts +13 -0
- package/apps/createAppBucket.js +106 -0
- package/apps/createAppBucket.js.map +1 -0
- package/apps/customDomain.d.ts +9 -0
- package/apps/customDomain.js +14 -0
- package/apps/customDomain.js.map +1 -0
- package/apps/index.d.ts +7 -0
- package/apps/index.js +100 -0
- package/apps/index.js.map +1 -0
- package/apps/lambdaUtils.d.ts +10 -0
- package/apps/lambdaUtils.js +82 -0
- package/apps/lambdaUtils.js.map +1 -0
- package/apps/react/createReactPulumiApp.d.ts +33 -0
- package/apps/react/createReactPulumiApp.js +144 -0
- package/apps/react/createReactPulumiApp.js.map +1 -0
- package/apps/react/index.d.ts +1 -0
- package/apps/react/index.js +18 -0
- package/apps/react/index.js.map +1 -0
- package/apps/tenantRouter.d.ts +3 -0
- package/apps/tenantRouter.js +115 -0
- package/apps/tenantRouter.js.map +1 -0
- package/apps/website/WebsitePrerendering.d.ts +39 -0
- package/apps/website/WebsitePrerendering.js +300 -0
- package/apps/website/WebsitePrerendering.js.map +1 -0
- package/apps/website/createWebsitePulumiApp.d.ts +74 -0
- package/apps/website/createWebsitePulumiApp.js +246 -0
- package/apps/website/createWebsitePulumiApp.js.map +1 -0
- package/apps/website/deliveryViewerRequest.d.ts +2 -0
- package/apps/website/deliveryViewerRequest.js +32 -0
- package/apps/website/deliveryViewerRequest.js.map +1 -0
- package/apps/website/index.d.ts +1 -0
- package/apps/website/index.js +18 -0
- package/apps/website/index.js.map +1 -0
- package/components/tenantRouter/WebsiteTenantRouter.d.ts +11 -0
- package/components/tenantRouter/WebsiteTenantRouter.js +98 -0
- package/components/tenantRouter/WebsiteTenantRouter.js.map +1 -0
- package/components/tenantRouter/functions/origin/request.d.ts +1 -0
- package/components/tenantRouter/functions/origin/request.js +129 -0
- package/components/tenantRouter/functions/origin/request.js.map +1 -0
- package/enterprise/createAdminPulumiApp.d.ts +1 -0
- package/enterprise/createAdminPulumiApp.js +25 -0
- package/enterprise/createAdminPulumiApp.js.map +1 -0
- package/enterprise/createApiPulumiApp.d.ts +61 -0
- package/enterprise/createApiPulumiApp.js +68 -0
- package/enterprise/createApiPulumiApp.js.map +1 -0
- package/enterprise/createCorePulumiApp.d.ts +42 -0
- package/enterprise/createCorePulumiApp.js +137 -0
- package/enterprise/createCorePulumiApp.js.map +1 -0
- package/enterprise/createWebsitePulumiApp.d.ts +56 -0
- package/enterprise/createWebsitePulumiApp.js +68 -0
- package/enterprise/createWebsitePulumiApp.js.map +1 -0
- package/enterprise/index.d.ts +4 -0
- package/enterprise/index.js +57 -0
- package/enterprise/index.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.js +44 -0
- package/index.js.map +1 -0
- package/package.json +53 -0
- package/utils/crawlDirectory.d.ts +1 -0
- package/utils/crawlDirectory.js +33 -0
- package/utils/crawlDirectory.js.map +1 -0
- package/utils/getPresignedPost.d.ts +11 -0
- package/utils/getPresignedPost.js +46 -0
- package/utils/getPresignedPost.js.map +1 -0
- package/utils/index.d.ts +3 -0
- package/utils/index.js +51 -0
- package/utils/index.js.map +1 -0
- package/utils/lambdaEnvVariables.d.ts +20 -0
- package/utils/lambdaEnvVariables.js +78 -0
- package/utils/lambdaEnvVariables.js.map +1 -0
- package/utils/storageMigrate.d.ts +0 -0
- package/utils/storageMigrate.js +292 -0
- package/utils/storageMigrate.js.map +1 -0
- package/utils/tagResources.d.ts +5 -0
- package/utils/tagResources.js +43 -0
- package/utils/tagResources.js.map +1 -0
- package/utils/uploadFolderToS3.d.ts +26 -0
- package/utils/uploadFolderToS3.js +188 -0
- package/utils/uploadFolderToS3.js.map +1 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _ApiApwScheduler = require("./ApiApwScheduler");
|
|
8
|
+
|
|
9
|
+
Object.keys(_ApiApwScheduler).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _ApiApwScheduler[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _ApiApwScheduler[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _ApiCloudfront = require("./ApiCloudfront");
|
|
21
|
+
|
|
22
|
+
Object.keys(_ApiCloudfront).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _ApiCloudfront[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _ApiCloudfront[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _ApiFileManager = require("./ApiFileManager");
|
|
34
|
+
|
|
35
|
+
Object.keys(_ApiFileManager).forEach(function (key) {
|
|
36
|
+
if (key === "default" || key === "__esModule") return;
|
|
37
|
+
if (key in exports && exports[key] === _ApiFileManager[key]) return;
|
|
38
|
+
Object.defineProperty(exports, key, {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _ApiFileManager[key];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
var _ApiGateway = require("./ApiGateway");
|
|
47
|
+
|
|
48
|
+
Object.keys(_ApiGateway).forEach(function (key) {
|
|
49
|
+
if (key === "default" || key === "__esModule") return;
|
|
50
|
+
if (key in exports && exports[key] === _ApiGateway[key]) return;
|
|
51
|
+
Object.defineProperty(exports, key, {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return _ApiGateway[key];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
var _ApiGraphql = require("./ApiGraphql");
|
|
60
|
+
|
|
61
|
+
Object.keys(_ApiGraphql).forEach(function (key) {
|
|
62
|
+
if (key === "default" || key === "__esModule") return;
|
|
63
|
+
if (key in exports && exports[key] === _ApiGraphql[key]) return;
|
|
64
|
+
Object.defineProperty(exports, key, {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () {
|
|
67
|
+
return _ApiGraphql[key];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
var _ApiHeadlessCMS = require("./ApiHeadlessCMS");
|
|
73
|
+
|
|
74
|
+
Object.keys(_ApiHeadlessCMS).forEach(function (key) {
|
|
75
|
+
if (key === "default" || key === "__esModule") return;
|
|
76
|
+
if (key in exports && exports[key] === _ApiHeadlessCMS[key]) return;
|
|
77
|
+
Object.defineProperty(exports, key, {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () {
|
|
80
|
+
return _ApiHeadlessCMS[key];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
var _ApiPageBuilder = require("./ApiPageBuilder");
|
|
86
|
+
|
|
87
|
+
Object.keys(_ApiPageBuilder).forEach(function (key) {
|
|
88
|
+
if (key === "default" || key === "__esModule") return;
|
|
89
|
+
if (key in exports && exports[key] === _ApiPageBuilder[key]) return;
|
|
90
|
+
Object.defineProperty(exports, key, {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _ApiPageBuilder[key];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
var _createApiPulumiApp = require("./createApiPulumiApp");
|
|
99
|
+
|
|
100
|
+
Object.keys(_createApiPulumiApp).forEach(function (key) {
|
|
101
|
+
if (key === "default" || key === "__esModule") return;
|
|
102
|
+
if (key in exports && exports[key] === _createApiPulumiApp[key]) return;
|
|
103
|
+
Object.defineProperty(exports, key, {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () {
|
|
106
|
+
return _createApiPulumiApp[key];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
var _ApiOutput = require("./ApiOutput");
|
|
112
|
+
|
|
113
|
+
Object.keys(_ApiOutput).forEach(function (key) {
|
|
114
|
+
if (key === "default" || key === "__esModule") return;
|
|
115
|
+
if (key in exports && exports[key] === _ApiOutput[key]) return;
|
|
116
|
+
Object.defineProperty(exports, key, {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () {
|
|
119
|
+
return _ApiOutput[key];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ApiApwScheduler\";\nexport * from \"./ApiCloudfront\";\nexport * from \"./ApiFileManager\";\nexport * from \"./ApiGateway\";\nexport * from \"./ApiGraphql\";\nexport * from \"./ApiHeadlessCMS\";\nexport * from \"./ApiPageBuilder\";\nexport * from \"./createApiPulumiApp\";\nexport * from \"./ApiOutput\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PulumiApp } from "@webiny/pulumi";
|
|
2
|
+
export declare function getAwsAccountId(app: PulumiApp): import("@pulumi/pulumi").Output<string>;
|
|
3
|
+
export declare function getAwsRegion(app: PulumiApp): import("@pulumi/pulumi").Output<"af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-southeast-2" | "ap-southeast-1" | "ca-central-1" | "cn-north-1" | "cn-northwest-1" | "eu-central-1" | "eu-north-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "me-south-1" | "sa-east-1" | "us-gov-east-1" | "us-gov-west-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2">;
|
package/apps/awsUtils.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.getAwsAccountId = getAwsAccountId;
|
|
9
|
+
exports.getAwsRegion = getAwsRegion;
|
|
10
|
+
|
|
11
|
+
var aws = _interopRequireWildcard(require("@pulumi/aws"));
|
|
12
|
+
|
|
13
|
+
function getAwsAccountId(app) {
|
|
14
|
+
return app.addHandler(() => {
|
|
15
|
+
return aws.getCallerIdentity({}).then(x => x.accountId);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getAwsRegion(app) {
|
|
20
|
+
return app.addHandler(() => {
|
|
21
|
+
return aws.config.requireRegion();
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getAwsAccountId","app","addHandler","aws","getCallerIdentity","then","x","accountId","getAwsRegion","config","requireRegion"],"sources":["awsUtils.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { PulumiApp } from \"@webiny/pulumi\";\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"],"mappings":";;;;;;;;;;AAAA;;AAGO,SAASA,eAAT,CAAyBC,GAAzB,EAAyC;EAC5C,OAAOA,GAAG,CAACC,UAAJ,CAAe,MAAM;IACxB,OAAOC,GAAG,CAACC,iBAAJ,CAAsB,EAAtB,EAA0BC,IAA1B,CAA+BC,CAAC,IAAIA,CAAC,CAACC,SAAtC,CAAP;EACH,CAFM,CAAP;AAGH;;AAEM,SAASC,YAAT,CAAsBP,GAAtB,EAAsC;EACzC,OAAOA,GAAG,CAACC,UAAJ,CAAe,MAAM;IACxB,OAAOC,GAAG,CAACM,MAAJ,CAAWC,aAAX,EAAP;EACH,CAFM,CAAP;AAGH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PulumiAppModule } from "@webiny/pulumi";
|
|
2
|
+
export declare type CoreOutput = PulumiAppModule<typeof CoreOutput>;
|
|
3
|
+
export declare const CoreOutput: import("@webiny/pulumi").PulumiAppModuleDefinition<import("@pulumi/pulumi").Output<import("@pulumi/pulumi").UnwrappedObject<{
|
|
4
|
+
fileManagerBucketId: string;
|
|
5
|
+
primaryDynamodbTableArn: string;
|
|
6
|
+
primaryDynamodbTableName: string;
|
|
7
|
+
primaryDynamodbTableHashKey: string;
|
|
8
|
+
primaryDynamodbTableRangeKey: string;
|
|
9
|
+
cognitoUserPoolId: string;
|
|
10
|
+
cognitoUserPoolArn: string;
|
|
11
|
+
cognitoUserPoolPasswordPolicy: string;
|
|
12
|
+
cognitoAppClientId: string;
|
|
13
|
+
eventBusArn: string;
|
|
14
|
+
vpcPublicSubnetIds: string[] | undefined;
|
|
15
|
+
vpcPrivateSubnetIds: string[] | undefined;
|
|
16
|
+
vpcSecurityGroupIds: string[] | undefined;
|
|
17
|
+
elasticsearchDomainArn: string | undefined;
|
|
18
|
+
elasticsearchDomainEndpoint: string | undefined;
|
|
19
|
+
elasticsearchDynamodbTableArn: string | undefined;
|
|
20
|
+
elasticsearchDynamodbTableName: string | undefined;
|
|
21
|
+
}>>, void>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CoreOutput = void 0;
|
|
7
|
+
|
|
8
|
+
var _pulumi = require("@webiny/pulumi");
|
|
9
|
+
|
|
10
|
+
var _utils = require("@webiny/cli-plugin-deploy-pulumi/utils");
|
|
11
|
+
|
|
12
|
+
const CoreOutput = (0, _pulumi.createAppModule)({
|
|
13
|
+
name: "CoreOutput",
|
|
14
|
+
|
|
15
|
+
config(app) {
|
|
16
|
+
return app.addHandler(async () => {
|
|
17
|
+
const output = (0, _utils.getStackOutput)({
|
|
18
|
+
folder: "apps/core",
|
|
19
|
+
env: app.params.run.env
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
if (!output) {
|
|
23
|
+
throw new Error("Core application is not deployed.");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
fileManagerBucketId: output["fileManagerBucketId"],
|
|
28
|
+
primaryDynamodbTableArn: output["primaryDynamodbTableArn"],
|
|
29
|
+
primaryDynamodbTableName: output["primaryDynamodbTableName"],
|
|
30
|
+
primaryDynamodbTableHashKey: output["primaryDynamodbTableHashKey"],
|
|
31
|
+
primaryDynamodbTableRangeKey: output["primaryDynamodbTableRangeKey"],
|
|
32
|
+
cognitoUserPoolId: output["cognitoUserPoolId"],
|
|
33
|
+
cognitoUserPoolArn: output["cognitoUserPoolArn"],
|
|
34
|
+
cognitoUserPoolPasswordPolicy: output["cognitoUserPoolPasswordPolicy"],
|
|
35
|
+
cognitoAppClientId: output["cognitoAppClientId"],
|
|
36
|
+
eventBusArn: output["eventBusArn"],
|
|
37
|
+
// These outputs are optional, since VPC is not always enabled.
|
|
38
|
+
vpcPublicSubnetIds: output["vpcPublicSubnetIds"],
|
|
39
|
+
vpcPrivateSubnetIds: output["vpcPrivateSubnetIds"],
|
|
40
|
+
vpcSecurityGroupIds: output["vpcSecurityGroupIds"],
|
|
41
|
+
elasticsearchDomainArn: output["elasticsearchDomainArn"],
|
|
42
|
+
elasticsearchDomainEndpoint: output["elasticsearchDomainEndpoint"],
|
|
43
|
+
elasticsearchDynamodbTableArn: output["elasticsearchDynamodbTableArn"],
|
|
44
|
+
elasticsearchDynamodbTableName: output["elasticsearchDynamodbTableName"]
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
});
|
|
50
|
+
exports.CoreOutput = CoreOutput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CoreOutput","createAppModule","name","config","app","addHandler","output","getStackOutput","folder","env","params","run","Error","fileManagerBucketId","primaryDynamodbTableArn","primaryDynamodbTableName","primaryDynamodbTableHashKey","primaryDynamodbTableRangeKey","cognitoUserPoolId","cognitoUserPoolArn","cognitoUserPoolPasswordPolicy","cognitoAppClientId","eventBusArn","vpcPublicSubnetIds","vpcPrivateSubnetIds","vpcSecurityGroupIds","elasticsearchDomainArn","elasticsearchDomainEndpoint","elasticsearchDynamodbTableArn","elasticsearchDynamodbTableName"],"sources":["CoreOutput.ts"],"sourcesContent":["import { createAppModule, PulumiAppModule } from \"@webiny/pulumi\";\nimport { getStackOutput } from \"@webiny/cli-plugin-deploy-pulumi/utils\";\n\nexport type CoreOutput = PulumiAppModule<typeof CoreOutput>;\n\nexport const CoreOutput = createAppModule({\n name: \"CoreOutput\",\n config(app) {\n return app.addHandler(async () => {\n const output = getStackOutput({\n folder: \"apps/core\",\n env: app.params.run.env\n });\n\n if (!output) {\n throw new Error(\"Core application is not deployed.\");\n }\n\n return {\n fileManagerBucketId: output[\"fileManagerBucketId\"] as string,\n primaryDynamodbTableArn: output[\"primaryDynamodbTableArn\"] as string,\n primaryDynamodbTableName: output[\"primaryDynamodbTableName\"] as string,\n primaryDynamodbTableHashKey: output[\"primaryDynamodbTableHashKey\"] as string,\n primaryDynamodbTableRangeKey: output[\"primaryDynamodbTableRangeKey\"] as string,\n cognitoUserPoolId: output[\"cognitoUserPoolId\"] as string,\n cognitoUserPoolArn: output[\"cognitoUserPoolArn\"] as string,\n cognitoUserPoolPasswordPolicy: output[\"cognitoUserPoolPasswordPolicy\"] as string,\n cognitoAppClientId: output[\"cognitoAppClientId\"] as string,\n eventBusArn: output[\"eventBusArn\"] as string,\n // These outputs are optional, since VPC is not always enabled.\n vpcPublicSubnetIds: output[\"vpcPublicSubnetIds\"] as string[] | undefined,\n vpcPrivateSubnetIds: output[\"vpcPrivateSubnetIds\"] as string[] | undefined,\n vpcSecurityGroupIds: output[\"vpcSecurityGroupIds\"] as string[] | undefined,\n\n elasticsearchDomainArn: output[\"elasticsearchDomainArn\"] as string | undefined,\n elasticsearchDomainEndpoint: output[\"elasticsearchDomainEndpoint\"] as\n | string\n | undefined,\n elasticsearchDynamodbTableArn: output[\"elasticsearchDynamodbTableArn\"] as\n | string\n | undefined,\n elasticsearchDynamodbTableName: output[\"elasticsearchDynamodbTableName\"] as\n | string\n | undefined\n };\n });\n }\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAIO,MAAMA,UAAU,GAAG,IAAAC,uBAAA,EAAgB;EACtCC,IAAI,EAAE,YADgC;;EAEtCC,MAAM,CAACC,GAAD,EAAM;IACR,OAAOA,GAAG,CAACC,UAAJ,CAAe,YAAY;MAC9B,MAAMC,MAAM,GAAG,IAAAC,qBAAA,EAAe;QAC1BC,MAAM,EAAE,WADkB;QAE1BC,GAAG,EAAEL,GAAG,CAACM,MAAJ,CAAWC,GAAX,CAAeF;MAFM,CAAf,CAAf;;MAKA,IAAI,CAACH,MAAL,EAAa;QACT,MAAM,IAAIM,KAAJ,CAAU,mCAAV,CAAN;MACH;;MAED,OAAO;QACHC,mBAAmB,EAAEP,MAAM,CAAC,qBAAD,CADxB;QAEHQ,uBAAuB,EAAER,MAAM,CAAC,yBAAD,CAF5B;QAGHS,wBAAwB,EAAET,MAAM,CAAC,0BAAD,CAH7B;QAIHU,2BAA2B,EAAEV,MAAM,CAAC,6BAAD,CAJhC;QAKHW,4BAA4B,EAAEX,MAAM,CAAC,8BAAD,CALjC;QAMHY,iBAAiB,EAAEZ,MAAM,CAAC,mBAAD,CANtB;QAOHa,kBAAkB,EAAEb,MAAM,CAAC,oBAAD,CAPvB;QAQHc,6BAA6B,EAAEd,MAAM,CAAC,+BAAD,CARlC;QASHe,kBAAkB,EAAEf,MAAM,CAAC,oBAAD,CATvB;QAUHgB,WAAW,EAAEhB,MAAM,CAAC,aAAD,CAVhB;QAWH;QACAiB,kBAAkB,EAAEjB,MAAM,CAAC,oBAAD,CAZvB;QAaHkB,mBAAmB,EAAElB,MAAM,CAAC,qBAAD,CAbxB;QAcHmB,mBAAmB,EAAEnB,MAAM,CAAC,qBAAD,CAdxB;QAgBHoB,sBAAsB,EAAEpB,MAAM,CAAC,wBAAD,CAhB3B;QAiBHqB,2BAA2B,EAAErB,MAAM,CAAC,6BAAD,CAjBhC;QAoBHsB,6BAA6B,EAAEtB,MAAM,CAAC,+BAAD,CApBlC;QAuBHuB,8BAA8B,EAAEvB,MAAM,CAAC,gCAAD;MAvBnC,CAAP;IA2BH,CArCM,CAAP;EAsCH;;AAzCqC,CAAhB,CAAnB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as aws from "@pulumi/aws";
|
|
2
|
+
export interface VpcParams {
|
|
3
|
+
enabled: boolean | undefined;
|
|
4
|
+
}
|
|
5
|
+
export declare const VpcConfig: import("@webiny/pulumi").PulumiAppModuleDefinition<import("@pulumi/pulumi").Output<{
|
|
6
|
+
functionVpcConfig: aws.types.input.lambda.FunctionVpcConfig;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
}>, VpcParams>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VpcConfig = void 0;
|
|
7
|
+
|
|
8
|
+
var _pulumi = require("@webiny/pulumi");
|
|
9
|
+
|
|
10
|
+
var _CoreOutput = require("./CoreOutput");
|
|
11
|
+
|
|
12
|
+
const VpcConfig = (0, _pulumi.createAppModule)({
|
|
13
|
+
name: "VpcConfig",
|
|
14
|
+
|
|
15
|
+
config(app, params) {
|
|
16
|
+
return app.getModule(_CoreOutput.CoreOutput).apply(core => {
|
|
17
|
+
const functionVpcConfig = {
|
|
18
|
+
subnetIds: [],
|
|
19
|
+
securityGroupIds: []
|
|
20
|
+
};
|
|
21
|
+
const enabled = Boolean(params.enabled);
|
|
22
|
+
|
|
23
|
+
if (enabled) {
|
|
24
|
+
// If VPC is not manually disabled we extract details from core.
|
|
25
|
+
functionVpcConfig.subnetIds = core.vpcPrivateSubnetIds || [];
|
|
26
|
+
functionVpcConfig.securityGroupIds = core.vpcSecurityGroupIds || [];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
functionVpcConfig,
|
|
31
|
+
enabled
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
});
|
|
37
|
+
exports.VpcConfig = VpcConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["VpcConfig","createAppModule","name","config","app","params","getModule","CoreOutput","apply","core","functionVpcConfig","subnetIds","securityGroupIds","enabled","Boolean","vpcPrivateSubnetIds","vpcSecurityGroupIds"],"sources":["VpcConfig.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\n\nimport { createAppModule } from \"@webiny/pulumi\";\nimport { CoreOutput } from \"./CoreOutput\";\n\nexport interface VpcParams {\n enabled: boolean | undefined;\n}\n\nexport const VpcConfig = createAppModule({\n name: \"VpcConfig\",\n config(app, params: VpcParams) {\n return app.getModule(CoreOutput).apply(core => {\n const functionVpcConfig: aws.types.input.lambda.FunctionVpcConfig = {\n subnetIds: [],\n securityGroupIds: []\n };\n\n const enabled = Boolean(params.enabled);\n\n if (enabled) {\n // If VPC is not manually disabled we extract details from core.\n functionVpcConfig.subnetIds = core.vpcPrivateSubnetIds || [];\n functionVpcConfig.securityGroupIds = core.vpcSecurityGroupIds || [];\n }\n\n return {\n functionVpcConfig,\n enabled\n };\n });\n }\n});\n"],"mappings":";;;;;;;AAEA;;AACA;;AAMO,MAAMA,SAAS,GAAG,IAAAC,uBAAA,EAAgB;EACrCC,IAAI,EAAE,WAD+B;;EAErCC,MAAM,CAACC,GAAD,EAAMC,MAAN,EAAyB;IAC3B,OAAOD,GAAG,CAACE,SAAJ,CAAcC,sBAAd,EAA0BC,KAA1B,CAAgCC,IAAI,IAAI;MAC3C,MAAMC,iBAA2D,GAAG;QAChEC,SAAS,EAAE,EADqD;QAEhEC,gBAAgB,EAAE;MAF8C,CAApE;MAKA,MAAMC,OAAO,GAAGC,OAAO,CAACT,MAAM,CAACQ,OAAR,CAAvB;;MAEA,IAAIA,OAAJ,EAAa;QACT;QACAH,iBAAiB,CAACC,SAAlB,GAA8BF,IAAI,CAACM,mBAAL,IAA4B,EAA1D;QACAL,iBAAiB,CAACE,gBAAlB,GAAqCH,IAAI,CAACO,mBAAL,IAA4B,EAAjE;MACH;;MAED,OAAO;QACHN,iBADG;QAEHG;MAFG,CAAP;IAIH,CAlBM,CAAP;EAmBH;;AAtBoC,CAAhB,CAAlB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _CoreOutput = require("./CoreOutput");
|
|
8
|
+
|
|
9
|
+
Object.keys(_CoreOutput).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _CoreOutput[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _CoreOutput[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _VpcConfig = require("./VpcConfig");
|
|
21
|
+
|
|
22
|
+
Object.keys(_VpcConfig).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _VpcConfig[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _VpcConfig[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./CoreOutput\";\nexport * from \"./VpcConfig\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PulumiAppModule } from "@webiny/pulumi";
|
|
2
|
+
export interface CoreCognitoParams {
|
|
3
|
+
protect: boolean;
|
|
4
|
+
useEmailAsUsername: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare type CoreCognito = PulumiAppModule<typeof CoreCognito>;
|
|
7
|
+
export declare const CoreCognito: import("@webiny/pulumi").PulumiAppModuleDefinition<{
|
|
8
|
+
userPool: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cognito/userPool").UserPool>;
|
|
9
|
+
userPoolClient: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cognito/userPoolClient").UserPoolClient>;
|
|
10
|
+
}, CoreCognitoParams>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.CoreCognito = void 0;
|
|
9
|
+
|
|
10
|
+
var aws = _interopRequireWildcard(require("@pulumi/aws"));
|
|
11
|
+
|
|
12
|
+
var _pulumi = require("@webiny/pulumi");
|
|
13
|
+
|
|
14
|
+
const CoreCognito = (0, _pulumi.createAppModule)({
|
|
15
|
+
name: "Cognito",
|
|
16
|
+
|
|
17
|
+
config(app, params) {
|
|
18
|
+
const userPool = app.addResource(aws.cognito.UserPool, {
|
|
19
|
+
name: "user-pool",
|
|
20
|
+
config: {
|
|
21
|
+
passwordPolicy: {
|
|
22
|
+
minimumLength: 8,
|
|
23
|
+
requireLowercase: false,
|
|
24
|
+
requireNumbers: false,
|
|
25
|
+
requireSymbols: false,
|
|
26
|
+
requireUppercase: false,
|
|
27
|
+
temporaryPasswordValidityDays: 7
|
|
28
|
+
},
|
|
29
|
+
adminCreateUserConfig: {
|
|
30
|
+
allowAdminCreateUserOnly: true
|
|
31
|
+
},
|
|
32
|
+
autoVerifiedAttributes: ["email"],
|
|
33
|
+
emailConfiguration: {
|
|
34
|
+
emailSendingAccount: "COGNITO_DEFAULT"
|
|
35
|
+
},
|
|
36
|
+
// In a legacy setup we use email as username.
|
|
37
|
+
// We need to provide a way for users to have this setup,
|
|
38
|
+
// because changing it would require whole cognito pool to be recreated.
|
|
39
|
+
usernameAttributes: params.useEmailAsUsername ? ["email"] : undefined,
|
|
40
|
+
aliasAttributes: params.useEmailAsUsername ? undefined : ["preferred_username"],
|
|
41
|
+
lambdaConfig: {},
|
|
42
|
+
mfaConfiguration: "OFF",
|
|
43
|
+
userPoolAddOns: {
|
|
44
|
+
advancedSecurityMode: "OFF"
|
|
45
|
+
/* required */
|
|
46
|
+
|
|
47
|
+
},
|
|
48
|
+
verificationMessageTemplate: {
|
|
49
|
+
defaultEmailOption: "CONFIRM_WITH_CODE"
|
|
50
|
+
},
|
|
51
|
+
schemas: [{
|
|
52
|
+
attributeDataType: "String",
|
|
53
|
+
name: "email",
|
|
54
|
+
required: true,
|
|
55
|
+
developerOnlyAttribute: false,
|
|
56
|
+
mutable: true,
|
|
57
|
+
stringAttributeConstraints: {
|
|
58
|
+
maxLength: "2048",
|
|
59
|
+
minLength: "0"
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
attributeDataType: "String",
|
|
63
|
+
name: "family_name",
|
|
64
|
+
required: true,
|
|
65
|
+
developerOnlyAttribute: false,
|
|
66
|
+
mutable: true,
|
|
67
|
+
stringAttributeConstraints: {
|
|
68
|
+
maxLength: "2048",
|
|
69
|
+
minLength: "0"
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
attributeDataType: "String",
|
|
73
|
+
name: "given_name",
|
|
74
|
+
required: true,
|
|
75
|
+
developerOnlyAttribute: false,
|
|
76
|
+
mutable: true,
|
|
77
|
+
stringAttributeConstraints: {
|
|
78
|
+
maxLength: "2048",
|
|
79
|
+
minLength: "0"
|
|
80
|
+
}
|
|
81
|
+
}]
|
|
82
|
+
},
|
|
83
|
+
opts: {
|
|
84
|
+
protect: params.protect
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const userPoolClient = app.addResource(aws.cognito.UserPoolClient, {
|
|
88
|
+
name: "user-pool-client",
|
|
89
|
+
config: {
|
|
90
|
+
userPoolId: userPool.output.id
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
return {
|
|
94
|
+
userPool,
|
|
95
|
+
userPoolClient
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
});
|
|
100
|
+
exports.CoreCognito = CoreCognito;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CoreCognito","createAppModule","name","config","app","params","userPool","addResource","aws","cognito","UserPool","passwordPolicy","minimumLength","requireLowercase","requireNumbers","requireSymbols","requireUppercase","temporaryPasswordValidityDays","adminCreateUserConfig","allowAdminCreateUserOnly","autoVerifiedAttributes","emailConfiguration","emailSendingAccount","usernameAttributes","useEmailAsUsername","undefined","aliasAttributes","lambdaConfig","mfaConfiguration","userPoolAddOns","advancedSecurityMode","verificationMessageTemplate","defaultEmailOption","schemas","attributeDataType","required","developerOnlyAttribute","mutable","stringAttributeConstraints","maxLength","minLength","opts","protect","userPoolClient","UserPoolClient","userPoolId","output","id"],"sources":["CoreCognito.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\n\nexport interface CoreCognitoParams {\n protect: boolean;\n useEmailAsUsername: boolean;\n}\n\nexport type CoreCognito = PulumiAppModule<typeof CoreCognito>;\n\nexport const CoreCognito = createAppModule({\n name: \"Cognito\",\n config(app: PulumiApp, params: CoreCognitoParams) {\n const userPool = app.addResource(aws.cognito.UserPool, {\n name: \"user-pool\",\n config: {\n passwordPolicy: {\n minimumLength: 8,\n requireLowercase: false,\n requireNumbers: false,\n requireSymbols: false,\n requireUppercase: false,\n temporaryPasswordValidityDays: 7\n },\n adminCreateUserConfig: {\n allowAdminCreateUserOnly: true\n },\n autoVerifiedAttributes: [\"email\"],\n emailConfiguration: {\n emailSendingAccount: \"COGNITO_DEFAULT\"\n },\n // In a legacy setup we use email as username.\n // We need to provide a way for users to have this setup,\n // because changing it would require whole cognito pool to be recreated.\n usernameAttributes: params.useEmailAsUsername ? [\"email\"] : undefined,\n aliasAttributes: params.useEmailAsUsername ? undefined : [\"preferred_username\"],\n lambdaConfig: {},\n mfaConfiguration: \"OFF\",\n userPoolAddOns: {\n advancedSecurityMode: \"OFF\" /* required */\n },\n verificationMessageTemplate: {\n defaultEmailOption: \"CONFIRM_WITH_CODE\"\n },\n schemas: [\n {\n attributeDataType: \"String\",\n name: \"email\",\n required: true,\n developerOnlyAttribute: false,\n mutable: true,\n stringAttributeConstraints: {\n maxLength: \"2048\",\n minLength: \"0\"\n }\n },\n {\n attributeDataType: \"String\",\n name: \"family_name\",\n required: true,\n developerOnlyAttribute: false,\n mutable: true,\n stringAttributeConstraints: {\n maxLength: \"2048\",\n minLength: \"0\"\n }\n },\n {\n attributeDataType: \"String\",\n name: \"given_name\",\n required: true,\n developerOnlyAttribute: false,\n mutable: true,\n stringAttributeConstraints: {\n maxLength: \"2048\",\n minLength: \"0\"\n }\n }\n ]\n },\n opts: {\n protect: params.protect\n }\n });\n\n const userPoolClient = app.addResource(aws.cognito.UserPoolClient, {\n name: \"user-pool-client\",\n config: {\n userPoolId: userPool.output.id\n }\n });\n\n return {\n userPool,\n userPoolClient\n };\n }\n});\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AASO,MAAMA,WAAW,GAAG,IAAAC,uBAAA,EAAgB;EACvCC,IAAI,EAAE,SADiC;;EAEvCC,MAAM,CAACC,GAAD,EAAiBC,MAAjB,EAA4C;IAC9C,MAAMC,QAAQ,GAAGF,GAAG,CAACG,WAAJ,CAAgBC,GAAG,CAACC,OAAJ,CAAYC,QAA5B,EAAsC;MACnDR,IAAI,EAAE,WAD6C;MAEnDC,MAAM,EAAE;QACJQ,cAAc,EAAE;UACZC,aAAa,EAAE,CADH;UAEZC,gBAAgB,EAAE,KAFN;UAGZC,cAAc,EAAE,KAHJ;UAIZC,cAAc,EAAE,KAJJ;UAKZC,gBAAgB,EAAE,KALN;UAMZC,6BAA6B,EAAE;QANnB,CADZ;QASJC,qBAAqB,EAAE;UACnBC,wBAAwB,EAAE;QADP,CATnB;QAYJC,sBAAsB,EAAE,CAAC,OAAD,CAZpB;QAaJC,kBAAkB,EAAE;UAChBC,mBAAmB,EAAE;QADL,CAbhB;QAgBJ;QACA;QACA;QACAC,kBAAkB,EAAElB,MAAM,CAACmB,kBAAP,GAA4B,CAAC,OAAD,CAA5B,GAAwCC,SAnBxD;QAoBJC,eAAe,EAAErB,MAAM,CAACmB,kBAAP,GAA4BC,SAA5B,GAAwC,CAAC,oBAAD,CApBrD;QAqBJE,YAAY,EAAE,EArBV;QAsBJC,gBAAgB,EAAE,KAtBd;QAuBJC,cAAc,EAAE;UACZC,oBAAoB,EAAE;UAAM;;QADhB,CAvBZ;QA0BJC,2BAA2B,EAAE;UACzBC,kBAAkB,EAAE;QADK,CA1BzB;QA6BJC,OAAO,EAAE,CACL;UACIC,iBAAiB,EAAE,QADvB;UAEIhC,IAAI,EAAE,OAFV;UAGIiC,QAAQ,EAAE,IAHd;UAIIC,sBAAsB,EAAE,KAJ5B;UAKIC,OAAO,EAAE,IALb;UAMIC,0BAA0B,EAAE;YACxBC,SAAS,EAAE,MADa;YAExBC,SAAS,EAAE;UAFa;QANhC,CADK,EAYL;UACIN,iBAAiB,EAAE,QADvB;UAEIhC,IAAI,EAAE,aAFV;UAGIiC,QAAQ,EAAE,IAHd;UAIIC,sBAAsB,EAAE,KAJ5B;UAKIC,OAAO,EAAE,IALb;UAMIC,0BAA0B,EAAE;YACxBC,SAAS,EAAE,MADa;YAExBC,SAAS,EAAE;UAFa;QANhC,CAZK,EAuBL;UACIN,iBAAiB,EAAE,QADvB;UAEIhC,IAAI,EAAE,YAFV;UAGIiC,QAAQ,EAAE,IAHd;UAIIC,sBAAsB,EAAE,KAJ5B;UAKIC,OAAO,EAAE,IALb;UAMIC,0BAA0B,EAAE;YACxBC,SAAS,EAAE,MADa;YAExBC,SAAS,EAAE;UAFa;QANhC,CAvBK;MA7BL,CAF2C;MAmEnDC,IAAI,EAAE;QACFC,OAAO,EAAErC,MAAM,CAACqC;MADd;IAnE6C,CAAtC,CAAjB;IAwEA,MAAMC,cAAc,GAAGvC,GAAG,CAACG,WAAJ,CAAgBC,GAAG,CAACC,OAAJ,CAAYmC,cAA5B,EAA4C;MAC/D1C,IAAI,EAAE,kBADyD;MAE/DC,MAAM,EAAE;QACJ0C,UAAU,EAAEvC,QAAQ,CAACwC,MAAT,CAAgBC;MADxB;IAFuD,CAA5C,CAAvB;IAOA,OAAO;MACHzC,QADG;MAEHqC;IAFG,CAAP;EAIH;;AAtFsC,CAAhB,CAApB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PulumiAppModule } from "@webiny/pulumi";
|
|
2
|
+
export declare type CoreDynamo = PulumiAppModule<typeof CoreDynamo>;
|
|
3
|
+
export declare const CoreDynamo: import("@webiny/pulumi").PulumiAppModuleDefinition<import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/dynamodb/table").Table>, {
|
|
4
|
+
protect: boolean;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.CoreDynamo = void 0;
|
|
9
|
+
|
|
10
|
+
var aws = _interopRequireWildcard(require("@pulumi/aws"));
|
|
11
|
+
|
|
12
|
+
var _pulumi = require("@webiny/pulumi");
|
|
13
|
+
|
|
14
|
+
const CoreDynamo = (0, _pulumi.createAppModule)({
|
|
15
|
+
name: "DynamoDb",
|
|
16
|
+
|
|
17
|
+
config(app, params) {
|
|
18
|
+
return app.addResource(aws.dynamodb.Table, {
|
|
19
|
+
name: "webiny",
|
|
20
|
+
config: {
|
|
21
|
+
attributes: [{
|
|
22
|
+
name: "PK",
|
|
23
|
+
type: "S"
|
|
24
|
+
}, {
|
|
25
|
+
name: "SK",
|
|
26
|
+
type: "S"
|
|
27
|
+
}, {
|
|
28
|
+
name: "GSI1_PK",
|
|
29
|
+
type: "S"
|
|
30
|
+
}, {
|
|
31
|
+
name: "GSI1_SK",
|
|
32
|
+
type: "S"
|
|
33
|
+
}],
|
|
34
|
+
billingMode: "PAY_PER_REQUEST",
|
|
35
|
+
hashKey: "PK",
|
|
36
|
+
rangeKey: "SK",
|
|
37
|
+
globalSecondaryIndexes: [{
|
|
38
|
+
name: "GSI1",
|
|
39
|
+
hashKey: "GSI1_PK",
|
|
40
|
+
rangeKey: "GSI1_SK",
|
|
41
|
+
projectionType: "ALL"
|
|
42
|
+
}]
|
|
43
|
+
},
|
|
44
|
+
opts: {
|
|
45
|
+
protect: params.protect
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
});
|
|
51
|
+
exports.CoreDynamo = CoreDynamo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CoreDynamo","createAppModule","name","config","app","params","addResource","aws","dynamodb","Table","attributes","type","billingMode","hashKey","rangeKey","globalSecondaryIndexes","projectionType","opts","protect"],"sources":["CoreDynamo.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, PulumiApp, 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: \"GSI1_PK\", type: \"S\" },\n { name: \"GSI1_SK\", type: \"S\" }\n ],\n billingMode: \"PAY_PER_REQUEST\",\n hashKey: \"PK\",\n rangeKey: \"SK\",\n globalSecondaryIndexes: [\n {\n name: \"GSI1\",\n hashKey: \"GSI1_PK\",\n rangeKey: \"GSI1_SK\",\n projectionType: \"ALL\"\n }\n ]\n },\n opts: {\n protect: params.protect\n }\n });\n }\n});\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAIO,MAAMA,UAAU,GAAG,IAAAC,uBAAA,EAAgB;EACtCC,IAAI,EAAE,UADgC;;EAEtCC,MAAM,CAACC,GAAD,EAAiBC,MAAjB,EAA+C;IACjD,OAAOD,GAAG,CAACE,WAAJ,CAAgBC,GAAG,CAACC,QAAJ,CAAaC,KAA7B,EAAoC;MACvCP,IAAI,EAAE,QADiC;MAEvCC,MAAM,EAAE;QACJO,UAAU,EAAE,CACR;UAAER,IAAI,EAAE,IAAR;UAAcS,IAAI,EAAE;QAApB,CADQ,EAER;UAAET,IAAI,EAAE,IAAR;UAAcS,IAAI,EAAE;QAApB,CAFQ,EAGR;UAAET,IAAI,EAAE,SAAR;UAAmBS,IAAI,EAAE;QAAzB,CAHQ,EAIR;UAAET,IAAI,EAAE,SAAR;UAAmBS,IAAI,EAAE;QAAzB,CAJQ,CADR;QAOJC,WAAW,EAAE,iBAPT;QAQJC,OAAO,EAAE,IARL;QASJC,QAAQ,EAAE,IATN;QAUJC,sBAAsB,EAAE,CACpB;UACIb,IAAI,EAAE,MADV;UAEIW,OAAO,EAAE,SAFb;UAGIC,QAAQ,EAAE,SAHd;UAIIE,cAAc,EAAE;QAJpB,CADoB;MAVpB,CAF+B;MAqBvCC,IAAI,EAAE;QACFC,OAAO,EAAEb,MAAM,CAACa;MADd;IArBiC,CAApC,CAAP;EAyBH;;AA5BqC,CAAhB,CAAnB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as aws from "@pulumi/aws";
|
|
2
|
+
import { PulumiAppResource, PulumiAppResourceConstructor, PulumiAppRemoteResource } from "@webiny/pulumi";
|
|
3
|
+
export interface ElasticSearchParams {
|
|
4
|
+
protect: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const ElasticSearch: import("@webiny/pulumi").PulumiAppModuleDefinition<{
|
|
7
|
+
domain: PulumiAppResource<PulumiAppResourceConstructor<import("@pulumi/aws/elasticsearch/domain").Domain, any>> | PulumiAppRemoteResource<aws.elasticsearch.GetDomainResult>;
|
|
8
|
+
domainPolicy: PulumiAppResource<typeof import("@pulumi/aws/elasticsearch/domainPolicy").DomainPolicy> | undefined;
|
|
9
|
+
table: PulumiAppResource<typeof import("@pulumi/aws/dynamodb/table").Table>;
|
|
10
|
+
dynamoToElastic: {
|
|
11
|
+
role: PulumiAppResource<typeof import("@pulumi/aws/iam/role").Role>;
|
|
12
|
+
policy: PulumiAppResource<typeof import("@pulumi/aws/iam/policy").Policy>;
|
|
13
|
+
lambda: PulumiAppResource<typeof import("@pulumi/aws/lambda/function").Function>;
|
|
14
|
+
eventSourceMapping: PulumiAppResource<typeof import("@pulumi/aws/lambda/eventSourceMapping").EventSourceMapping>;
|
|
15
|
+
};
|
|
16
|
+
}, ElasticSearchParams>;
|