@webiny/pulumi-aws 5.43.3 → 6.0.0-alpha.1

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.
Files changed (189) hide show
  1. package/apps/admin/createAdminPulumiApp.d.ts +3 -2
  2. package/apps/admin/createAdminPulumiApp.js +15 -1
  3. package/apps/admin/createAdminPulumiApp.js.map +1 -1
  4. package/apps/api/ApiApwScheduler.d.ts +1 -1
  5. package/apps/api/ApiApwScheduler.js.map +1 -1
  6. package/apps/api/ApiBackgroundTask.d.ts +1 -1
  7. package/apps/api/ApiBackgroundTask.js.map +1 -1
  8. package/apps/api/ApiCloudfront.d.ts +1 -1
  9. package/apps/api/ApiCloudfront.js.map +1 -1
  10. package/apps/api/ApiFileManager.d.ts +7 -1
  11. package/apps/api/ApiFileManager.js +6 -0
  12. package/apps/api/ApiFileManager.js.map +1 -1
  13. package/apps/api/ApiGateway.d.ts +2 -2
  14. package/apps/api/ApiGateway.js.map +1 -1
  15. package/apps/api/ApiGraphql.d.ts +1 -1
  16. package/apps/api/ApiGraphql.js.map +1 -1
  17. package/apps/api/ApiMigration.d.ts +1 -1
  18. package/apps/api/ApiMigration.js.map +1 -1
  19. package/apps/api/ApiOutput.d.ts +11 -1
  20. package/apps/api/ApiOutput.js +11 -1
  21. package/apps/api/ApiOutput.js.map +1 -1
  22. package/apps/api/ApiPageBuilder.d.ts +1 -1
  23. package/apps/api/ApiPageBuilder.js.map +1 -1
  24. package/apps/api/ApiScheduler.d.ts +8 -0
  25. package/apps/api/ApiScheduler.js +105 -0
  26. package/apps/api/ApiScheduler.js.map +1 -0
  27. package/apps/api/ApiWebsocket.d.ts +1 -1
  28. package/apps/api/ApiWebsocket.js.map +1 -1
  29. package/apps/api/backgroundTask/definition.d.ts +2 -2
  30. package/apps/api/backgroundTask/definition.js.map +1 -1
  31. package/apps/api/backgroundTask/policy.d.ts +2 -2
  32. package/apps/api/backgroundTask/policy.js.map +1 -1
  33. package/apps/api/backgroundTask/role.d.ts +2 -2
  34. package/apps/api/backgroundTask/role.js.map +1 -1
  35. package/apps/api/backgroundTask/types.d.ts +1 -1
  36. package/apps/api/backgroundTask/types.js.map +1 -1
  37. package/apps/api/createApiPulumiApp.d.ts +18 -9
  38. package/apps/api/createApiPulumiApp.js +48 -19
  39. package/apps/api/createApiPulumiApp.js.map +1 -1
  40. package/apps/awsUtils.d.ts +2 -2
  41. package/apps/awsUtils.js.map +1 -1
  42. package/apps/blueGreen/createBlueGreenPulumiApp.d.ts +7 -1
  43. package/apps/blueGreen/createBlueGreenPulumiApp.js +2 -2
  44. package/apps/blueGreen/createBlueGreenPulumiApp.js.map +1 -1
  45. package/apps/blueGreen/domains/attachDomainsToOutput.d.ts +1 -1
  46. package/apps/blueGreen/domains/attachDomainsToOutput.js.map +1 -1
  47. package/apps/blueGreen/types.d.ts +4 -1
  48. package/apps/blueGreen/types.js.map +1 -1
  49. package/apps/common/CoreOutput.d.ts +2 -1
  50. package/apps/common/CoreOutput.js +1 -0
  51. package/apps/common/CoreOutput.js.map +1 -1
  52. package/apps/common/VpcConfig.d.ts +1 -1
  53. package/apps/common/VpcConfig.js.map +1 -1
  54. package/apps/core/CoreCognito.d.ts +1 -1
  55. package/apps/core/CoreCognito.js.map +1 -1
  56. package/apps/core/CoreDynamo.d.ts +1 -1
  57. package/apps/core/CoreDynamo.js.map +1 -1
  58. package/apps/core/CoreElasticSearch.d.ts +1 -1
  59. package/apps/core/CoreElasticSearch.js.map +1 -1
  60. package/apps/core/CoreEventBus.js.map +1 -1
  61. package/apps/core/CoreFileManager.d.ts +1 -1
  62. package/apps/core/CoreFileManager.js.map +1 -1
  63. package/apps/core/CoreOpenSearch.d.ts +1 -1
  64. package/apps/core/CoreOpenSearch.js.map +1 -1
  65. package/apps/core/CoreVpc.d.ts +1 -1
  66. package/apps/core/CoreVpc.js.map +1 -1
  67. package/apps/core/LogDynamo.d.ts +1 -1
  68. package/apps/core/LogDynamo.js.map +1 -1
  69. package/apps/core/WatchCommand.js.map +1 -1
  70. package/apps/core/cognitoIdentityProviders/amazon.d.ts +3 -3
  71. package/apps/core/cognitoIdentityProviders/amazon.js.map +1 -1
  72. package/apps/core/cognitoIdentityProviders/apple.d.ts +3 -3
  73. package/apps/core/cognitoIdentityProviders/apple.js.map +1 -1
  74. package/apps/core/cognitoIdentityProviders/configure.d.ts +3 -3
  75. package/apps/core/cognitoIdentityProviders/configure.js.map +1 -1
  76. package/apps/core/cognitoIdentityProviders/facebook.d.ts +3 -3
  77. package/apps/core/cognitoIdentityProviders/facebook.js.map +1 -1
  78. package/apps/core/cognitoIdentityProviders/getIdpConfig.d.ts +2 -2
  79. package/apps/core/cognitoIdentityProviders/getIdpConfig.js.map +1 -1
  80. package/apps/core/cognitoIdentityProviders/google.d.ts +3 -3
  81. package/apps/core/cognitoIdentityProviders/google.js.map +1 -1
  82. package/apps/core/cognitoIdentityProviders/oidc.d.ts +3 -3
  83. package/apps/core/cognitoIdentityProviders/oidc.js.map +1 -1
  84. package/apps/core/createCorePulumiApp.d.ts +1 -1
  85. package/apps/core/createCorePulumiApp.js +2 -1
  86. package/apps/core/createCorePulumiApp.js.map +1 -1
  87. package/apps/createAppBucket.d.ts +1 -1
  88. package/apps/createAppBucket.js.map +1 -1
  89. package/apps/customDomain.d.ts +3 -3
  90. package/apps/customDomain.js.map +1 -1
  91. package/apps/lambdaUtils.d.ts +3 -2
  92. package/apps/lambdaUtils.js +21 -3
  93. package/apps/lambdaUtils.js.map +1 -1
  94. package/apps/react/createReactPulumiApp.d.ts +2 -2
  95. package/apps/react/createReactPulumiApp.js.map +1 -1
  96. package/apps/syncSystem/SyncSystemDynamo.d.ts +1 -1
  97. package/apps/syncSystem/SyncSystemDynamo.js.map +1 -1
  98. package/apps/syncSystem/SyncSystemDynamoDb.d.ts +3 -0
  99. package/apps/syncSystem/SyncSystemDynamoDb.js +55 -0
  100. package/apps/syncSystem/SyncSystemDynamoDb.js.map +1 -0
  101. package/apps/syncSystem/SyncSystemEventBus.d.ts +6 -0
  102. package/apps/syncSystem/SyncSystemEventBus.js +84 -0
  103. package/apps/syncSystem/SyncSystemEventBus.js.map +1 -0
  104. package/apps/syncSystem/SyncSystemLambda.d.ts +1 -1
  105. package/apps/syncSystem/SyncSystemLambda.js.map +1 -1
  106. package/apps/syncSystem/SyncSystemOutput.d.ts +3 -0
  107. package/apps/syncSystem/SyncSystemOutput.js +26 -0
  108. package/apps/syncSystem/SyncSystemOutput.js.map +1 -0
  109. package/apps/syncSystem/SyncSystemResolverLambda.d.ts +8 -0
  110. package/apps/syncSystem/SyncSystemResolverLambda.js +78 -0
  111. package/apps/syncSystem/SyncSystemResolverLambda.js.map +1 -0
  112. package/apps/syncSystem/SyncSystemSQS.d.ts +3 -4
  113. package/apps/syncSystem/SyncSystemSQS.js +33 -12
  114. package/apps/syncSystem/SyncSystemSQS.js.map +1 -1
  115. package/apps/syncSystem/SyncSystemWorkerLambda.d.ts +7 -0
  116. package/apps/syncSystem/SyncSystemWorkerLambda.js +57 -0
  117. package/apps/syncSystem/SyncSystemWorkerLambda.js.map +1 -0
  118. package/apps/syncSystem/api/addServiceManifest.d.ts +8 -0
  119. package/apps/syncSystem/api/addServiceManifest.js +25 -0
  120. package/apps/syncSystem/api/addServiceManifest.js.map +1 -0
  121. package/apps/syncSystem/api/attachCognitoPermissions.d.ts +14 -0
  122. package/apps/syncSystem/api/attachCognitoPermissions.js +67 -0
  123. package/apps/syncSystem/api/attachCognitoPermissions.js.map +1 -0
  124. package/apps/syncSystem/api/attachDynamoDbPermissions.d.ts +13 -0
  125. package/apps/syncSystem/api/attachDynamoDbPermissions.js +53 -0
  126. package/apps/syncSystem/api/attachDynamoDbPermissions.js.map +1 -0
  127. package/apps/syncSystem/api/attachEventBusPermissions.d.ts +18 -0
  128. package/apps/syncSystem/api/attachEventBusPermissions.js +66 -0
  129. package/apps/syncSystem/api/attachEventBusPermissions.js.map +1 -0
  130. package/apps/syncSystem/api/attachS3Permissions.d.ts +14 -0
  131. package/apps/syncSystem/api/attachS3Permissions.js +59 -0
  132. package/apps/syncSystem/api/attachS3Permissions.js.map +1 -0
  133. package/apps/syncSystem/api/index.d.ts +9 -0
  134. package/apps/syncSystem/api/index.js +65 -0
  135. package/apps/syncSystem/api/index.js.map +1 -0
  136. package/apps/syncSystem/constants.d.ts +1 -0
  137. package/apps/syncSystem/constants.js +9 -0
  138. package/apps/syncSystem/constants.js.map +1 -0
  139. package/apps/syncSystem/createSyncResourceName.d.ts +4 -0
  140. package/apps/syncSystem/createSyncResourceName.js +17 -0
  141. package/apps/syncSystem/createSyncResourceName.js.map +1 -0
  142. package/apps/syncSystem/createSyncSystemPulumiApp.d.ts +19 -10
  143. package/apps/syncSystem/createSyncSystemPulumiApp.js +107 -34
  144. package/apps/syncSystem/createSyncSystemPulumiApp.js.map +1 -1
  145. package/apps/syncSystem/customApp.d.ts +6 -0
  146. package/apps/syncSystem/customApp.js +26 -0
  147. package/apps/syncSystem/customApp.js.map +1 -0
  148. package/apps/syncSystem/getSyncSystemOutput.d.ts +6 -0
  149. package/apps/syncSystem/getSyncSystemOutput.js +28 -0
  150. package/apps/syncSystem/getSyncSystemOutput.js.map +1 -0
  151. package/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.d.ts +7 -0
  152. package/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.js +55 -0
  153. package/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.js.map +1 -0
  154. package/apps/syncSystem/types.d.ts +55 -0
  155. package/apps/syncSystem/types.js +7 -0
  156. package/apps/syncSystem/types.js.map +1 -0
  157. package/apps/tenantRouter.d.ts +1 -1
  158. package/apps/tenantRouter.js.map +1 -1
  159. package/apps/website/WebsitePrerendering.d.ts +1 -1
  160. package/apps/website/WebsitePrerendering.js.map +1 -1
  161. package/apps/website/createWebsitePulumiApp.d.ts +2 -2
  162. package/apps/website/createWebsitePulumiApp.js.map +1 -1
  163. package/enterprise/api/handleGuardDutyEvents.d.ts +1 -1
  164. package/enterprise/api/handleGuardDutyEvents.js.map +1 -1
  165. package/enterprise/createApiPulumiApp.d.ts +13 -2
  166. package/enterprise/createApiPulumiApp.js.map +1 -1
  167. package/enterprise/createCorePulumiApp.d.ts +2 -2
  168. package/enterprise/createCorePulumiApp.js.map +1 -1
  169. package/enterprise/createSyncSystemPulumiApp.d.ts +13 -8
  170. package/enterprise/createSyncSystemPulumiApp.js +1 -1
  171. package/enterprise/createSyncSystemPulumiApp.js.map +1 -1
  172. package/enterprise/createWebsitePulumiApp.d.ts +2 -2
  173. package/enterprise/createWebsitePulumiApp.js.map +1 -1
  174. package/package.json +12 -12
  175. package/utils/addDomainsUrlsOutputs.d.ts +2 -2
  176. package/utils/addDomainsUrlsOutputs.js.map +1 -1
  177. package/utils/addServiceManifestTableItem.d.ts +1 -1
  178. package/utils/addServiceManifestTableItem.js.map +1 -1
  179. package/utils/createAssetArchive.d.ts +2 -0
  180. package/utils/createAssetArchive.js +16 -0
  181. package/utils/createAssetArchive.js.map +1 -0
  182. package/utils/getPresignedPost.d.ts +1 -1
  183. package/utils/getPresignedPost.js.map +1 -1
  184. package/utils/lambdaEnvVariables.d.ts +1 -1
  185. package/utils/lambdaEnvVariables.js.map +1 -1
  186. package/utils/uploadFolderToS3.d.ts +1 -1
  187. package/utils/uploadFolderToS3.js.map +1 -1
  188. package/utils/withServiceManifest.d.ts +2 -2
  189. package/utils/withServiceManifest.js.map +1 -1
