@webiny/project-aws 6.4.4-beta.0 → 6.4.4-beta.10
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/package.json +13 -13
- package/pulumi/apps/api/ApiBackgroundTask.js +13 -13
- package/pulumi/apps/api/ApiCloudfront.js +2 -2
- package/pulumi/apps/api/ApiFileManager.js +2 -2
- package/pulumi/apps/api/ApiGateway.js +6 -6
- package/pulumi/apps/api/ApiGraphql.js +14 -14
- package/pulumi/apps/api/ApiScheduler.js +7 -7
- package/pulumi/apps/api/ApiWebsocket.js +15 -15
- package/pulumi/apps/api/backgroundTask/policy.js +2 -2
- package/pulumi/apps/api/backgroundTask/role.js +3 -3
- package/pulumi/apps/api/createApiPulumiApp.js +6 -6
- package/pulumi/apps/api/handleGuardDutyEvents.js +5 -5
- package/pulumi/apps/awsUtils.js +3 -3
- package/pulumi/apps/blueGreen/BlueGreenRouterApiGateway.js +3 -3
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFront.js +3 -3
- package/pulumi/apps/blueGreen/BlueGreenRouterCloudFrontStore.js +2 -2
- package/pulumi/apps/blueGreen/cloudfront/createCloudFrontDefaultCacheBehaviorPolicies.js +3 -3
- package/pulumi/apps/blueGreen/createBlueGreenPulumiApp.js +4 -4
- package/pulumi/apps/core/CoreAuditLogsDynamo.js +2 -2
- package/pulumi/apps/core/CoreCognito.d.ts +1 -0
- package/pulumi/apps/core/CoreCognito.js +7 -4
- package/pulumi/apps/core/CoreCognito.js.map +1 -1
- package/pulumi/apps/core/CoreDynamo.js +2 -2
- package/pulumi/apps/core/CoreEventBus.js +2 -2
- package/pulumi/apps/core/CoreFileManager.js +7 -7
- package/pulumi/apps/core/CoreOpenSearch.js +24 -24
- package/pulumi/apps/core/CoreVpc.js +16 -16
- package/pulumi/apps/core/WatchCommand.js +12 -12
- package/pulumi/apps/core/cognitoIdentityProviders/configure.js +13 -5
- package/pulumi/apps/core/cognitoIdentityProviders/configure.js.map +1 -1
- package/pulumi/apps/core/configureS3BucketMalwareProtection.js +20 -20
- package/pulumi/apps/core/createCorePulumiApp.js +36 -20
- package/pulumi/apps/core/createCorePulumiApp.js.map +1 -1
- package/pulumi/apps/createAppBucket.js +12 -12
- package/pulumi/apps/lambdaUtils.js +8 -8
- package/pulumi/apps/react/createReactPulumiApp.js +6 -6
- package/pulumi/apps/syncSystem/SyncSystemDynamo.js +2 -2
- package/pulumi/apps/syncSystem/SyncSystemDynamoDb.js +2 -2
- package/pulumi/apps/syncSystem/SyncSystemEventBus.js +8 -8
- package/pulumi/apps/syncSystem/SyncSystemLambda.js +11 -11
- package/pulumi/apps/syncSystem/SyncSystemResolverLambda.js +3 -3
- package/pulumi/apps/syncSystem/SyncSystemSQS.js +2 -2
- package/pulumi/apps/syncSystem/SyncSystemWorkerLambda.js +4 -4
- package/pulumi/apps/syncSystem/addTableItems.js +5 -5
- package/pulumi/apps/syncSystem/api/attachCognitoPermissions.js +4 -4
- package/pulumi/apps/syncSystem/api/attachDynamoDbPermissions.js +3 -3
- package/pulumi/apps/syncSystem/api/attachEventBusPermissions.js +3 -3
- package/pulumi/apps/syncSystem/api/attachS3Permissions.js +4 -4
- package/pulumi/apps/syncSystem/createSyncSystemPulumiApp.js +7 -7
- package/pulumi/apps/syncSystem/lambda/createSyncSystemResolverLambdaPolicy.js +2 -2
- package/pulumi/utils/addDomainsUrlsOutputs.js +3 -3
- package/pulumi/utils/addServiceManifestTableItem.js +4 -4
- package/pulumi/utils/createAssetArchive.js +3 -3
- package/pulumi/utils/lambdaEnvVariables.js +2 -2
- package/pulumi/utils/tagResources.js +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VpcConfig } from "./common/index.js";
|
|
2
2
|
export * from "../utils/lambdaEnvVariables.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
4
4
|
const createLambdaRoleWithoutExecution = (app, params)=>{
|
|
5
|
-
const role = app.addResource(
|
|
5
|
+
const role = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Role, {
|
|
6
6
|
name: params.name,
|
|
7
7
|
config: {
|
|
8
8
|
assumeRolePolicy: {
|
|
@@ -22,14 +22,14 @@ const createLambdaRoleWithoutExecution = (app, params)=>{
|
|
|
22
22
|
isLambdaFunctionRole: true
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
if (params.policy) app.addResource(
|
|
25
|
+
if (params.policy) app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
26
26
|
name: `${params.name}-policy`,
|
|
27
27
|
config: {
|
|
28
28
|
role: role.output,
|
|
29
29
|
policyArn: params.policy.arn
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
if (params.executionRole) app.addResource(
|
|
32
|
+
if (params.executionRole) app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
33
33
|
name: `${params.name}-execution-role`,
|
|
34
34
|
config: {
|
|
35
35
|
role: role.output,
|
|
@@ -41,22 +41,22 @@ const createLambdaRoleWithoutExecution = (app, params)=>{
|
|
|
41
41
|
function createLambdaRole(app, params) {
|
|
42
42
|
const role = createLambdaRoleWithoutExecution(app, params);
|
|
43
43
|
const vpc = app.getModule(VpcConfig);
|
|
44
|
-
app.addResource(
|
|
44
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
45
45
|
name: `${params.name}-default-execution-role`,
|
|
46
46
|
config: {
|
|
47
47
|
role: role.output,
|
|
48
|
-
policyArn: vpc.enabled.apply((enabled)=>enabled ?
|
|
48
|
+
policyArn: vpc.enabled.apply((enabled)=>enabled ? __rspack_external__pulumi_aws_9e2bee2d.iam.ManagedPolicy.AWSLambdaVPCAccessExecutionRole : __rspack_external__pulumi_aws_9e2bee2d.iam.ManagedPolicy.AWSLambdaBasicExecutionRole)
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
return role;
|
|
52
52
|
}
|
|
53
53
|
const createLambdaRoleWithoutVpc = (app, params)=>{
|
|
54
54
|
const role = createLambdaRoleWithoutExecution(app, params);
|
|
55
|
-
app.addResource(
|
|
55
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
56
56
|
name: `${params.name}-default-execution-role`,
|
|
57
57
|
config: {
|
|
58
58
|
role: role.output,
|
|
59
|
-
policyArn:
|
|
59
|
+
policyArn: __rspack_external__pulumi_aws_9e2bee2d.iam.ManagedPolicy.AWSLambdaBasicExecutionRole
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
return role;
|
|
@@ -6,8 +6,8 @@ import { withServiceManifest } from "../../utils/withServiceManifest.js";
|
|
|
6
6
|
import { ApiOutput, CoreOutput } from "../index.js";
|
|
7
7
|
import { getProjectSdk } from "@webiny/project";
|
|
8
8
|
import { applyAwsResourceTags } from "../awsUtils.js";
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
9
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
10
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
11
11
|
const createReactPulumiApp = (projectAppParams)=>{
|
|
12
12
|
const app = createPulumiApp({
|
|
13
13
|
name: projectAppParams.name,
|
|
@@ -24,7 +24,7 @@ const createReactPulumiApp = (projectAppParams)=>{
|
|
|
24
24
|
app.addModule(ApiOutput);
|
|
25
25
|
if (projectAppParams.pulumi) await projectAppParams.pulumi(app);
|
|
26
26
|
const bucket = createPrivateAppBucket(app, `${name}-app`);
|
|
27
|
-
const cloudfront = app.addResource(
|
|
27
|
+
const cloudfront = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudfront.Distribution, {
|
|
28
28
|
name: `${name}-app-cdn`,
|
|
29
29
|
config: {
|
|
30
30
|
httpVersion: "http2and3",
|
|
@@ -97,13 +97,13 @@ const createReactPulumiApp = (projectAppParams)=>{
|
|
|
97
97
|
});
|
|
98
98
|
});
|
|
99
99
|
await applyAwsResourceTags(name);
|
|
100
|
-
app.addResource(
|
|
100
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.dynamodb.TableItem, {
|
|
101
101
|
name: "adminSettings",
|
|
102
102
|
config: {
|
|
103
103
|
tableName: core.primaryDynamodbTableName,
|
|
104
104
|
hashKey: core.primaryDynamodbTableHashKey,
|
|
105
|
-
rangeKey:
|
|
106
|
-
item:
|
|
105
|
+
rangeKey: __rspack_external__pulumi_pulumi_f3e773ed.output(core.primaryDynamodbTableRangeKey).apply((key)=>key || "SK"),
|
|
106
|
+
item: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`{
|
|
107
107
|
"PK": {"S": "ADMIN#SETTINGS"},
|
|
108
108
|
"SK": {"S": "default"},
|
|
109
109
|
"data": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createAppModule } from "@webiny/pulumi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
3
3
|
const SyncSystemDynamo = createAppModule({
|
|
4
4
|
name: "SyncSystemDynamoDb",
|
|
5
5
|
config (app, params) {
|
|
6
|
-
return app.addResource(
|
|
6
|
+
return app.addResource(__rspack_external__pulumi_aws_9e2bee2d.dynamodb.Table, {
|
|
7
7
|
name: "sync-table",
|
|
8
8
|
config: {
|
|
9
9
|
attributes: [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createAppModule } from "@webiny/pulumi";
|
|
2
2
|
import { createSyncResourceName } from "./createSyncResourceName.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
4
4
|
const SyncSystemDynamoDb = createAppModule({
|
|
5
5
|
name: "SyncSystemDynamoDb",
|
|
6
6
|
config (app) {
|
|
7
|
-
return app.addResource(
|
|
7
|
+
return app.addResource(__rspack_external__pulumi_aws_9e2bee2d.dynamodb.Table, {
|
|
8
8
|
name: createSyncResourceName("table"),
|
|
9
9
|
config: {
|
|
10
10
|
attributes: [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createAppModule } from "@webiny/pulumi";
|
|
2
2
|
import { createSyncResourceName } from "./createSyncResourceName.js";
|
|
3
3
|
import { SyncSystemSQS } from "./SyncSystemSQS.js";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
5
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
6
6
|
const SyncSystemEventBus = createAppModule({
|
|
7
7
|
name: "SyncSystemEventBus",
|
|
8
8
|
config: (app)=>{
|
|
@@ -12,7 +12,7 @@ const SyncSystemEventBus = createAppModule({
|
|
|
12
12
|
name: eventBusName,
|
|
13
13
|
description: "Connect deployed systems to Sync SQS"
|
|
14
14
|
};
|
|
15
|
-
const eventBus = app.addResource(
|
|
15
|
+
const eventBus = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventBus, {
|
|
16
16
|
name: eventBusName,
|
|
17
17
|
config
|
|
18
18
|
});
|
|
@@ -24,7 +24,7 @@ const SyncSystemEventBus = createAppModule({
|
|
|
24
24
|
]
|
|
25
25
|
})
|
|
26
26
|
};
|
|
27
|
-
const eventBusRule = app.addResource(
|
|
27
|
+
const eventBusRule = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventRule, {
|
|
28
28
|
name: createSyncResourceName("eventBusRule"),
|
|
29
29
|
config: eventBusRuleConfig
|
|
30
30
|
});
|
|
@@ -36,15 +36,15 @@ const SyncSystemEventBus = createAppModule({
|
|
|
36
36
|
messageGroupId: "default"
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
const eventBusTarget = app.addResource(
|
|
39
|
+
const eventBusTarget = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventTarget, {
|
|
40
40
|
name: createSyncResourceName("eventBusEventTarget"),
|
|
41
41
|
config: eventBusTargetConfig
|
|
42
42
|
});
|
|
43
|
-
const eventBusPolicy = app.addResource(
|
|
43
|
+
const eventBusPolicy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.sqs.QueuePolicy, {
|
|
44
44
|
name: createSyncResourceName("queuePolicy"),
|
|
45
45
|
config: {
|
|
46
46
|
queueUrl: sqsQueue.output.url,
|
|
47
|
-
policy:
|
|
47
|
+
policy: __rspack_external__pulumi_pulumi_f3e773ed.all([
|
|
48
48
|
sqsQueue.output.arn,
|
|
49
49
|
eventBusRule.output.arn
|
|
50
50
|
]).apply(([sqsArn, eventBusRuleArn])=>JSON.stringify({
|
|
@@ -52,7 +52,7 @@ const SyncSystemEventBus = createAppModule({
|
|
|
52
52
|
Statement: [
|
|
53
53
|
{
|
|
54
54
|
Effect: "Allow",
|
|
55
|
-
Principal:
|
|
55
|
+
Principal: __rspack_external__pulumi_aws_9e2bee2d.iam.Principals.EventsPrincipal,
|
|
56
56
|
Action: [
|
|
57
57
|
"sqs:SendMessage"
|
|
58
58
|
],
|
|
@@ -5,8 +5,8 @@ import { VpcConfig } from "../index.js";
|
|
|
5
5
|
import { getAwsAccountId, getAwsRegion } from "../awsUtils.js";
|
|
6
6
|
import { LAMBDA_RUNTIME } from "../../constants.js";
|
|
7
7
|
import { SyncSystemDynamo } from "./SyncSystemDynamo.js";
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
8
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
9
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
10
10
|
const SyncSystemLambda = createAppModule({
|
|
11
11
|
name: "SyncSystemLambda",
|
|
12
12
|
config (app, _) {
|
|
@@ -25,7 +25,7 @@ const SyncSystemLambda = createAppModule({
|
|
|
25
25
|
name: "sync-system-lambda-role",
|
|
26
26
|
policy: policy.output
|
|
27
27
|
});
|
|
28
|
-
const syncSystemLambda = app.addResource(
|
|
28
|
+
const syncSystemLambda = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Function, {
|
|
29
29
|
name: "sync-system-lambda",
|
|
30
30
|
config: {
|
|
31
31
|
runtime: LAMBDA_RUNTIME,
|
|
@@ -33,8 +33,8 @@ const SyncSystemLambda = createAppModule({
|
|
|
33
33
|
role: role.output.arn,
|
|
34
34
|
timeout: 900,
|
|
35
35
|
memorySize: 1024,
|
|
36
|
-
code: new
|
|
37
|
-
".": new
|
|
36
|
+
code: new __rspack_external__pulumi_pulumi_f3e773ed.asset.AssetArchive({
|
|
37
|
+
".": new __rspack_external__pulumi_pulumi_f3e773ed.asset.FileArchive(path.join(app.paths.workspace, "transfer/build"))
|
|
38
38
|
}),
|
|
39
39
|
environment: {
|
|
40
40
|
variables: getCommonLambdaEnvVariables().apply((value)=>({
|
|
@@ -137,10 +137,10 @@ function createSyncSystemLambdaPolicy(params) {
|
|
|
137
137
|
"s3:GetObject"
|
|
138
138
|
],
|
|
139
139
|
Resource: [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${primary.fileManagerBucketId}`,
|
|
141
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${primary.fileManagerBucketId}/*`,
|
|
142
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${secondary.fileManagerBucketId}`,
|
|
143
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${secondary.fileManagerBucketId}/*`
|
|
144
144
|
]
|
|
145
145
|
},
|
|
146
146
|
{
|
|
@@ -149,11 +149,11 @@ function createSyncSystemLambdaPolicy(params) {
|
|
|
149
149
|
Action: [
|
|
150
150
|
"lambda:InvokeFunction"
|
|
151
151
|
],
|
|
152
|
-
Resource:
|
|
152
|
+
Resource: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:lambda:${awsRegion}:${awsAccountId}:function:*`
|
|
153
153
|
}
|
|
154
154
|
]
|
|
155
155
|
};
|
|
156
|
-
return app.addResource(
|
|
156
|
+
return app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
157
157
|
name: "SyncSystemLambdaPolicy",
|
|
158
158
|
config: {
|
|
159
159
|
description: "This policy enables access to Dynamodb, S3 and Lambda.",
|
|
@@ -8,7 +8,7 @@ import { createAssetArchive } from "../../utils/createAssetArchive.js";
|
|
|
8
8
|
import { SyncSystemSQS } from "./SyncSystemSQS.js";
|
|
9
9
|
import { SyncSystemDynamoDb } from "./SyncSystemDynamoDb.js";
|
|
10
10
|
import { SyncSystemWorkerLambda } from "./SyncSystemWorkerLambda.js";
|
|
11
|
-
import * as
|
|
11
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
12
12
|
const SyncSystemResolverLambda = createAppModule({
|
|
13
13
|
name: "SyncSystemResolverLambda",
|
|
14
14
|
config (app) {
|
|
@@ -24,7 +24,7 @@ const SyncSystemResolverLambda = createAppModule({
|
|
|
24
24
|
name: roleName,
|
|
25
25
|
policy: policy.output
|
|
26
26
|
});
|
|
27
|
-
const lambda = app.addResource(
|
|
27
|
+
const lambda = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Function, {
|
|
28
28
|
name: createSyncResourceName("resolver-lambda"),
|
|
29
29
|
config: {
|
|
30
30
|
runtime: LAMBDA_RUNTIME,
|
|
@@ -47,7 +47,7 @@ const SyncSystemResolverLambda = createAppModule({
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
const eventSourceMapping = app.addResource(
|
|
50
|
+
const eventSourceMapping = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.EventSourceMapping, {
|
|
51
51
|
name: createSyncResourceName("sqs-to-resolver-lambda"),
|
|
52
52
|
config: {
|
|
53
53
|
enabled: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAppModule } from "@webiny/pulumi";
|
|
2
2
|
import { createSyncResourceName } from "./createSyncResourceName.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
4
4
|
const SyncSystemSQS = createAppModule({
|
|
5
5
|
name: "SyncSystemSQS",
|
|
6
6
|
config: (app)=>{
|
|
@@ -16,7 +16,7 @@ const SyncSystemSQS = createAppModule({
|
|
|
16
16
|
sqsManagedSseEnabled: false,
|
|
17
17
|
contentBasedDeduplication: true
|
|
18
18
|
};
|
|
19
|
-
const sqsQueue = app.addResource(
|
|
19
|
+
const sqsQueue = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.sqs.Queue, {
|
|
20
20
|
name: `${createSyncResourceName("sqs")}`,
|
|
21
21
|
config
|
|
22
22
|
});
|
|
@@ -4,7 +4,7 @@ import { LAMBDA_RUNTIME } from "../../constants.js";
|
|
|
4
4
|
import { createSyncResourceName } from "./createSyncResourceName.js";
|
|
5
5
|
import { createAssetArchive } from "../../utils/createAssetArchive.js";
|
|
6
6
|
import { createLambdaRoleWithoutVpc } from "../lambdaUtils.js";
|
|
7
|
-
import * as
|
|
7
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
8
8
|
const SyncSystemWorkerLambda = createAppModule({
|
|
9
9
|
name: "SyncSystemWorkerLambda",
|
|
10
10
|
config (app) {
|
|
@@ -13,14 +13,14 @@ const SyncSystemWorkerLambda = createAppModule({
|
|
|
13
13
|
const role = createLambdaRoleWithoutVpc(app, {
|
|
14
14
|
name: roleName
|
|
15
15
|
});
|
|
16
|
-
const policy = app.addResource(
|
|
16
|
+
const policy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
17
17
|
name: `${roleName}-policy-attachment`,
|
|
18
18
|
config: {
|
|
19
19
|
role: role.output.name,
|
|
20
|
-
policyArn:
|
|
20
|
+
policyArn: __rspack_external__pulumi_aws_9e2bee2d.iam.ManagedPolicy.AWSLambdaBasicExecutionRole
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
const lambda = app.addResource(
|
|
23
|
+
const lambda = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Function, {
|
|
24
24
|
name: lambdaName,
|
|
25
25
|
config: {
|
|
26
26
|
runtime: LAMBDA_RUNTIME,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
2
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
3
3
|
const addTableItems = (params)=>{
|
|
4
4
|
const { app, table, items } = params;
|
|
5
|
-
app.addResource(
|
|
5
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.dynamodb.TableItem, {
|
|
6
6
|
name: "syncSystemSettings",
|
|
7
7
|
config: {
|
|
8
8
|
tableName: table.output.arn,
|
|
9
9
|
hashKey: table.output.hashKey,
|
|
10
|
-
rangeKey:
|
|
11
|
-
item:
|
|
10
|
+
rangeKey: __rspack_external__pulumi_pulumi_f3e773ed.output(table.output.rangeKey).apply((key)=>key || "SK"),
|
|
11
|
+
item: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`{
|
|
12
12
|
${buildTableItems({
|
|
13
13
|
PK: "syncSystem#SETTINGS",
|
|
14
14
|
SK: "default",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createSyncResourceName } from "../createSyncResourceName.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
3
3
|
const attachCognitoPermissions = (params)=>{
|
|
4
4
|
const { app, syncSystem, core } = params;
|
|
5
5
|
if (!core.cognitoUserPoolArn) return null;
|
|
6
6
|
const { resolverLambdaRoleName, workerLambdaRoleName } = syncSystem;
|
|
7
7
|
const resolverLambdaToS3ResourceName = createSyncResourceName("resolver-lambda-to-cognito");
|
|
8
8
|
const workerLambdaToS3ResourceName = createSyncResourceName("worker-lambda-to-cognito");
|
|
9
|
-
const cognitoPolicy = app.addResource(
|
|
9
|
+
const cognitoPolicy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
10
10
|
name: `${resolverLambdaToS3ResourceName}-policy`,
|
|
11
11
|
config: {
|
|
12
12
|
description: "This policy enables access from Sync System Resolver and Worker Lambda to Webiny Cognito.",
|
|
@@ -28,14 +28,14 @@ const attachCognitoPermissions = (params)=>{
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
const resolverLambdaS3PolicyAttachment = app.addResource(
|
|
31
|
+
const resolverLambdaS3PolicyAttachment = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
32
32
|
name: `${resolverLambdaToS3ResourceName}-policy-attachment`,
|
|
33
33
|
config: {
|
|
34
34
|
role: resolverLambdaRoleName,
|
|
35
35
|
policyArn: cognitoPolicy.output.arn
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
const workerLambdaS3PolicyAttachment = app.addResource(
|
|
38
|
+
const workerLambdaS3PolicyAttachment = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
39
39
|
name: `${workerLambdaToS3ResourceName}-policy-attachment`,
|
|
40
40
|
config: {
|
|
41
41
|
role: workerLambdaRoleName,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createSyncResourceName } from "../createSyncResourceName.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
3
3
|
const attachDynamoDbPermissions = (params)=>{
|
|
4
4
|
const { app, syncSystem, core } = params;
|
|
5
5
|
const { resolverLambdaRoleName } = syncSystem;
|
|
6
6
|
const lambdaToDynamoDbResourceName = createSyncResourceName("resolver-lambda-to-dynamodb");
|
|
7
|
-
const dynamoDbPolicy = app.addResource(
|
|
7
|
+
const dynamoDbPolicy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
8
8
|
name: `${lambdaToDynamoDbResourceName}-policy`,
|
|
9
9
|
config: {
|
|
10
10
|
description: "This policy enables access from Sync System Lambda to Webiny DynamoDB.",
|
|
@@ -75,7 +75,7 @@ const attachDynamoDbPermissions = (params)=>{
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
-
const lambdaRolePolicyAttachment = app.addResource(
|
|
78
|
+
const lambdaRolePolicyAttachment = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
79
79
|
name: `${lambdaToDynamoDbResourceName}-role-policy-attachment`,
|
|
80
80
|
config: {
|
|
81
81
|
role: resolverLambdaRoleName,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createSyncResourceName } from "../createSyncResourceName.js";
|
|
2
2
|
import { ApiGraphql } from "../../api/ApiGraphql.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
4
4
|
const attachEventBusPermissions = (params)=>{
|
|
5
5
|
const { app, syncSystem } = params;
|
|
6
6
|
const { eventBusArn } = syncSystem;
|
|
7
7
|
const graphql = app.getModule(ApiGraphql);
|
|
8
8
|
const lambdaToEventBridgeResourceName = createSyncResourceName("lambda-to-event-bridge");
|
|
9
|
-
const eventBridgePolicy = app.addResource(
|
|
9
|
+
const eventBridgePolicy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
10
10
|
name: `${lambdaToEventBridgeResourceName}-policy`,
|
|
11
11
|
config: {
|
|
12
12
|
description: "This policy enables access from Webiny Lambdas to Sync System EventBridge.",
|
|
@@ -25,7 +25,7 @@ const attachEventBusPermissions = (params)=>{
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
const graphQlPolicyAttachment = app.addResource(
|
|
28
|
+
const graphQlPolicyAttachment = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
29
29
|
name: `${lambdaToEventBridgeResourceName}-graphql-role-policy-attachment`,
|
|
30
30
|
config: {
|
|
31
31
|
role: graphql.role.output.name,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createSyncResourceName } from "../createSyncResourceName.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
3
3
|
const attachS3Permissions = (params)=>{
|
|
4
4
|
const { app, syncSystem, core } = params;
|
|
5
5
|
const { resolverLambdaRoleName, workerLambdaRoleName } = syncSystem;
|
|
6
6
|
const resolverLambdaToS3ResourceName = createSyncResourceName("resolver-lambda-to-s3-fm");
|
|
7
7
|
const workerLambdaToS3ResourceName = createSyncResourceName("worker-lambda-to-s3-fm");
|
|
8
|
-
const s3Policy = app.addResource(
|
|
8
|
+
const s3Policy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
9
9
|
name: `${resolverLambdaToS3ResourceName}-policy`,
|
|
10
10
|
config: {
|
|
11
11
|
description: "This policy enables access from Sync System Resolver and Worker Lambda to Webiny S3.",
|
|
@@ -30,14 +30,14 @@ const attachS3Permissions = (params)=>{
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
const resolverLambdaS3PolicyAttachment = app.addResource(
|
|
33
|
+
const resolverLambdaS3PolicyAttachment = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
34
34
|
name: `${resolverLambdaToS3ResourceName}-policy-attachment`,
|
|
35
35
|
config: {
|
|
36
36
|
role: resolverLambdaRoleName,
|
|
37
37
|
policyArn: s3Policy.output.arn
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
const workerLambdaS3PolicyAttachment = app.addResource(
|
|
40
|
+
const workerLambdaS3PolicyAttachment = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
41
41
|
name: `${workerLambdaToS3ResourceName}-policy-attachment`,
|
|
42
42
|
config: {
|
|
43
43
|
role: workerLambdaRoleName,
|
|
@@ -9,8 +9,8 @@ import { SyncSystemWorkerLambda } from "./SyncSystemWorkerLambda.js";
|
|
|
9
9
|
import { getProjectSdk } from "@webiny/project";
|
|
10
10
|
import { getVpcConfigFromExtension } from "../extensions/getVpcConfigFromExtension.js";
|
|
11
11
|
import { applyAwsResourceTags } from "../awsUtils.js";
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
12
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
13
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
14
14
|
function createSyncSystemPulumiApp() {
|
|
15
15
|
return createPulumiApp({
|
|
16
16
|
name: "sync",
|
|
@@ -31,16 +31,16 @@ function createSyncSystemPulumiApp() {
|
|
|
31
31
|
if (useExistingVpc) {
|
|
32
32
|
if (!useExistingVpc.lambdaFunctionsVpcConfig) throw new Error("Cannot specify `useExistingVpc` parameter because the `lambdaFunctionsVpcConfig` parameter wasn't provided.");
|
|
33
33
|
onResource((resource)=>{
|
|
34
|
-
if (isResourceOfType(resource,
|
|
34
|
+
if (isResourceOfType(resource, __rspack_external__pulumi_aws_9e2bee2d.lambda.Function)) {
|
|
35
35
|
const canUseVpc = false !== resource.meta.canUseVpc;
|
|
36
36
|
if (canUseVpc) resource.config.vpcConfig(useExistingVpc.lambdaFunctionsVpcConfig);
|
|
37
37
|
}
|
|
38
|
-
if (isResourceOfType(resource,
|
|
39
|
-
if (resource.meta.isLambdaFunctionRole) addResource(
|
|
38
|
+
if (isResourceOfType(resource, __rspack_external__pulumi_aws_9e2bee2d.iam.Role)) {
|
|
39
|
+
if (resource.meta.isLambdaFunctionRole) addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
40
40
|
name: `${resource.name}-vpc-access-execution-role`,
|
|
41
41
|
config: {
|
|
42
42
|
role: resource.output.name,
|
|
43
|
-
policyArn:
|
|
43
|
+
policyArn: __rspack_external__pulumi_aws_9e2bee2d.iam.ManagedPolicy.AWSLambdaVPCAccessExecutionRole
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -58,7 +58,7 @@ function createSyncSystemPulumiApp() {
|
|
|
58
58
|
const resolverLambda = regionApp.addModule(SyncSystemResolverLambda);
|
|
59
59
|
const { eventBusRule, eventBus, eventBusTarget, eventBusPolicy } = regionApp.addModule(SyncSystemEventBus);
|
|
60
60
|
const output = {
|
|
61
|
-
region:
|
|
61
|
+
region: __rspack_external__pulumi_pulumi_f3e773ed.output(process.env.AWS_REGION),
|
|
62
62
|
sqsUrl: sqsQueue.output.url,
|
|
63
63
|
sqsArn: sqsQueue.output.arn,
|
|
64
64
|
sqsName: sqsQueue.output.name,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SyncSystemSQS } from "../SyncSystemSQS.js";
|
|
2
2
|
import { SyncSystemDynamoDb } from "../SyncSystemDynamoDb.js";
|
|
3
3
|
import { SyncSystemWorkerLambda } from "../SyncSystemWorkerLambda.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
5
5
|
function createSyncSystemResolverLambdaPolicy(params) {
|
|
6
6
|
const { app } = params;
|
|
7
7
|
const { sqsQueue } = app.getModule(SyncSystemSQS);
|
|
@@ -101,7 +101,7 @@ function createSyncSystemResolverLambdaPolicy(params) {
|
|
|
101
101
|
}
|
|
102
102
|
]
|
|
103
103
|
};
|
|
104
|
-
return app.addResource(
|
|
104
|
+
return app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
105
105
|
name: params.name,
|
|
106
106
|
config: {
|
|
107
107
|
description: "This policy enables access to DynamoDb and SQS.",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
2
2
|
const addDomainsUrlsOutputs = (params)=>{
|
|
3
3
|
const { cloudfrontDistribution, app, map } = params;
|
|
4
4
|
const distributionDomain = cloudfrontDistribution.output.domainName;
|
|
@@ -12,8 +12,8 @@ const addDomainsUrlsOutputs = (params)=>{
|
|
|
12
12
|
cloudfrontDistribution.config.aliases((aliases)=>{
|
|
13
13
|
const [firstAlias] = aliases || [];
|
|
14
14
|
if (firstAlias) app.addOutputs({
|
|
15
|
-
[map.usedDomain]:
|
|
16
|
-
[map.usedUrl]:
|
|
15
|
+
[map.usedDomain]: __rspack_external__pulumi_pulumi_f3e773ed.output(firstAlias),
|
|
16
|
+
[map.usedUrl]: __rspack_external__pulumi_pulumi_f3e773ed.output(`https://${firstAlias}`)
|
|
17
17
|
});
|
|
18
18
|
return aliases;
|
|
19
19
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { marshall } from "@webiny/aws-sdk/client-dynamodb/index.js";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
3
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
4
4
|
const addServiceManifestTableItem = (app, table, manifest)=>{
|
|
5
5
|
table.rangeKey.apply((res)=>{
|
|
6
|
-
new
|
|
6
|
+
new __rspack_external__pulumi_aws_9e2bee2d.dynamodb.TableItem(manifest.name, {
|
|
7
7
|
tableName: table.tableName,
|
|
8
8
|
hashKey: table.hashKey,
|
|
9
9
|
rangeKey: res,
|
|
10
|
-
item:
|
|
10
|
+
item: __rspack_external__pulumi_pulumi_f3e773ed.all(manifest.manifest).apply((res)=>__rspack_external__pulumi_pulumi_f3e773ed.interpolate`{
|
|
11
11
|
"PK": "SERVICE_MANIFEST#${app.name}#${manifest.name}",
|
|
12
12
|
"SK": "default",
|
|
13
13
|
"GSI1_PK": "SERVICE_MANIFESTS",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
const createAssetArchive = (target)=>new
|
|
3
|
-
".": new
|
|
1
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
2
|
+
const createAssetArchive = (target)=>new __rspack_external__pulumi_pulumi_f3e773ed.asset.AssetArchive({
|
|
3
|
+
".": new __rspack_external__pulumi_pulumi_f3e773ed.asset.FileArchive(target)
|
|
4
4
|
});
|
|
5
5
|
export { createAssetArchive };
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
2
2
|
const variablesRegistry = {};
|
|
3
3
|
if ("true" === process.env.DEBUG) variablesRegistry.NODE_OPTIONS = "--enable-source-maps";
|
|
4
4
|
let sealEnvVariables;
|
|
@@ -25,7 +25,7 @@ const variablesPromise = new Promise((resolve)=>{
|
|
|
25
25
|
};
|
|
26
26
|
});
|
|
27
27
|
function getCommonLambdaEnvVariables() {
|
|
28
|
-
return
|
|
28
|
+
return __rspack_external__pulumi_pulumi_f3e773ed.output(variablesPromise);
|
|
29
29
|
}
|
|
30
30
|
function setCommonLambdaEnvVariables(variables) {
|
|
31
31
|
Object.assign(variablesRegistry, variables);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
2
2
|
function tagResources(tags) {
|
|
3
|
-
|
|
3
|
+
__rspack_external__pulumi_pulumi_f3e773ed.runtime.registerStackTransformation((args)=>{
|
|
4
4
|
if (isTaggable(args.type)) {
|
|
5
5
|
args.props["tags"] = {
|
|
6
6
|
...args.props["tags"],
|