@@ -1,55 +1,128 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.createSyncSystemPulumiApp = createSyncSystemPulumiApp;
7
- var _pulumi = require("@webiny/pulumi");
8
- var _SyncSystemDynamo = require("./SyncSystemDynamo");
9
- var _constants = require("../../constants");
10
- var _SyncSystemSQS = require("./SyncSystemSQS");
11
- var _SyncSystemLambda = require("./SyncSystemLambda");
12
- var _addTableItems = require("./addTableItems");
13
- function createSyncSystemPulumiApp(projectAppParams = {}) {
14
- return (0, _pulumi.createPulumiApp)({
15
- name: "syncSystem",
16
- path: "apps/syncSystem",
8
+ var pulumi = _interopRequireWildcard(require("@pulumi/pulumi"));
9
+ var _pulumi2 = require("@webiny/pulumi");
10
+ var _constants = require("../../constants.js");
11
+ var _SyncSystemSQS = require("./SyncSystemSQS.js");
12
+ var _SyncSystemResolverLambda = require("./SyncSystemResolverLambda.js");
13
+ var _constants2 = require("./constants.js");
14
+ var _SyncSystemEventBus = require("./SyncSystemEventBus.js");
15
+ var _customApp = require("./customApp.js");
16
+ var _SyncSystemDynamoDb = require("./SyncSystemDynamoDb.js");
17
+ var _SyncSystemWorkerLambda = require("./SyncSystemWorkerLambda.js");
18
+ function createSyncSystemPulumiApp(projectAppParams) {
19
+ return (0, _pulumi2.createPulumiApp)({
20
+ name: "sync",
21
+ path: _constants2.APPS_SYNC_SYSTEM_PATH,
17
22
  config: projectAppParams,
18
23
  program: async app => {
24
+ const pulumiResourceNamePrefix = app.getParam(projectAppParams.pulumiResourceNamePrefix);
25
+ if (pulumiResourceNamePrefix) {
26
+ app.onResource(resource => {
27
+ if (!resource.name.startsWith(pulumiResourceNamePrefix)) {
28
+ resource.name = `${pulumiResourceNamePrefix}${resource.name}`;
29
+ }
30
+ });
31
+ }
19
32
  const productionEnvironments = app.params.create.productionEnvironments || _constants.DEFAULT_PROD_ENV_NAMES;
20
33
  const isProduction = productionEnvironments.includes(app.params.run.env);
21
34
  const protect = app.getParam(projectAppParams.protect) ?? isProduction;
22
- const dynamoDbTable = app.addModule(_SyncSystemDynamo.SyncSystemDynamo, {
23
- protect
24
- });
25
- const sqs = app.addModule(_SyncSystemSQS.SyncSystemSQS, {
35
+ const regionApp = (0, _customApp.customApp)({
36
+ app,
26
37
  protect
27
38
  });
28
- app.addModule(_SyncSystemLambda.SyncSystemLambda, {
29
- protect,
30
- config: {
31
- // TODO
32
- }
33
- });
34
39
  /**
35
- * Add
40
+ * Sync System services.
36
41
  */
37
- (0, _addTableItems.addTableItems)({
38
- app,
39
- table: dynamoDbTable,
40
- items: {}
41
- });
42
+ const {
43
+ sqsQueue
44
+ } = regionApp.addModule(_SyncSystemSQS.SyncSystemSQS);
45
+ const dynamoDb = regionApp.addModule(_SyncSystemDynamoDb.SyncSystemDynamoDb);
46
+ const workerLambda = regionApp.addModule(_SyncSystemWorkerLambda.SyncSystemWorkerLambda);
47
+ const resolverLambda = regionApp.addModule(_SyncSystemResolverLambda.SyncSystemResolverLambda);
48
+ const {
49
+ eventBusRule,
50
+ eventBus,
51
+ eventBusTarget,
52
+ eventBusPolicy
53
+ } = regionApp.addModule(_SyncSystemEventBus.SyncSystemEventBus);
54
+ const output = {
55
+ /**
56
+ * Region provider.
57
+ */
58
+ region: pulumi.output(process.env.AWS_REGION),
59
+ /**
60
+ * SyncSystemSQS
61
+ */
62
+ sqsUrl: sqsQueue.output.url,
63
+ sqsArn: sqsQueue.output.arn,
64
+ sqsName: sqsQueue.output.name,
65
+ /**
66
+ * DynamoDB
67
+ */
68
+ dynamoDbArn: dynamoDb.output.arn,
69
+ dynamoDbName: dynamoDb.output.name,
70
+ dynamoDbHashKey: dynamoDb.output.hashKey,
71
+ dynamoDbRangeKey: dynamoDb.output.rangeKey,
72
+ /**
73
+ * SyncSystemResolverLambda
74
+ */
75
+ resolverLambdaArn: resolverLambda.lambda.output.arn,
76
+ resolverLambdaName: resolverLambda.lambda.output.name,
77
+ resolverLambdaRoleArn: resolverLambda.role.output.arn,
78
+ resolverLambdaRoleName: resolverLambda.role.output.name,
79
+ resolverLambdaRoleId: resolverLambda.role.output.id,
80
+ resolverLambdaPolicyArn: resolverLambda.policy.output.arn,
81
+ resolverLambdaPolicyName: resolverLambda.policy.output.name,
82
+ resolverLambdaPolicyId: resolverLambda.policy.output.id,
83
+ resolverLambdaEventSourceMappingArn: resolverLambda.eventSourceMapping.output.arn,
84
+ resolverLambdaEventSourceMappingId: resolverLambda.eventSourceMapping.output.id,
85
+ // # We can safely cast as we know that the property exists.
86
+ resolverLambdaEventSourceMappingEventSourceArn: resolverLambda.eventSourceMapping.output.eventSourceArn,
87
+ /**
88
+ * SyncSystemWorkerLambda
89
+ */
90
+ workerLambdaArn: workerLambda.lambda.output.arn,
91
+ workerLambdaName: workerLambda.lambda.output.name,
92
+ workerLambdaRoleArn: workerLambda.role.output.arn,
93
+ workerLambdaRoleName: workerLambda.role.output.name,
94
+ /**
95
+ * SyncSystemEventBus
96
+ */
97
+ eventBusArn: eventBus.output.arn,
98
+ eventBusName: eventBus.output.name,
99
+ eventBusRuleArn: eventBusRule.output.arn,
100
+ eventBusRuleName: eventBusRule.output.id,
101
+ eventBusTargetArn: eventBusTarget.output.arn,
102
+ eventBusPolicyId: eventBusPolicy.output.id,
103
+ eventBusPolicyUrn: eventBusPolicy.output.urn,
104
+ eventBusPolicyQueueUrl: eventBusPolicy.output.queueUrl
105
+ };
106
+ app.addOutputs(output);
42
107
  return {
108
+ sqs: sqsQueue.output,
109
+ dynamoDb: dynamoDb.output,
110
+ eventBus: eventBus.output,
111
+ eventBusRule: eventBusRule.output,
112
+ eventBusTarget: eventBusTarget.output,
113
+ eventBusPolicy: eventBusPolicy.output,
114
+ /**
115
+ * Worker Lambda - used to resolve actions triggered by the resolver Lambda.
116
+ */
117
+ workerLambda: workerLambda.lambda.output,
118
+ workerLambdaRole: workerLambda.role.output,
43
119
  /**
44
- * Sync System resources.
120
+ * Resolver Lambda - gets hit by SQS and resolves the data.
45
121
  */
46
- dynamodbTable: dynamoDbTable,
47
- dynamodbTableArn: dynamoDbTable.output.arn,
48
- dynamodbTableName: dynamoDbTable.output.name,
49
- dynamodbTableHashKey: dynamoDbTable.output.hashKey,
50
- dynamodbTableRangeKey: dynamoDbTable.output.rangeKey,
51
- sqs,
52
- sqsArn: sqs.output.arn,
122
+ resolverLambda: resolverLambda.lambda.output,
123
+ resolverLambdaRole: resolverLambda.role.output,
124
+ resolverLambdaPolicy: resolverLambda.policy.output,
125
+ resolverLambdaEventSourceMapping: resolverLambda.eventSourceMapping.output,
53
126
  /**
54
127
  * Systems we are connecting together.
55
128
  */
@@ -1 +1 @@
1
- {"version":3,"names":["_pulumi","require","_SyncSystemDynamo","_constants","_SyncSystemSQS","_SyncSystemLambda","_addTableItems","createSyncSystemPulumiApp","projectAppParams","createPulumiApp","name","path","config","program","app","productionEnvironments","params","create","DEFAULT_PROD_ENV_NAMES","isProduction","includes","run","env","protect","getParam","dynamoDbTable","addModule","SyncSystemDynamo","sqs","SyncSystemSQS","SyncSystemLambda","addTableItems","table","items","dynamodbTable","dynamodbTableArn","output","arn","dynamodbTableName","dynamodbTableHashKey","hashKey","dynamodbTableRangeKey","rangeKey","sqsArn","primary","secondary"],"sources":["createSyncSystemPulumiApp.ts"],"sourcesContent":["import { createPulumiApp, PulumiAppParam } from \"@webiny/pulumi\";\nimport { SyncSystemDynamo } from \"./SyncSystemDynamo\";\nimport { DEFAULT_PROD_ENV_NAMES } from \"~/constants\";\nimport { SyncSystemSQS } from \"./SyncSystemSQS\";\nimport { SyncSystemLambda } from \"./SyncSystemLambda\";\nimport { addTableItems } from \"./addTableItems\";\n\nexport type SyncSystemPulumiApp = ReturnType<typeof createSyncSystemPulumiApp>;\n\nexport interface ElasticsearchConfig {\n domainName: string;\n indexPrefix: string;\n sharedIndexes: boolean;\n}\n\nexport interface OpenSearchConfig {\n domainName: string;\n indexPrefix: string;\n sharedIndexes: boolean;\n}\n\nexport interface CreateSyncSystemPulumiAppParams {\n /**\n * Secures against deleting database by accident.\n * By default enabled in production environments.\n */\n protect?: PulumiAppParam<boolean>;\n\n /**\n * Enables ElasticSearch infrastructure.\n * Note that it requires also changes in application code.\n */\n elasticSearch?: PulumiAppParam<boolean | Partial<ElasticsearchConfig>>;\n\n /**\n * Enables OpenSearch infrastructure.\n * Note that it requires also changes in application code.\n */\n openSearch?: PulumiAppParam<boolean | Partial<OpenSearchConfig>>;\n\n /**\n * Enables VPC for the application.\n * By default enabled in production environments.\n */\n vpc?: PulumiAppParam<boolean>;\n\n /**\n * Provides a way to adjust existing Pulumi code (cloud infrastructure resources)\n * or add additional ones into the mix.\n */\n pulumi?: (app: SyncSystemPulumiApp) => void | Promise<void>;\n\n /**\n * Prefixes names of all Pulumi cloud infrastructure resource with given prefix.\n */\n pulumiResourceNamePrefix?: PulumiAppParam<string>;\n\n /**\n * Treats provided environments as production environments, which\n * are deployed in production deployment mode.\n * https://www.webiny.com/docs/architecture/deployment-modes/production\n */\n productionEnvironments?: PulumiAppParam<string[]>;\n}\n\nexport function createSyncSystemPulumiApp(projectAppParams: CreateSyncSystemPulumiAppParams = {}) {\n return createPulumiApp({\n name: \"syncSystem\",\n path: \"apps/syncSystem\",\n config: projectAppParams,\n program: async app => {\n const productionEnvironments =\n app.params.create.productionEnvironments || DEFAULT_PROD_ENV_NAMES;\n const isProduction = productionEnvironments.includes(app.params.run.env);\n const protect = app.getParam(projectAppParams.protect) ?? isProduction;\n\n const dynamoDbTable = app.addModule(SyncSystemDynamo, {\n protect\n });\n\n const sqs = app.addModule(SyncSystemSQS, {\n protect\n });\n\n app.addModule(SyncSystemLambda, {\n protect,\n config: {\n // TODO\n }\n });\n /**\n * Add\n */\n addTableItems({\n app,\n table: dynamoDbTable,\n items: {}\n });\n\n return {\n /**\n * Sync System resources.\n */\n dynamodbTable: dynamoDbTable,\n dynamodbTableArn: dynamoDbTable.output.arn,\n dynamodbTableName: dynamoDbTable.output.name,\n dynamodbTableHashKey: dynamoDbTable.output.hashKey,\n dynamodbTableRangeKey: dynamoDbTable.output.rangeKey,\n sqs,\n sqsArn: sqs.output.arn,\n /**\n * Systems we are connecting together.\n */\n primary: {},\n secondary: {}\n };\n }\n });\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,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pDd,GAAG;QACHe,MAAM,EAAEf,GAAG,CAACQ,MAAM,CAACC,GAAG;QACtB;AAChB;AACA;QACgBO,OAAO,EAAE,CAAC,CAAC;QACXC,SAAS,EAAE,CAAC;MAChB,CAAC;IACL;EACJ,CAAC,CAAC;AACN","ignoreList":[]}
1
+ {"version":3,"names":["pulumi","_interopRequireWildcard","require","_pulumi2","_constants","_SyncSystemSQS","_SyncSystemResolverLambda","_constants2","_SyncSystemEventBus","_customApp","_SyncSystemDynamoDb","_SyncSystemWorkerLambda","createSyncSystemPulumiApp","projectAppParams","createPulumiApp","name","path","APPS_SYNC_SYSTEM_PATH","config","program","app","pulumiResourceNamePrefix","getParam","onResource","resource","startsWith","productionEnvironments","params","create","DEFAULT_PROD_ENV_NAMES","isProduction","includes","run","env","protect","regionApp","customApp","sqsQueue","addModule","SyncSystemSQS","dynamoDb","SyncSystemDynamoDb","workerLambda","SyncSystemWorkerLambda","resolverLambda","SyncSystemResolverLambda","eventBusRule","eventBus","eventBusTarget","eventBusPolicy","SyncSystemEventBus","output","region","process","AWS_REGION","sqsUrl","url","sqsArn","arn","sqsName","dynamoDbArn","dynamoDbName","dynamoDbHashKey","hashKey","dynamoDbRangeKey","rangeKey","resolverLambdaArn","lambda","resolverLambdaName","resolverLambdaRoleArn","role","resolverLambdaRoleName","resolverLambdaRoleId","id","resolverLambdaPolicyArn","policy","resolverLambdaPolicyName","resolverLambdaPolicyId","resolverLambdaEventSourceMappingArn","eventSourceMapping","resolverLambdaEventSourceMappingId","resolverLambdaEventSourceMappingEventSourceArn","eventSourceArn","workerLambdaArn","workerLambdaName","workerLambdaRoleArn","workerLambdaRoleName","eventBusArn","eventBusName","eventBusRuleArn","eventBusRuleName","eventBusTargetArn","eventBusPolicyId","eventBusPolicyUrn","urn","eventBusPolicyQueueUrl","queueUrl","addOutputs","sqs","workerLambdaRole","resolverLambdaRole","resolverLambdaPolicy","resolverLambdaEventSourceMapping","primary","secondary"],"sources":["createSyncSystemPulumiApp.ts"],"sourcesContent":["import * as pulumi from \"@pulumi/pulumi\";\nimport type { PulumiAppParam } from \"@webiny/pulumi\";\nimport { createPulumiApp } from \"@webiny/pulumi\";\nimport { DEFAULT_PROD_ENV_NAMES } from \"~/constants.js\";\nimport { SyncSystemSQS } from \"./SyncSystemSQS.js\";\nimport { SyncSystemResolverLambda } from \"./SyncSystemResolverLambda.js\";\nimport type { IGetSyncSystemOutputResult, PulumiOutput } from \"./types.js\";\nimport { APPS_SYNC_SYSTEM_PATH } from \"./constants.js\";\nimport { SyncSystemEventBus } from \"./SyncSystemEventBus.js\";\nimport { customApp } from \"./customApp.js\";\nimport { SyncSystemDynamoDb } from \"~/apps/syncSystem/SyncSystemDynamoDb.js\";\nimport { SyncSystemWorkerLambda } from \"~/apps/syncSystem/SyncSystemWorkerLambda.js\";\n\nexport type SyncSystemPulumiApp = ReturnType<typeof createSyncSystemPulumiApp>;\n\nexport interface ElasticsearchConfig {\n domainName: string;\n indexPrefix: string;\n sharedIndexes: boolean;\n}\n\nexport interface OpenSearchConfig {\n domainName: string;\n indexPrefix: string;\n sharedIndexes: boolean;\n}\n\nexport interface CreateSyncSystemPulumiAppParams {\n /**\n * Secures against deleting database by accident.\n * By default enabled in production environments.\n */\n protect?: PulumiAppParam<boolean>;\n\n /**\n * Enables ElasticSearch infrastructure.\n * Note that it requires also changes in application code.\n */\n elasticSearch?: PulumiAppParam<boolean | Partial<ElasticsearchConfig>>;\n\n /**\n * Enables OpenSearch infrastructure.\n * Note that it requires also changes in application code.\n */\n openSearch?: PulumiAppParam<boolean | Partial<OpenSearchConfig>>;\n\n /**\n * Enables VPC for the application.\n * By default enabled in production environments.\n */\n vpc?: PulumiAppParam<boolean>;\n\n /**\n * Provides a way to adjust existing Pulumi code (cloud infrastructure resources)\n * or add additional ones into the mix.\n */\n pulumi?: (app: SyncSystemPulumiApp) => void | Promise<void>;\n\n /**\n * Prefixes names of all Pulumi cloud infrastructure resource with given prefix.\n */\n pulumiResourceNamePrefix?: PulumiAppParam<string>;\n\n /**\n * Treats provided environments as production environments, which\n * are deployed in production deployment mode.\n * https://www.webiny.com/docs/architecture/deployment-modes/production\n */\n productionEnvironments?: PulumiAppParam<string[]>;\n}\n\nexport function createSyncSystemPulumiApp(projectAppParams: CreateSyncSystemPulumiAppParams) {\n return createPulumiApp({\n name: \"sync\",\n path: APPS_SYNC_SYSTEM_PATH,\n config: projectAppParams,\n program: async app => {\n const pulumiResourceNamePrefix = app.getParam(\n projectAppParams.pulumiResourceNamePrefix\n );\n if (pulumiResourceNamePrefix) {\n app.onResource(resource => {\n if (!resource.name.startsWith(pulumiResourceNamePrefix)) {\n resource.name = `${pulumiResourceNamePrefix}${resource.name}`;\n }\n });\n }\n const productionEnvironments =\n app.params.create.productionEnvironments || DEFAULT_PROD_ENV_NAMES;\n const isProduction = productionEnvironments.includes(app.params.run.env);\n const protect = app.getParam(projectAppParams.protect) ?? isProduction;\n const regionApp = customApp({\n app,\n protect\n });\n /**\n * Sync System services.\n */\n const { sqsQueue } = regionApp.addModule(SyncSystemSQS);\n const dynamoDb = regionApp.addModule(SyncSystemDynamoDb);\n\n const workerLambda = regionApp.addModule(SyncSystemWorkerLambda);\n\n const resolverLambda = regionApp.addModule(SyncSystemResolverLambda);\n const { eventBusRule, eventBus, eventBusTarget, eventBusPolicy } =\n regionApp.addModule(SyncSystemEventBus);\n\n const output: PulumiOutput<IGetSyncSystemOutputResult> = {\n /**\n * Region provider.\n */\n region: pulumi.output(process.env.AWS_REGION as string),\n /**\n * SyncSystemSQS\n */\n sqsUrl: sqsQueue.output.url,\n sqsArn: sqsQueue.output.arn,\n sqsName: sqsQueue.output.name,\n /**\n * DynamoDB\n */\n dynamoDbArn: dynamoDb.output.arn,\n dynamoDbName: dynamoDb.output.name,\n dynamoDbHashKey: dynamoDb.output.hashKey,\n dynamoDbRangeKey: dynamoDb.output.rangeKey as pulumi.Output<string>,\n /**\n * SyncSystemResolverLambda\n */\n resolverLambdaArn: resolverLambda.lambda.output.arn,\n resolverLambdaName: resolverLambda.lambda.output.name,\n resolverLambdaRoleArn: resolverLambda.role.output.arn,\n resolverLambdaRoleName: resolverLambda.role.output.name,\n resolverLambdaRoleId: resolverLambda.role.output.id,\n resolverLambdaPolicyArn: resolverLambda.policy.output.arn,\n resolverLambdaPolicyName: resolverLambda.policy.output.name,\n resolverLambdaPolicyId: resolverLambda.policy.output.id,\n resolverLambdaEventSourceMappingArn: resolverLambda.eventSourceMapping.output.arn,\n resolverLambdaEventSourceMappingId: resolverLambda.eventSourceMapping.output.id,\n // # We can safely cast as we know that the property exists.\n resolverLambdaEventSourceMappingEventSourceArn: resolverLambda.eventSourceMapping\n .output.eventSourceArn as pulumi.Output<string>,\n /**\n * SyncSystemWorkerLambda\n */\n workerLambdaArn: workerLambda.lambda.output.arn,\n workerLambdaName: workerLambda.lambda.output.name,\n workerLambdaRoleArn: workerLambda.role.output.arn,\n workerLambdaRoleName: workerLambda.role.output.name,\n /**\n * SyncSystemEventBus\n */\n eventBusArn: eventBus.output.arn,\n eventBusName: eventBus.output.name,\n eventBusRuleArn: eventBusRule.output.arn,\n eventBusRuleName: eventBusRule.output.id,\n eventBusTargetArn: eventBusTarget.output.arn,\n eventBusPolicyId: eventBusPolicy.output.id,\n eventBusPolicyUrn: eventBusPolicy.output.urn,\n eventBusPolicyQueueUrl: eventBusPolicy.output.queueUrl\n };\n app.addOutputs(output);\n\n return {\n sqs: sqsQueue.output,\n dynamoDb: dynamoDb.output,\n eventBus: eventBus.output,\n eventBusRule: eventBusRule.output,\n eventBusTarget: eventBusTarget.output,\n eventBusPolicy: eventBusPolicy.output,\n /**\n * Worker Lambda - used to resolve actions triggered by the resolver Lambda.\n */\n workerLambda: workerLambda.lambda.output,\n workerLambdaRole: workerLambda.role.output,\n /**\n * Resolver Lambda - gets hit by SQS and resolves the data.\n */\n resolverLambda: resolverLambda.lambda.output,\n resolverLambdaRole: resolverLambda.role.output,\n resolverLambdaPolicy: resolverLambda.policy.output,\n resolverLambdaEventSourceMapping: resolverLambda.eventSourceMapping.output,\n /**\n * Systems we are connecting together.\n */\n primary: {},\n secondary: {}\n };\n }\n });\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,yBAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AACA,IAAAS,uBAAA,GAAAT,OAAA;AA4DO,SAASU,yBAAyBA,CAACC,gBAAiD,EAAE;EACzF,OAAO,IAAAC,wBAAe,EAAC;IACnBC,IAAI,EAAE,MAAM;IACZC,IAAI,EAAEC,iCAAqB;IAC3BC,MAAM,EAAEL,gBAAgB;IACxBM,OAAO,EAAE,MAAMC,GAAG,IAAI;MAClB,MAAMC,wBAAwB,GAAGD,GAAG,CAACE,QAAQ,CACzCT,gBAAgB,CAACQ,wBACrB,CAAC;MACD,IAAIA,wBAAwB,EAAE;QAC1BD,GAAG,CAACG,UAAU,CAACC,QAAQ,IAAI;UACvB,IAAI,CAACA,QAAQ,CAACT,IAAI,CAACU,UAAU,CAACJ,wBAAwB,CAAC,EAAE;YACrDG,QAAQ,CAACT,IAAI,GAAG,GAAGM,wBAAwB,GAAGG,QAAQ,CAACT,IAAI,EAAE;UACjE;QACJ,CAAC,CAAC;MACN;MACA,MAAMW,sBAAsB,GACxBN,GAAG,CAACO,MAAM,CAACC,MAAM,CAACF,sBAAsB,IAAIG,iCAAsB;MACtE,MAAMC,YAAY,GAAGJ,sBAAsB,CAACK,QAAQ,CAACX,GAAG,CAACO,MAAM,CAACK,GAAG,CAACC,GAAG,CAAC;MACxE,MAAMC,OAAO,GAAGd,GAAG,CAACE,QAAQ,CAACT,gBAAgB,CA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AG;QAC5CkC,gBAAgB,EAAE3C,cAAc,CAACE,MAAM,CAACsB,EAAE;QAC1CoB,iBAAiB,EAAE5C,cAAc,CAACE,MAAM,CAAC2C,GAAG;QAC5CC,sBAAsB,EAAE9C,cAAc,CAACE,MAAM,CAAC6C;MAClD,CAAC;MACD5E,GAAG,CAAC6E,UAAU,CAAC9C,MAAM,CAAC;MAEtB,OAAO;QACH+C,GAAG,EAAE7D,QAAQ,CAACc,MAAM;QACpBX,QAAQ,EAAEA,QAAQ,CAACW,MAAM;QACzBJ,QAAQ,EAAEA,QAAQ,CAACI,MAAM;QACzBL,YAAY,EAAEA,YAAY,CAACK,MAAM;QACjCH,cAAc,EAAEA,cAAc,CAACG,MAAM;QACrCF,cAAc,EAAEA,cAAc,CAACE,MAAM;QACrC;AAChB;AACA;QACgBT,YAAY,EAAEA,YAAY,CAACyB,MAAM,CAAChB,MAAM;QACxCgD,gBAAgB,EAAEzD,YAAY,CAAC4B,IAAI,CAACnB,MAAM;QAC1C;AAChB;AACA;QACgBP,cAAc,EAAEA,cAAc,CAACuB,MAAM,CAAChB,MAAM;QAC5CiD,kBAAkB,EAAExD,cAAc,CAAC0B,IAAI,CAACnB,MAAM;QAC9CkD,oBAAoB,EAAEzD,cAAc,CAAC+B,MAAM,CAACxB,MAAM;QAClDmD,gCAAgC,EAAE1D,cAAc,CAACmC,kBAAkB,CAAC5B,MAAM;QAC1E;AAChB;AACA;QACgBoD,OAAO,EAAE,CAAC,CAAC;QACXC,SAAS,EAAE,CAAC;MAChB,CAAC;IACL;EACJ,CAAC,CAAC;AACN","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ import type { PulumiApp } from "@webiny/pulumi";
2
+ export interface IAppWithRegionParams {
3
+ app: PulumiApp;
4
+ protect?: boolean;
5
+ }
6
+ export declare const customApp: (params: IAppWithRegionParams) => PulumiApp<Record<string, unknown>>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.customApp = void 0;
7
+ const customApp = params => {
8
+ const {
9
+ app,
10
+ protect
11
+ } = params;
12
+ const initialAddResource = app.addResource;
13
+ app.addResource = (resource, params) => {
14
+ return initialAddResource(resource, {
15
+ ...params,
16
+ opts: {
17
+ protect,
18
+ ...params.opts
19
+ }
20
+ });
21
+ };
22
+ return app;
23
+ };
24
+ exports.customApp = customApp;
25
+
26
+ //# sourceMappingURL=customApp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["customApp","params","app","protect","initialAddResource","addResource","resource","opts","exports"],"sources":["customApp.ts"],"sourcesContent":["import type { PulumiApp } from \"@webiny/pulumi\";\n\nexport interface IAppWithRegionParams {\n app: PulumiApp;\n protect?: boolean;\n}\n\nexport const customApp = (params: IAppWithRegionParams) => {\n const { app, protect } = params;\n\n const initialAddResource = app.addResource;\n\n app.addResource = (resource, params) => {\n return initialAddResource(resource, {\n ...params,\n opts: {\n protect,\n ...params.opts\n }\n });\n };\n\n return app;\n};\n"],"mappings":";;;;;;AAOO,MAAMA,SAAS,GAAIC,MAA4B,IAAK;EACvD,MAAM;IAAEC,GAAG;IAAEC;EAAQ,CAAC,GAAGF,MAAM;EAE/B,MAAMG,kBAAkB,GAAGF,GAAG,CAACG,WAAW;EAE1CH,GAAG,CAACG,WAAW,GAAG,CAACC,QAAQ,EAAEL,MAAM,KAAK;IACpC,OAAOG,kBAAkB,CAACE,QAAQ,EAAE;MAChC,GAAGL,MAAM;MACTM,IAAI,EAAE;QACFJ,OAAO;QACP,GAAGF,MAAM,CAACM;MACd;IACJ,CAAC,CAAC;EACN,CAAC;EAED,OAAOL,GAAG;AACd,CAAC;AAACM,OAAA,CAAAR,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ import type { IGetSyncSystemOutputResult } from "./types.js";
2
+ export interface IGetSyncSystemOutputParams {
3
+ env: string;
4
+ }
5
+ export declare const getSyncSystemOutput: (params: IGetSyncSystemOutputParams) => IGetSyncSystemOutputResult;
6
+ export declare const asyncGetSyncSystemOutput: (params: IGetSyncSystemOutputParams) => Promise<IGetSyncSystemOutputResult>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSyncSystemOutput = exports.asyncGetSyncSystemOutput = void 0;
7
+ var _index = require("@webiny/cli-plugin-deploy-pulumi/utils/index.js");
8
+ var _constants = require("./constants.js");
9
+ const getSyncSystemOutput = params => {
10
+ return (0, _index.getStackOutput)({
11
+ env: params.env,
12
+ /**
13
+ * Sync System cannot have a variant, only env.
14
+ */
15
+ variant: undefined,
16
+ folder: _constants.APPS_SYNC_SYSTEM_PATH
17
+ });
18
+ };
19
+ exports.getSyncSystemOutput = getSyncSystemOutput;
20
+ const asyncGetSyncSystemOutput = async params => {
21
+ return new Promise(resolve => {
22
+ const value = getSyncSystemOutput(params);
23
+ return resolve(value);
24
+ });
25
+ };
26
+ exports.asyncGetSyncSystemOutput = asyncGetSyncSystemOutput;
27
+
28
+ //# sourceMappingURL=getSyncSystemOutput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_index","require","_constants","getSyncSystemOutput","params","getStackOutput","env","variant","undefined","folder","APPS_SYNC_SYSTEM_PATH","exports","asyncGetSyncSystemOutput","Promise","resolve","value"],"sources":["getSyncSystemOutput.ts"],"sourcesContent":["import { getStackOutput } from \"@webiny/cli-plugin-deploy-pulumi/utils/index.js\";\nimport { APPS_SYNC_SYSTEM_PATH } from \"./constants.js\";\nimport type { IGetSyncSystemOutputResult } from \"~/apps/syncSystem/types.js\";\n\nexport interface IGetSyncSystemOutputParams {\n env: string;\n}\n\nexport const getSyncSystemOutput = (params: IGetSyncSystemOutputParams) => {\n return getStackOutput<IGetSyncSystemOutputResult>({\n env: params.env,\n /**\n * Sync System cannot have a variant, only env.\n */\n variant: undefined,\n folder: APPS_SYNC_SYSTEM_PATH\n });\n};\n\nexport const asyncGetSyncSystemOutput = async (\n params: IGetSyncSystemOutputParams\n): Promise<IGetSyncSystemOutputResult> => {\n return new Promise(resolve => {\n const value = getSyncSystemOutput(params);\n\n return resolve(value);\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAOO,MAAME,mBAAmB,GAAIC,MAAkC,IAAK;EACvE,OAAO,IAAAC,qBAAc,EAA6B;IAC9CC,GAAG,EAAEF,MAAM,CAACE,GAAG;IACf;AACR;AACA;IACQC,OAAO,EAAEC,SAAS;IAClBC,MAAM,EAAEC;EACZ,CAAC,CAAC;AACN,CAAC;AAACC,OAAA,CAAAR,mBAAA,GAAAA,mBAAA;AAEK,MAAMS,wBAAwB,GAAG,MACpCR,MAAkC,IACI;EACtC,OAAO,IAAIS,OAAO,CAACC,OAAO,IAAI;IAC1B,MAAMC,KAAK,GAAGZ,mBAAmB,CAACC,MAAM,CAAC;IAEzC,OAAOU,OAAO,CAACC,KAAK,CAAC;EACzB,CAAC,CAAC;AACN,CAAC;AAACJ,OAAA,CAAAC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import type { PulumiApp } from "@webiny/pulumi";
2
+ interface ICreateSyncSystemResolverLambdaPolicyParams {
3
+ name: string;
4
+ app: PulumiApp;
5
+ }
6
+ export declare function createSyncSystemResolverLambdaPolicy(params: ICreateSyncSystemResolverLambdaPolicyParams): import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam/policy.js").Policy>;
7
+ export {};
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.createSyncSystemResolverLambdaPolicy = createSyncSystemResolverLambdaPolicy;
8
+ var aws = _interopRequireWildcard(require("@pulumi/aws"));
9
+ var _SyncSystemSQS = require("../SyncSystemSQS.js");
10
+ var _SyncSystemDynamoDb = require("../SyncSystemDynamoDb.js");
11
+ var _SyncSystemWorkerLambda = require("../SyncSystemWorkerLambda.js");
12
+ function createSyncSystemResolverLambdaPolicy(params) {
13
+ const {
14
+ app
15
+ } = params;
16
+ const {
17
+ sqsQueue
18
+ } = app.getModule(_SyncSystemSQS.SyncSystemSQS);
19
+ const {
20
+ lambda: workerLambda
21
+ } = app.getModule(_SyncSystemWorkerLambda.SyncSystemWorkerLambda);
22
+ const dynamoDb = app.getModule(_SyncSystemDynamoDb.SyncSystemDynamoDb);
23
+ const policy = {
24
+ Version: "2012-10-17",
25
+ Statement: [{
26
+ Sid: "PermissionForSQS",
27
+ Effect: "Allow",
28
+ Action: ["sqs:SendMessage", "sqs:SendMessageBatch", "sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:DeleteMessageBatch", "sqs:ChangeMessageVisibility", "sqs:ChangeMessageVisibilityBatch", "sqs:GetQueueAttributes"],
29
+ Resource: sqsQueue.output.arn.apply(arn => {
30
+ return [`${arn}`, `${arn}/*`];
31
+ })
32
+ }, {
33
+ Sid: "PermissionForDynamoDb",
34
+ Effect: "Allow",
35
+ Action: ["dynamodb:BatchGetItem", "dynamodb:BatchWriteItem", "dynamodb:ConditionCheckItem", "dynamodb:CreateBackup", "dynamodb:CreateTable", "dynamodb:CreateTableReplica", "dynamodb:DeleteBackup", "dynamodb:DeleteItem", "dynamodb:DeleteTable", "dynamodb:DeleteTableReplica", "dynamodb:DescribeBackup", "dynamodb:DescribeContinuousBackups", "dynamodb:DescribeContributorInsights", "dynamodb:DescribeExport", "dynamodb:DescribeKinesisStreamingDestination", "dynamodb:DescribeLimits", "dynamodb:DescribeReservedCapacity", "dynamodb:DescribeReservedCapacityOfferings", "dynamodb:DescribeStream", "dynamodb:DescribeTable", "dynamodb:DescribeTableReplicaAutoScaling", "dynamodb:DescribeTimeToLive", "dynamodb:DisableKinesisStreamingDestination", "dynamodb:EnableKinesisStreamingDestination", "dynamodb:ExportTableToPointInTime", "dynamodb:GetItem", "dynamodb:GetRecords", "dynamodb:GetShardIterator", "dynamodb:ListBackups", "dynamodb:ListContributorInsights", "dynamodb:ListExports", "dynamodb:ListStreams", "dynamodb:ListTables", "dynamodb:ListTagsOfResource", "dynamodb:PartiQLDelete", "dynamodb:PartiQLInsert", "dynamodb:PartiQLSelect", "dynamodb:PartiQLUpdate", "dynamodb:PurchaseReservedCapacityOfferings", "dynamodb:PutItem", "dynamodb:Query", "dynamodb:RestoreTableFromBackup", "dynamodb:RestoreTableToPointInTime", "dynamodb:Scan", "dynamodb:UpdateContinuousBackups", "dynamodb:UpdateContributorInsights", "dynamodb:UpdateItem", "dynamodb:UpdateTable", "dynamodb:UpdateTableReplicaAutoScaling", "dynamodb:UpdateTimeToLive"],
36
+ Resource: [dynamoDb.output.arn.apply(arn => `${arn}`), dynamoDb.output.arn.apply(arn => `${arn}/*`)]
37
+ }, {
38
+ Sid: "PermissionForWorkerLambda",
39
+ Effect: "Allow",
40
+ Action: ["lambda:InvokeFunction"],
41
+ Resource: workerLambda.output.arn.apply(arn => {
42
+ return [`${arn}`, `${arn}/*`];
43
+ })
44
+ }]
45
+ };
46
+ return app.addResource(aws.iam.Policy, {
47
+ name: params.name,
48
+ config: {
49
+ description: "This policy enables access to DynamoDb and SQS.",
50
+ policy
51
+ }
52
+ });
53
+ }
54
+
55
+ //# sourceMappingURL=createSyncSystemResolverLambdaPolicy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["aws","_interopRequireWildcard","require","_SyncSystemSQS","_SyncSystemDynamoDb","_SyncSystemWorkerLambda","createSyncSystemResolverLambdaPolicy","params","app","sqsQueue","getModule","SyncSystemSQS","lambda","workerLambda","SyncSystemWorkerLambda","dynamoDb","SyncSystemDynamoDb","policy","Version","Statement","Sid","Effect","Action","Resource","output","arn","apply","addResource","iam","Policy","name","config","description"],"sources":["createSyncSystemResolverLambdaPolicy.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport type { PulumiApp } from \"@webiny/pulumi\";\nimport { SyncSystemSQS } from \"../SyncSystemSQS.js\";\nimport { SyncSystemDynamoDb } from \"../SyncSystemDynamoDb.js\";\nimport { SyncSystemWorkerLambda } from \"~/apps/syncSystem/SyncSystemWorkerLambda.js\";\n\ninterface ICreateSyncSystemResolverLambdaPolicyParams {\n name: string;\n app: PulumiApp;\n}\n\nexport function createSyncSystemResolverLambdaPolicy(\n params: ICreateSyncSystemResolverLambdaPolicyParams\n) {\n const { app } = params;\n const { sqsQueue } = app.getModule(SyncSystemSQS);\n const { lambda: workerLambda } = app.getModule(SyncSystemWorkerLambda);\n const dynamoDb = app.getModule(SyncSystemDynamoDb);\n\n const policy: aws.iam.PolicyDocument = {\n Version: \"2012-10-17\",\n Statement: [\n {\n Sid: \"PermissionForSQS\",\n Effect: \"Allow\",\n Action: [\n \"sqs:SendMessage\",\n \"sqs:SendMessageBatch\",\n \"sqs:ReceiveMessage\",\n \"sqs:DeleteMessage\",\n \"sqs:DeleteMessageBatch\",\n \"sqs:ChangeMessageVisibility\",\n \"sqs:ChangeMessageVisibilityBatch\",\n \"sqs:GetQueueAttributes\"\n ],\n Resource: sqsQueue.output.arn.apply(arn => {\n return [`${arn}`, `${arn}/*`];\n })\n },\n {\n Sid: \"PermissionForDynamoDb\",\n Effect: \"Allow\",\n Action: [\n \"dynamodb:BatchGetItem\",\n \"dynamodb:BatchWriteItem\",\n \"dynamodb:ConditionCheckItem\",\n \"dynamodb:CreateBackup\",\n \"dynamodb:CreateTable\",\n \"dynamodb:CreateTableReplica\",\n \"dynamodb:DeleteBackup\",\n \"dynamodb:DeleteItem\",\n \"dynamodb:DeleteTable\",\n \"dynamodb:DeleteTableReplica\",\n \"dynamodb:DescribeBackup\",\n \"dynamodb:DescribeContinuousBackups\",\n \"dynamodb:DescribeContributorInsights\",\n \"dynamodb:DescribeExport\",\n \"dynamodb:DescribeKinesisStreamingDestination\",\n \"dynamodb:DescribeLimits\",\n \"dynamodb:DescribeReservedCapacity\",\n \"dynamodb:DescribeReservedCapacityOfferings\",\n \"dynamodb:DescribeStream\",\n \"dynamodb:DescribeTable\",\n \"dynamodb:DescribeTableReplicaAutoScaling\",\n \"dynamodb:DescribeTimeToLive\",\n \"dynamodb:DisableKinesisStreamingDestination\",\n \"dynamodb:EnableKinesisStreamingDestination\",\n \"dynamodb:ExportTableToPointInTime\",\n \"dynamodb:GetItem\",\n \"dynamodb:GetRecords\",\n \"dynamodb:GetShardIterator\",\n \"dynamodb:ListBackups\",\n \"dynamodb:ListContributorInsights\",\n \"dynamodb:ListExports\",\n \"dynamodb:ListStreams\",\n \"dynamodb:ListTables\",\n \"dynamodb:ListTagsOfResource\",\n \"dynamodb:PartiQLDelete\",\n \"dynamodb:PartiQLInsert\",\n \"dynamodb:PartiQLSelect\",\n \"dynamodb:PartiQLUpdate\",\n \"dynamodb:PurchaseReservedCapacityOfferings\",\n \"dynamodb:PutItem\",\n \"dynamodb:Query\",\n \"dynamodb:RestoreTableFromBackup\",\n \"dynamodb:RestoreTableToPointInTime\",\n \"dynamodb:Scan\",\n \"dynamodb:UpdateContinuousBackups\",\n \"dynamodb:UpdateContributorInsights\",\n \"dynamodb:UpdateItem\",\n \"dynamodb:UpdateTable\",\n \"dynamodb:UpdateTableReplicaAutoScaling\",\n \"dynamodb:UpdateTimeToLive\"\n ],\n Resource: [\n dynamoDb.output.arn.apply(arn => `${arn}`),\n dynamoDb.output.arn.apply(arn => `${arn}/*`)\n ]\n },\n {\n Sid: \"PermissionForWorkerLambda\",\n Effect: \"Allow\",\n Action: [\"lambda:InvokeFunction\"],\n Resource: workerLambda.output.arn.apply(arn => {\n return [`${arn}`, `${arn}/*`];\n })\n }\n ]\n };\n\n return app.addResource(aws.iam.Policy, {\n name: params.name,\n config: {\n description: \"This policy enables access to DynamoDb and SQS.\",\n policy\n }\n });\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAA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,EAC7C,4CAA4C,EAC5C,mCAAmC,EACnC,kBAAkB,EAClB,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,kCAAkC,EAClC,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,4CAA4C,EAC5C,kBAAkB,EAClB,gBAAgB,EAChB,iCAAiC,EACjC,oCAAoC,EACpC,eAAe,EACf,kCAAkC,EAClC,oCAAoC,EACpC,qBAAqB,EACrB,sBAAsB,EACtB,wCAAwC,EACxC,2BAA2B,CAC9B;MACDC,QAAQ,EAAE,CACNR,QAAQ,CAACS,MAAM,CAACC,GAAG,CAACC,KAAK,CAACD,GAAG,IAAI,GAAGA,GAAG,EAAE,CAAC,EAC1CV,QAAQ,CAACS,MAAM,CAACC,GAAG,CAACC,KAAK,CAACD,GAAG,IAAI,GAAGA,GAAG,IAAI,CAAC;IAEpD,CAAC,EACD;MACIL,GAAG,EAAE,2BAA2B;MAChCC,MAAM,EAAE,OAAO;MACfC,MAAM,EAAE,CAAC,uBAAuB,CAAC;MACjCC,QAAQ,EAAEV,YAAY,CAACW,MAAM,CAACC,GAAG,CAACC,KAAK,CAACD,GAAG,IAAI;QAC3C,OAAO,CAAC,GAAGA,GAAG,EAAE,EAAE,GAAGA,GAAG,IAAI,CAAC;MACjC,CAAC;IACL,CAAC;EAET,CAAC;EAED,OAAOjB,GAAG,CAACmB,WAAW,CAAC3B,GAAG,CAAC4B,GAAG,CAACC,MAAM,EAAE;IACnCC,IAAI,EAAEvB,MAAM,CAACuB,IAAI;IACjBC,MAAM,EAAE;MACJC,WAAW,EAAE,iDAAiD;MAC9Df;IACJ;EACJ,CAAC,CAAC;AACN","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ import type * as pulumi from "@pulumi/pulumi";
2
+ import type { IStackOutput } from "@webiny/cli-plugin-deploy-pulumi/utils/index.js";
3
+ export type PulumiOutput<T> = {
4
+ [K in keyof T]: pulumi.Output<T[K]>;
5
+ };
6
+ export interface IGetSyncSystemOutputResult extends IStackOutput {
7
+ /**
8
+ * createRegionProvider
9
+ */
10
+ region: string;
11
+ /**
12
+ * SyncSystemSQS
13
+ */
14
+ sqsUrl: string;
15
+ sqsArn: string;
16
+ sqsName: string;
17
+ /**
18
+ * DynamoDb
19
+ */
20
+ dynamoDbArn: string;
21
+ dynamoDbName: string;
22
+ dynamoDbHashKey: string;
23
+ dynamoDbRangeKey: string;
24
+ /**
25
+ * SyncSystemResolverLambda
26
+ */
27
+ resolverLambdaArn: string;
28
+ resolverLambdaName: string;
29
+ resolverLambdaRoleArn: string;
30
+ resolverLambdaRoleName: string;
31
+ resolverLambdaRoleId: string;
32
+ resolverLambdaPolicyArn: string;
33
+ resolverLambdaPolicyName: string;
34
+ resolverLambdaPolicyId: string;
35
+ resolverLambdaEventSourceMappingId: string;
36
+ resolverLambdaEventSourceMappingArn: string;
37
+ resolverLambdaEventSourceMappingEventSourceArn: string;
38
+ /**
39
+ * SyncSystemWorkerLambda
40
+ */
41
+ workerLambdaArn: string;
42
+ workerLambdaName: string;
43
+ workerLambdaRoleArn: string;
44
+ workerLambdaRoleName: string;
45
+ /**
46
+ * SyncSystemEventBus
47
+ */
48
+ eventBusArn: string;
49
+ eventBusName: string;
50
+ eventBusRuleArn: string;
51
+ eventBusRuleName: string;
52
+ eventBusTargetArn: string;
53
+ eventBusPolicyUrn: string;
54
+ eventBusPolicyQueueUrl: string;
55
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type * as pulumi from \"@pulumi/pulumi\";\nimport type { IStackOutput } from \"@webiny/cli-plugin-deploy-pulumi/utils/index.js\";\n\nexport type PulumiOutput<T> = {\n [K in keyof T]: pulumi.Output<T[K]>;\n};\n\nexport interface IGetSyncSystemOutputResult extends IStackOutput {\n /**\n * createRegionProvider\n */\n region: string;\n /**\n * SyncSystemSQS\n */\n sqsUrl: string;\n sqsArn: string;\n sqsName: string;\n /**\n * DynamoDb\n */\n dynamoDbArn: string;\n dynamoDbName: string;\n dynamoDbHashKey: string;\n dynamoDbRangeKey: string;\n /**\n * SyncSystemResolverLambda\n */\n resolverLambdaArn: string;\n resolverLambdaName: string;\n resolverLambdaRoleArn: string;\n resolverLambdaRoleName: string;\n resolverLambdaRoleId: string;\n resolverLambdaPolicyArn: string;\n resolverLambdaPolicyName: string;\n resolverLambdaPolicyId: string;\n resolverLambdaEventSourceMappingId: string;\n resolverLambdaEventSourceMappingArn: string;\n resolverLambdaEventSourceMappingEventSourceArn: string;\n /**\n * SyncSystemWorkerLambda\n */\n workerLambdaArn: string;\n workerLambdaName: string;\n workerLambdaRoleArn: string;\n workerLambdaRoleName: string;\n /**\n * SyncSystemEventBus\n */\n eventBusArn: string;\n eventBusName: string;\n eventBusRuleArn: string;\n eventBusRuleName: string;\n eventBusTargetArn: string;\n eventBusPolicyUrn: string;\n eventBusPolicyQueueUrl: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import * as aws from "@pulumi/aws";
2
- import { PulumiApp, PulumiAppResource } from "@webiny/pulumi";
2
+ import type { PulumiApp, PulumiAppResource } from "@webiny/pulumi";
3
3
  export declare function applyTenantRouter(app: PulumiApp, cloudfront: PulumiAppResource<typeof aws.cloudfront.Distribution>): {
4
4
  originLambda: PulumiAppResource<typeof import("@pulumi/aws/lambda/function").Function>;
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_fs","require","pulumi","_interopRequireWildcard","aws","_common","_constants","_awsRegion","createFunctionArchive","dynamoDbTable","region","handler","readFileSync","__dirname","source","replace","asset","AssetArchive","StringAsset","PREFIX","applyTenantRouter","app","cloudfront","getEnvVariableAwsRegion","core","getModule","CoreOutput","primaryDynamodbTableName","inlinePolicies","all","getCallerIdentity","apply","identity","name","policy","JSON","stringify","Version","Statement","Sid","Effect","Action","Resource","accountId","role","addResource","iam","Role","config","managedPolicyArns","ManagedPolicies","AWSLambdaBasicExecutionRole","assumeRolePolicy","Principal","Principals","LambdaPrincipal","EdgeLambdaPrincipal","awsUsEast1","Provider","originLambda","lambda","Function","publish","runtime","LAMBDA_RUNTIME","output","arn","timeout","memorySize","code","opts","provider","retainOnDelete","meta","canUseVpc","defaultCacheBehavior","value","forwardedValues","queryString","cookies","forward","headers","lambdaFunctionAssociations","eventType","includeBody","lambdaArn","qualifiedArn"],"sources":["tenantRouter.ts"],"sourcesContent":["import { readFileSync } from \"fs\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport { PulumiApp, PulumiAppResource } from \"@webiny/pulumi\";\nimport { CoreOutput } from \"./common\";\nimport { LAMBDA_RUNTIME } from \"~/constants\";\nimport { getEnvVariableAwsRegion } from \"~/env/awsRegion\";\n\ninterface Params {\n region: string;\n dynamoDbTable: string;\n}\n\nfunction createFunctionArchive({ dynamoDbTable, region }: Params) {\n const handler = readFileSync(\n __dirname + \"/../components/tenantRouter/functions/origin/request.js\",\n \"utf-8\"\n );\n\n const source = handler\n .replace(\"{DB_TABLE_NAME}\", dynamoDbTable)\n .replace(\"{DB_TABLE_REGION}\", region);\n\n return new pulumi.asset.AssetArchive({\n \"index.js\": new pulumi.asset.StringAsset(source)\n });\n}\n\nconst PREFIX = \"website-router\";\n\nexport function applyTenantRouter(\n app: PulumiApp,\n cloudfront: PulumiAppResource<typeof aws.cloudfront.Distribution>\n) {\n const region = getEnvVariableAwsRegion();\n\n // Get Core app output\n const core = app.getModule(CoreOutput);\n\n // `primaryDynamodbTableName` is a string, hence the type cast here.\n const dynamoDbTable = core.primaryDynamodbTableName;\n\n // Because of JSON.stringify, we need to resolve promises upfront.\n const inlinePolicies = pulumi\n .all([aws.getCallerIdentity({}), dynamoDbTable])\n .apply(([identity, dynamoDbTable]) => [\n {\n name: \"tenant-router-policy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Sid: \"PermissionForDynamodb\",\n Effect: \"Allow\",\n Action: [\"dynamodb:GetItem\", \"dynamodb:Query\"],\n Resource: [\n `arn:aws:dynamodb:${region}:${identity.accountId}:table/${dynamoDbTable}`,\n `arn:aws:dynamodb:${region}:${identity.accountId}:table/${dynamoDbTable}/*`\n ]\n }\n ]\n })\n }\n ]);\n\n const role = app.addResource(aws.iam.Role, {\n name: `${PREFIX}-role`,\n config: {\n inlinePolicies,\n managedPolicyArns: [aws.iam.ManagedPolicies.AWSLambdaBasicExecutionRole],\n assumeRolePolicy: {\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: \"sts:AssumeRole\",\n Principal: aws.iam.Principals.LambdaPrincipal,\n Effect: \"Allow\"\n },\n {\n Action: \"sts:AssumeRole\",\n Principal: aws.iam.Principals.EdgeLambdaPrincipal,\n Effect: \"Allow\"\n }\n ]\n }\n }\n });\n\n const awsUsEast1 = new aws.Provider(\"us-east-1\", { region: \"us-east-1\" });\n\n const originLambda = app.addResource(aws.lambda.Function, {\n name: `${PREFIX}-origin-request`,\n config: {\n publish: true,\n runtime: LAMBDA_RUNTIME,\n handler: \"index.handler\",\n role: role.output.arn,\n timeout: 5,\n memorySize: 128,\n code: dynamoDbTable.apply(dynamoDbTable => {\n return createFunctionArchive({\n region,\n dynamoDbTable\n });\n })\n },\n // With the `retainOnDelete` option set to `true`, the Lambda function will not be deleted when\n // the environment is destroyed. Users need to delete the function manually. We decided to use\n // this option here because it enables us to avoid annoying AWS Lambda function replication\n // errors upon destroying the stack (see https://github.com/pulumi/pulumi-aws/issues/2178).\n opts: { provider: awsUsEast1, retainOnDelete: true },\n meta: {\n canUseVpc: false\n }\n });\n\n cloudfront.config.defaultCacheBehavior(value => {\n return {\n ...value,\n // We need to forward the `Host` header so the Lambda@Edge knows what custom domain was requested.\n forwardedValues: {\n ...value.forwardedValues,\n queryString: value.forwardedValues?.queryString || false,\n cookies: value.forwardedValues?.cookies || { forward: \"none\" },\n headers: [...(value.forwardedValues?.headers || []), \"Host\"]\n },\n lambdaFunctionAssociations: [\n ...(value.lambdaFunctionAssociations || []),\n {\n eventType: \"origin-request\",\n includeBody: false,\n lambdaArn: originLambda.output.qualifiedArn\n }\n ]\n };\n });\n\n return { originLambda };\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAD,uBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAOA,SAASO,qBAAqBA,CAAC;EAAEC,aAAa;EAAEC;AAAe,CAAC,EAAE;EAC9D,MAAMC,OAAO,GAAG,IAAAC,gBAAY,EACxBC,SAAS,GAAG,yDAAyD,EACrE,OACJ,CAAC;EAED,MAAMC,MAAM,GAAGH,OAAO,CACjBI,OAAO,CAAC,iBAAiB,EAAEN,aAAa,CAAC,CACzCM,OAAO,CAAC,mBAAmB,EAAEL,MAAM,CAAC;EAEzC,OAAO,IAAIR,MAAM,CAACc,KAAK,CAACC,YAAY,CAAC;IACjC,UAAU,EAAE,IAAIf,MAAM,CAACc,KAAK,CAACE,WAAW,CAACJ,MAAM;EACnD,CAAC,CAAC;AACN;AAEA,MAAMK,MAAM,GAAG,gBAAgB;AAExB,SAASC,iBAAiBA,CAC7BC,GAAc,EACdC,UAAiE,EACnE;EACE,MAAMZ,MAAM,GAAG,IAAAa,kCAAuB,EAAC,CAAC;;EAExC;EACA,MAAMC,IAAI,GAAGH,GAAG,CAACI,SAAS,CAACC,kBAAU,CAAC;;EAEtC;EACA,MAAMjB,aAAa,GAAGe,IAAI,CAACG,wBAAwB;;EAEnD;EACA,MAAMC,cAAc,GAAG1B,MAAM,CACxB2B,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AE,gBAAgB;QAC3BC,WAAW,EAAE,KAAK;QAClBC,SAAS,EAAE1B,YAAY,CAACM,MAAM,CAACqB;MACnC,CAAC;IAET,CAAC;EACL,CAAC,CAAC;EAEF,OAAO;IAAE3B;EAAa,CAAC;AAC3B","ignoreList":[]}
1
+ {"version":3,"names":["_fs","require","pulumi","_interopRequireWildcard","aws","_common","_constants","_awsRegion","createFunctionArchive","dynamoDbTable","region","handler","readFileSync","__dirname","source","replace","asset","AssetArchive","StringAsset","PREFIX","applyTenantRouter","app","cloudfront","getEnvVariableAwsRegion","core","getModule","CoreOutput","primaryDynamodbTableName","inlinePolicies","all","getCallerIdentity","apply","identity","name","policy","JSON","stringify","Version","Statement","Sid","Effect","Action","Resource","accountId","role","addResource","iam","Role","config","managedPolicyArns","ManagedPolicies","AWSLambdaBasicExecutionRole","assumeRolePolicy","Principal","Principals","LambdaPrincipal","EdgeLambdaPrincipal","awsUsEast1","Provider","originLambda","lambda","Function","publish","runtime","LAMBDA_RUNTIME","output","arn","timeout","memorySize","code","opts","provider","retainOnDelete","meta","canUseVpc","defaultCacheBehavior","value","forwardedValues","queryString","cookies","forward","headers","lambdaFunctionAssociations","eventType","includeBody","lambdaArn","qualifiedArn"],"sources":["tenantRouter.ts"],"sourcesContent":["import { readFileSync } from \"fs\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport type { PulumiApp, PulumiAppResource } from \"@webiny/pulumi\";\nimport { CoreOutput } from \"./common\";\nimport { LAMBDA_RUNTIME } from \"~/constants\";\nimport { getEnvVariableAwsRegion } from \"~/env/awsRegion\";\n\ninterface Params {\n region: string;\n dynamoDbTable: string;\n}\n\nfunction createFunctionArchive({ dynamoDbTable, region }: Params) {\n const handler = readFileSync(\n __dirname + \"/../components/tenantRouter/functions/origin/request.js\",\n \"utf-8\"\n );\n\n const source = handler\n .replace(\"{DB_TABLE_NAME}\", dynamoDbTable)\n .replace(\"{DB_TABLE_REGION}\", region);\n\n return new pulumi.asset.AssetArchive({\n \"index.js\": new pulumi.asset.StringAsset(source)\n });\n}\n\nconst PREFIX = \"website-router\";\n\nexport function applyTenantRouter(\n app: PulumiApp,\n cloudfront: PulumiAppResource<typeof aws.cloudfront.Distribution>\n) {\n const region = getEnvVariableAwsRegion();\n\n // Get Core app output\n const core = app.getModule(CoreOutput);\n\n // `primaryDynamodbTableName` is a string, hence the type cast here.\n const dynamoDbTable = core.primaryDynamodbTableName;\n\n // Because of JSON.stringify, we need to resolve promises upfront.\n const inlinePolicies = pulumi\n .all([aws.getCallerIdentity({}), dynamoDbTable])\n .apply(([identity, dynamoDbTable]) => [\n {\n name: \"tenant-router-policy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Sid: \"PermissionForDynamodb\",\n Effect: \"Allow\",\n Action: [\"dynamodb:GetItem\", \"dynamodb:Query\"],\n Resource: [\n `arn:aws:dynamodb:${region}:${identity.accountId}:table/${dynamoDbTable}`,\n `arn:aws:dynamodb:${region}:${identity.accountId}:table/${dynamoDbTable}/*`\n ]\n }\n ]\n })\n }\n ]);\n\n const role = app.addResource(aws.iam.Role, {\n name: `${PREFIX}-role`,\n config: {\n inlinePolicies,\n managedPolicyArns: [aws.iam.ManagedPolicies.AWSLambdaBasicExecutionRole],\n assumeRolePolicy: {\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: \"sts:AssumeRole\",\n Principal: aws.iam.Principals.LambdaPrincipal,\n Effect: \"Allow\"\n },\n {\n Action: \"sts:AssumeRole\",\n Principal: aws.iam.Principals.EdgeLambdaPrincipal,\n Effect: \"Allow\"\n }\n ]\n }\n }\n });\n\n const awsUsEast1 = new aws.Provider(\"us-east-1\", { region: \"us-east-1\" });\n\n const originLambda = app.addResource(aws.lambda.Function, {\n name: `${PREFIX}-origin-request`,\n config: {\n publish: true,\n runtime: LAMBDA_RUNTIME,\n handler: \"index.handler\",\n role: role.output.arn,\n timeout: 5,\n memorySize: 128,\n code: dynamoDbTable.apply(dynamoDbTable => {\n return createFunctionArchive({\n region,\n dynamoDbTable\n });\n })\n },\n // With the `retainOnDelete` option set to `true`, the Lambda function will not be deleted when\n // the environment is destroyed. Users need to delete the function manually. We decided to use\n // this option here because it enables us to avoid annoying AWS Lambda function replication\n // errors upon destroying the stack (see https://github.com/pulumi/pulumi-aws/issues/2178).\n opts: { provider: awsUsEast1, retainOnDelete: true },\n meta: {\n canUseVpc: false\n }\n });\n\n cloudfront.config.defaultCacheBehavior(value => {\n return {\n ...value,\n // We need to forward the `Host` header so the Lambda@Edge knows what custom domain was requested.\n forwardedValues: {\n ...value.forwardedValues,\n queryString: value.forwardedValues?.queryString || false,\n cookies: value.forwardedValues?.cookies || { forward: \"none\" },\n headers: [...(value.forwardedValues?.headers || []), \"Host\"]\n },\n lambdaFunctionAssociations: [\n ...(value.lambdaFunctionAssociations || []),\n {\n eventType: \"origin-request\",\n includeBody: false,\n lambdaArn: originLambda.output.qualifiedArn\n }\n ]\n };\n });\n\n return { originLambda };\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAD,uBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAOA,SAASO,qBAAqBA,CAAC;EAAEC,aAAa;EAAEC;AAAe,CAAC,EAAE;EAC9D,MAAMC,OAAO,GAAG,IAAAC,gBAAY,EACxBC,SAAS,GAAG,yDAAyD,EACrE,OACJ,CAAC;EAED,MAAMC,MAAM,GAAGH,OAAO,CACjBI,OAAO,CAAC,iBAAiB,EAAEN,aAAa,CAAC,CACzCM,OAAO,CAAC,mBAAmB,EAAEL,MAAM,CAAC;EAEzC,OAAO,IAAIR,MAAM,CAACc,KAAK,CAACC,YAAY,CAAC;IACjC,UAAU,EAAE,IAAIf,MAAM,CAACc,K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K,CAACC,eAAe;QACxBC,WAAW,EAAEF,KAAK,CAACC,eAAe,EAAEC,WAAW,IAAI,KAAK;QACxDC,OAAO,EAAEH,KAAK,CAACC,eAAe,EAAEE,OAAO,IAAI;UAAEC,OAAO,EAAE;QAAO,CAAC;QAC9DC,OAAO,EAAE,CAAC,IAAIL,KAAK,CAACC,eAAe,EAAEI,OAAO,IAAI,EAAE,CAAC,EAAE,MAAM;MAC/D,CAAC;MACDC,0BAA0B,EAAE,CACxB,IAAIN,KAAK,CAACM,0BAA0B,IAAI,EAAE,CAAC,EAC3C;QACIC,SAAS,EAAE,gBAAgB;QAC3BC,WAAW,EAAE,KAAK;QAClBC,SAAS,EAAE1B,YAAY,CAACM,MAAM,CAACqB;MACnC,CAAC;IAET,CAAC;EACL,CAAC,CAAC;EAEF,OAAO;IAAE3B;EAAa,CAAC;AAC3B","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
- import { PulumiApp } from "@webiny/pulumi";
2
+ import type { PulumiApp } from "@webiny/pulumi";
3
3
  interface PreRenderingServiceParams {
4
4
  dbTableName: pulumi.Output<string>;
5
5
  dbTableHashKey: pulumi.Output<string>;