@webiny/project-aws 6.4.4-beta.4 → 6.4.4-beta.6
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.js +3 -3
- 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 +5 -5
- package/pulumi/apps/core/configureS3BucketMalwareProtection.js +20 -20
- package/pulumi/apps/core/createCorePulumiApp.js +19 -19
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/project-aws",
|
|
3
|
-
"version": "6.4.4-beta.
|
|
3
|
+
"version": "6.4.4-beta.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@pulumi/aws": "^7.
|
|
21
|
-
"@pulumi/pulumi": "^3.
|
|
20
|
+
"@pulumi/aws": "^7.35.0",
|
|
21
|
+
"@pulumi/pulumi": "^3.251.0",
|
|
22
22
|
"@pulumi/random": "4.21.0",
|
|
23
|
-
"@webiny/api-headless-cms": "6.4.4-beta.
|
|
24
|
-
"@webiny/aws-layers": "6.4.4-beta.
|
|
25
|
-
"@webiny/aws-sdk": "6.4.4-beta.
|
|
26
|
-
"@webiny/cli-core": "6.4.4-beta.
|
|
27
|
-
"@webiny/di": "1.0.
|
|
28
|
-
"@webiny/project": "6.4.4-beta.
|
|
29
|
-
"@webiny/pulumi": "6.4.4-beta.
|
|
30
|
-
"@webiny/utils": "6.4.4-beta.
|
|
23
|
+
"@webiny/api-headless-cms": "6.4.4-beta.6",
|
|
24
|
+
"@webiny/aws-layers": "6.4.4-beta.6",
|
|
25
|
+
"@webiny/aws-sdk": "6.4.4-beta.6",
|
|
26
|
+
"@webiny/cli-core": "6.4.4-beta.6",
|
|
27
|
+
"@webiny/di": "1.0.2",
|
|
28
|
+
"@webiny/project": "6.4.4-beta.6",
|
|
29
|
+
"@webiny/pulumi": "6.4.4-beta.6",
|
|
30
|
+
"@webiny/utils": "6.4.4-beta.6",
|
|
31
31
|
"chalk": "5.6.2",
|
|
32
32
|
"email-addresses": "5.0.0",
|
|
33
33
|
"find-up": "8.0.0",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/lodash": "4.17.24",
|
|
44
44
|
"@types/ncp": "2.0.8",
|
|
45
|
-
"@webiny/build-tools": "6.4.4-beta.
|
|
45
|
+
"@webiny/build-tools": "6.4.4-beta.6",
|
|
46
46
|
"typescript": "6.0.3",
|
|
47
|
-
"vitest": "4.1.
|
|
47
|
+
"vitest": "4.1.10"
|
|
48
48
|
},
|
|
49
49
|
"adio": {
|
|
50
50
|
"ignoreDirs": [
|
|
@@ -5,8 +5,8 @@ import { createBackgroundTaskStepFunctionPolicy } from "./backgroundTask/policy.
|
|
|
5
5
|
import { createBackgroundTaskStepFunctionRole } from "./backgroundTask/role.js";
|
|
6
6
|
import { getLayerArn } from "@webiny/aws-layers";
|
|
7
7
|
import { getAwsAccountId, getAwsRegion } from "../awsUtils.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 ApiBackgroundTaskLambdaName = "background-task";
|
|
11
11
|
const ApiBackgroundTask = createAppModule({
|
|
12
12
|
name: "ApiBackgroundTask",
|
|
@@ -16,7 +16,7 @@ const ApiBackgroundTask = createAppModule({
|
|
|
16
16
|
const core = app.getModule(CoreOutput);
|
|
17
17
|
const graphql = app.getModule(ApiGraphql);
|
|
18
18
|
const baseConfig = graphql.functions.graphql.config.clone();
|
|
19
|
-
const backgroundTask = app.addResource(
|
|
19
|
+
const backgroundTask = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Function, {
|
|
20
20
|
name: ApiBackgroundTaskLambdaName,
|
|
21
21
|
config: {
|
|
22
22
|
...baseConfig,
|
|
@@ -40,17 +40,17 @@ const ApiBackgroundTask = createAppModule({
|
|
|
40
40
|
name: "background-task-sfn-role",
|
|
41
41
|
policy: stepFunctionPolicy.output
|
|
42
42
|
});
|
|
43
|
-
const stepFunction = app.addResource(
|
|
43
|
+
const stepFunction = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.sfn.StateMachine, {
|
|
44
44
|
name: "background-task-sfn",
|
|
45
45
|
config: {
|
|
46
46
|
roleArn: stepFunctionRole.output.arn,
|
|
47
|
-
definition:
|
|
47
|
+
definition: __rspack_external__pulumi_pulumi_f3e773ed.jsonStringify(createBackgroundTaskDefinition({
|
|
48
48
|
lambdaName: ApiBackgroundTaskLambdaName,
|
|
49
49
|
lambdaArn: backgroundTask.output.arn
|
|
50
50
|
}))
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
const policyToAccessStepFunction = app.addResource(
|
|
53
|
+
const policyToAccessStepFunction = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
54
54
|
name: "background-task-step-function-policy",
|
|
55
55
|
config: {
|
|
56
56
|
policy: {
|
|
@@ -74,21 +74,21 @@ const ApiBackgroundTask = createAppModule({
|
|
|
74
74
|
],
|
|
75
75
|
Effect: "Allow",
|
|
76
76
|
Resource: [
|
|
77
|
-
stepFunction.output.name.apply((name)=>
|
|
77
|
+
stepFunction.output.name.apply((name)=>__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:states:${awsRegion}:${awsAccountId}:execution:${name}:*`)
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
app.addResource(
|
|
84
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
85
85
|
name: "background-task-step-function-policy-attachment-graphql",
|
|
86
86
|
config: {
|
|
87
87
|
policyArn: policyToAccessStepFunction.output.arn,
|
|
88
88
|
role: graphql.role.output.name
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
const eventRole = app.addResource(
|
|
91
|
+
const eventRole = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Role, {
|
|
92
92
|
name: "background-task-event-role",
|
|
93
93
|
config: {
|
|
94
94
|
assumeRolePolicy: {
|
|
@@ -105,7 +105,7 @@ const ApiBackgroundTask = createAppModule({
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
|
-
const eventPolicy = app.addResource(
|
|
108
|
+
const eventPolicy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
109
109
|
name: "background-task-event-policy",
|
|
110
110
|
config: {
|
|
111
111
|
policy: {
|
|
@@ -120,14 +120,14 @@ const ApiBackgroundTask = createAppModule({
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
|
-
const eventRolePolicyAttachment = app.addResource(
|
|
123
|
+
const eventRolePolicyAttachment = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
124
124
|
name: "background-task-event-role-policy-attachment",
|
|
125
125
|
config: {
|
|
126
126
|
role: eventRole.output.name,
|
|
127
127
|
policyArn: eventPolicy.output.arn
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
-
const eventRule = app.addResource(
|
|
130
|
+
const eventRule = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventRule, {
|
|
131
131
|
name: "background-task-event-rule",
|
|
132
132
|
config: {
|
|
133
133
|
eventBusName: core.eventBusName,
|
|
@@ -139,7 +139,7 @@ const ApiBackgroundTask = createAppModule({
|
|
|
139
139
|
})
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
const eventTarget = app.addResource(
|
|
142
|
+
const eventTarget = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventTarget, {
|
|
143
143
|
name: "background-task-event-target",
|
|
144
144
|
config: {
|
|
145
145
|
arn: stepFunction.output.arn,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAppModule } from "@webiny/pulumi";
|
|
2
2
|
import { ApiGateway } from "./ApiGateway.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
4
4
|
const ApiCloudfront = createAppModule({
|
|
5
5
|
name: "ApiCloudfront",
|
|
6
6
|
config (app) {
|
|
@@ -19,7 +19,7 @@ const ApiCloudfront = createAppModule({
|
|
|
19
19
|
"X-Tenant",
|
|
20
20
|
"X-Webiny-Sdk"
|
|
21
21
|
];
|
|
22
|
-
return app.addResource(
|
|
22
|
+
return app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudfront.Distribution, {
|
|
23
23
|
name: "api-cloudfront",
|
|
24
24
|
config: {
|
|
25
25
|
httpVersion: "http2and3",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { getLayerArn } from "@webiny/aws-layers";
|
|
2
2
|
import { createAppModule } from "@webiny/pulumi";
|
|
3
3
|
import { ApiGraphql } from "../index.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
5
5
|
const ApiFileManager = createAppModule({
|
|
6
6
|
name: "ApiFileManager",
|
|
7
7
|
config (app, config) {
|
|
8
8
|
const graphql = app.getModule(ApiGraphql);
|
|
9
9
|
const baseConfig = graphql.functions.graphql.config.clone();
|
|
10
|
-
const download = app.addResource(
|
|
10
|
+
const download = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Function, {
|
|
11
11
|
name: "fm-download",
|
|
12
12
|
config: {
|
|
13
13
|
...baseConfig,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createAppModule } from "@webiny/pulumi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
3
3
|
const ApiGateway = createAppModule({
|
|
4
4
|
name: "ApiGateway",
|
|
5
5
|
config (app, routesConfig) {
|
|
6
|
-
const api = app.addResource(
|
|
6
|
+
const api = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Api, {
|
|
7
7
|
name: "api-gateway",
|
|
8
8
|
config: {
|
|
9
9
|
protocolType: "HTTP",
|
|
10
10
|
description: "Main API gateway"
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
const stage = app.addResource(
|
|
13
|
+
const stage = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Stage, {
|
|
14
14
|
name: "default",
|
|
15
15
|
config: {
|
|
16
16
|
apiId: api.output.id,
|
|
@@ -37,7 +37,7 @@ const ApiGateway = createAppModule({
|
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
function createRoute(app, api, name, params) {
|
|
40
|
-
const integration = app.addResource(
|
|
40
|
+
const integration = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Integration, {
|
|
41
41
|
name: name,
|
|
42
42
|
config: {
|
|
43
43
|
description: "GraphQL API Integration",
|
|
@@ -48,7 +48,7 @@ function createRoute(app, api, name, params) {
|
|
|
48
48
|
passthroughBehavior: "WHEN_NO_MATCH"
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
-
const route = app.addResource(
|
|
51
|
+
const route = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Route, {
|
|
52
52
|
name: name,
|
|
53
53
|
config: {
|
|
54
54
|
apiId: api.id,
|
|
@@ -56,7 +56,7 @@ function createRoute(app, api, name, params) {
|
|
|
56
56
|
target: integration.output.id.apply((value)=>`integrations/${value}`)
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
const permission = app.addResource(
|
|
59
|
+
const permission = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Permission, {
|
|
60
60
|
name: `allow-${name}`,
|
|
61
61
|
config: {
|
|
62
62
|
action: "lambda:InvokeFunction",
|
|
@@ -5,8 +5,8 @@ import { createLambdaRole, getCommonLambdaEnvVariables } from "../lambdaUtils.js
|
|
|
5
5
|
import { CoreOutput, VpcConfig } from "../index.js";
|
|
6
6
|
import { getAwsAccountId, getAwsRegion } from "../awsUtils.js";
|
|
7
7
|
import { LAMBDA_RUNTIME } from "../../constants.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 EMPTY_TRASH_BIN_EVENT_RULE_NAME = "empty-trash-bin-event-rule";
|
|
11
11
|
const EMPTY_TRASH_BIN_EVENT_PERMISSION_NAME = "empty-trash-bin-event-target-permission";
|
|
12
12
|
const EMPTY_TRASH_BIN_EVENT_RULE_TARGET = "empty-trash-bin-event-rule-target";
|
|
@@ -18,7 +18,7 @@ const ApiGraphql = createAppModule({
|
|
|
18
18
|
name: "api-lambda-role",
|
|
19
19
|
policy: policy.output
|
|
20
20
|
});
|
|
21
|
-
const graphql = app.addResource(
|
|
21
|
+
const graphql = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Function, {
|
|
22
22
|
name: "graphql",
|
|
23
23
|
config: {
|
|
24
24
|
description: "Webiny's GraphQL APIs",
|
|
@@ -27,8 +27,8 @@ const ApiGraphql = createAppModule({
|
|
|
27
27
|
role: role.output.arn,
|
|
28
28
|
timeout: 30,
|
|
29
29
|
memorySize: 1024,
|
|
30
|
-
code: new
|
|
31
|
-
".": new
|
|
30
|
+
code: new __rspack_external__pulumi_pulumi_f3e773ed.asset.AssetArchive({
|
|
31
|
+
".": new __rspack_external__pulumi_pulumi_f3e773ed.asset.FileArchive(path.join(app.paths.workspace, "graphql/build"))
|
|
32
32
|
}),
|
|
33
33
|
environment: {
|
|
34
34
|
variables: getCommonLambdaEnvVariables().apply((value)=>({
|
|
@@ -43,14 +43,14 @@ const ApiGraphql = createAppModule({
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
const eventRule = app.addResource(
|
|
46
|
+
const eventRule = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventRule, {
|
|
47
47
|
name: EMPTY_TRASH_BIN_EVENT_RULE_NAME,
|
|
48
48
|
config: {
|
|
49
49
|
description: "Enable us to empty the trash-bin ever day",
|
|
50
50
|
scheduleExpression: "cron(0 3 * * ? *)"
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
app.addResource(
|
|
53
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Permission, {
|
|
54
54
|
name: EMPTY_TRASH_BIN_EVENT_PERMISSION_NAME,
|
|
55
55
|
config: {
|
|
56
56
|
action: "lambda:InvokeFunction",
|
|
@@ -59,7 +59,7 @@ const ApiGraphql = createAppModule({
|
|
|
59
59
|
statementId: "allow-rule-invoke-" + EMPTY_TRASH_BIN_EVENT_RULE_NAME
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
app.addResource(
|
|
62
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventTarget, {
|
|
63
63
|
name: EMPTY_TRASH_BIN_EVENT_RULE_TARGET,
|
|
64
64
|
config: {
|
|
65
65
|
rule: eventRule.output.name,
|
|
@@ -94,11 +94,11 @@ function createGraphqlLambdaPolicy(app) {
|
|
|
94
94
|
const coreOutput = app.getModule(CoreOutput);
|
|
95
95
|
const awsAccountId = getAwsAccountId(app);
|
|
96
96
|
const awsRegion = getAwsRegion(app);
|
|
97
|
-
return app.addResource(
|
|
97
|
+
return app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
98
98
|
name: "ApiGraphqlLambdaPolicy",
|
|
99
99
|
config: {
|
|
100
100
|
description: "This policy enables access to Dynamodb, S3, Lambda and Cognito IDP",
|
|
101
|
-
policy:
|
|
101
|
+
policy: __rspack_external__pulumi_pulumi_f3e773ed.all([
|
|
102
102
|
coreOutput
|
|
103
103
|
]).apply(([core])=>{
|
|
104
104
|
const policy = {
|
|
@@ -182,8 +182,8 @@ function createGraphqlLambdaPolicy(app) {
|
|
|
182
182
|
"s3:GetObject"
|
|
183
183
|
],
|
|
184
184
|
Resource: [
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${core.fileManagerBucketId}`,
|
|
186
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${core.fileManagerBucketId}/*`
|
|
187
187
|
]
|
|
188
188
|
},
|
|
189
189
|
{
|
|
@@ -192,7 +192,7 @@ function createGraphqlLambdaPolicy(app) {
|
|
|
192
192
|
Action: [
|
|
193
193
|
"lambda:InvokeFunction"
|
|
194
194
|
],
|
|
195
|
-
Resource:
|
|
195
|
+
Resource: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:lambda:${awsRegion}:${awsAccountId}:function:*`
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
Sid: "PermissionForCognitoIdp",
|
|
@@ -210,7 +210,7 @@ function createGraphqlLambdaPolicy(app) {
|
|
|
210
210
|
Sid: "PermissionForCloudfront",
|
|
211
211
|
Effect: "Allow",
|
|
212
212
|
Action: "cloudfront:CreateInvalidation",
|
|
213
|
-
Resource:
|
|
213
|
+
Resource: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:cloudfront::${awsAccountId}:distribution/*`
|
|
214
214
|
},
|
|
215
215
|
...core.opensearchDomainArn ? [
|
|
216
216
|
{
|
|
@@ -2,8 +2,8 @@ import { createAppModule } from "@webiny/pulumi";
|
|
|
2
2
|
import { ApiGraphql } from "../index.js";
|
|
3
3
|
import { getAwsAccountId, getAwsRegion } from "../awsUtils.js";
|
|
4
4
|
import kebabCase from "lodash/kebabCase.js";
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
5
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
6
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
7
7
|
const ApiSchedulerBaseName = "scheduler-resolver";
|
|
8
8
|
const createResourceName = (name)=>`${ApiSchedulerBaseName}-${kebabCase(name)}`;
|
|
9
9
|
const ApiScheduler = createAppModule({
|
|
@@ -12,7 +12,7 @@ const ApiScheduler = createAppModule({
|
|
|
12
12
|
const awsRegion = getAwsRegion(app);
|
|
13
13
|
const awsAccountId = getAwsAccountId(app);
|
|
14
14
|
const graphql = app.getModule(ApiGraphql);
|
|
15
|
-
const schedulerResolverInvokeRole = app.addResource(
|
|
15
|
+
const schedulerResolverInvokeRole = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Role, {
|
|
16
16
|
name: createResourceName("invokeRole"),
|
|
17
17
|
config: {
|
|
18
18
|
assumeRolePolicy: JSON.stringify({
|
|
@@ -29,7 +29,7 @@ const ApiScheduler = createAppModule({
|
|
|
29
29
|
})
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
const schedulerResolverInvokeLambdaPolicy = app.addResource(
|
|
32
|
+
const schedulerResolverInvokeLambdaPolicy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicy, {
|
|
33
33
|
name: createResourceName("invokeLambdaPolicy"),
|
|
34
34
|
config: {
|
|
35
35
|
role: schedulerResolverInvokeRole.output.id,
|
|
@@ -47,11 +47,11 @@ const ApiScheduler = createAppModule({
|
|
|
47
47
|
}))
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
const schedulerControlPolicy = app.addResource(
|
|
50
|
+
const schedulerControlPolicy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
51
51
|
name: createResourceName("controlPolicy"),
|
|
52
52
|
config: {
|
|
53
53
|
description: "Allow GraphQL Lambda to manage EventBridge Scheduler",
|
|
54
|
-
policy:
|
|
54
|
+
policy: __rspack_external__pulumi_pulumi_f3e773ed.all([
|
|
55
55
|
schedulerResolverInvokeRole.output.arn,
|
|
56
56
|
awsRegion,
|
|
57
57
|
awsAccountId
|
|
@@ -83,7 +83,7 @@ const ApiScheduler = createAppModule({
|
|
|
83
83
|
}))
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
const schedulerResolverPolicyAttachment = app.addResource(
|
|
86
|
+
const schedulerResolverPolicyAttachment = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
87
87
|
name: createResourceName("graphqlSchedulerPolicyAttachment"),
|
|
88
88
|
config: {
|
|
89
89
|
role: graphql.role.output.name,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { createAppModule } from "@webiny/pulumi";
|
|
2
2
|
import { ApiGraphql } from "../index.js";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
4
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
5
5
|
const ApiWebsocket = createAppModule({
|
|
6
6
|
name: "ApiWebsocket",
|
|
7
7
|
config (app) {
|
|
8
8
|
const graphql = app.getModule(ApiGraphql);
|
|
9
|
-
const websocketApi = app.addResource(
|
|
9
|
+
const websocketApi = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Api, {
|
|
10
10
|
name: "websocket-api",
|
|
11
11
|
config: {
|
|
12
12
|
protocolType: "WEBSOCKET",
|
|
13
13
|
routeSelectionExpression: "$request.body.action"
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
const websocketLambdaPermission = app.addResource(
|
|
16
|
+
const websocketLambdaPermission = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Permission, {
|
|
17
17
|
name: "websocket-api-ws-to-lambda-permission",
|
|
18
18
|
config: {
|
|
19
19
|
action: "lambda:InvokeFunction",
|
|
@@ -22,7 +22,7 @@ const ApiWebsocket = createAppModule({
|
|
|
22
22
|
sourceArn: websocketApi.output.executionArn.apply((arn)=>`${arn}/*`)
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
const lambdaWebsocketPolicy = app.addResource(
|
|
25
|
+
const lambdaWebsocketPolicy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
26
26
|
name: "websocket-api-lambda-policy",
|
|
27
27
|
config: {
|
|
28
28
|
policy: {
|
|
@@ -43,14 +43,14 @@ const ApiWebsocket = createAppModule({
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
const lambdaWebsocketRolePolicyAttachment = app.addResource(
|
|
46
|
+
const lambdaWebsocketRolePolicyAttachment = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
47
47
|
name: "websocket-api-lambda-role-policy-attachment",
|
|
48
48
|
config: {
|
|
49
49
|
policyArn: lambdaWebsocketPolicy.output.arn,
|
|
50
50
|
role: graphql.role.output
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
const websocketApiIntegration = app.addResource(
|
|
53
|
+
const websocketApiIntegration = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Integration, {
|
|
54
54
|
name: "websocket-api-integration",
|
|
55
55
|
config: {
|
|
56
56
|
apiId: websocketApi.output.id,
|
|
@@ -58,7 +58,7 @@ const ApiWebsocket = createAppModule({
|
|
|
58
58
|
integrationUri: graphql.functions.graphql.output.invokeArn
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
|
-
const websocketApiDefaultRoute = app.addResource(
|
|
61
|
+
const websocketApiDefaultRoute = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Route, {
|
|
62
62
|
name: "websocket-api-route-default",
|
|
63
63
|
config: {
|
|
64
64
|
apiId: websocketApi.output.id,
|
|
@@ -66,7 +66,7 @@ const ApiWebsocket = createAppModule({
|
|
|
66
66
|
target: websocketApiIntegration.output.id.apply((value)=>`integrations/${value}`)
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
const websocketApiConnectRoute = app.addResource(
|
|
69
|
+
const websocketApiConnectRoute = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Route, {
|
|
70
70
|
name: "websocket-api-route-connect",
|
|
71
71
|
config: {
|
|
72
72
|
apiId: websocketApi.output.id,
|
|
@@ -78,7 +78,7 @@ const ApiWebsocket = createAppModule({
|
|
|
78
78
|
dependsOn: websocketApiDefaultRoute.output
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
-
const websocketApiDisconnectRoute = app.addResource(
|
|
81
|
+
const websocketApiDisconnectRoute = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Route, {
|
|
82
82
|
name: "websocket-api-route-disconnect",
|
|
83
83
|
config: {
|
|
84
84
|
apiId: websocketApi.output.id,
|
|
@@ -90,15 +90,15 @@ const ApiWebsocket = createAppModule({
|
|
|
90
90
|
dependsOn: websocketApiConnectRoute.output
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
const apiGatewayLoggingRole = app.addResource(
|
|
93
|
+
const apiGatewayLoggingRole = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Role, {
|
|
94
94
|
name: "apiGatewayLoggingRole",
|
|
95
95
|
config: {
|
|
96
|
-
assumeRolePolicy:
|
|
96
|
+
assumeRolePolicy: __rspack_external__pulumi_aws_9e2bee2d.iam.assumeRolePolicyForPrincipal({
|
|
97
97
|
Service: "apigateway.amazonaws.com"
|
|
98
98
|
})
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
|
-
app.addResource(
|
|
101
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicy, {
|
|
102
102
|
name: "apiGatewayLoggingPolicy",
|
|
103
103
|
config: {
|
|
104
104
|
role: apiGatewayLoggingRole.output.id,
|
|
@@ -116,7 +116,7 @@ const ApiWebsocket = createAppModule({
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
const websocketApiStage = app.addResource(
|
|
119
|
+
const websocketApiStage = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Stage, {
|
|
120
120
|
name: "websocket-api-stage",
|
|
121
121
|
config: {
|
|
122
122
|
apiId: websocketApi.output.id,
|
|
@@ -137,7 +137,7 @@ const ApiWebsocket = createAppModule({
|
|
|
137
137
|
websocketLambdaPermission,
|
|
138
138
|
lambdaWebsocketPolicy,
|
|
139
139
|
lambdaWebsocketRolePolicyAttachment,
|
|
140
|
-
websocketApiUrl:
|
|
140
|
+
websocketApiUrl: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`${websocketApi.output.apiEndpoint}/${websocketApiStage.output.name}`
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
2
2
|
const createBackgroundTaskStepFunctionPolicy = (app, params)=>{
|
|
3
3
|
const { name, lambdaFunctionArn } = params;
|
|
4
|
-
return app.addResource(
|
|
4
|
+
return app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
5
5
|
name,
|
|
6
6
|
config: {
|
|
7
7
|
policy: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
2
2
|
const createBackgroundTaskStepFunctionRole = (app, params)=>{
|
|
3
3
|
const { name, policy } = params;
|
|
4
|
-
const role = app.addResource(
|
|
4
|
+
const role = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Role, {
|
|
5
5
|
name,
|
|
6
6
|
config: {
|
|
7
7
|
assumeRolePolicy: {
|
|
@@ -18,7 +18,7 @@ const createBackgroundTaskStepFunctionRole = (app, params)=>{
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
app.addResource(
|
|
21
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
22
22
|
name: `${name}Policy`,
|
|
23
23
|
config: {
|
|
24
24
|
role: role.output,
|
|
@@ -13,7 +13,7 @@ import { apiPulumi } from "../../features/ApiPulumi/index.js";
|
|
|
13
13
|
import { DefaultSetApiCustomDomains } from "../../features/DefaultSetApiCustomDomains.js";
|
|
14
14
|
import { ApiCustomDomains } from "../../extensions/ApiCustomDomains.js";
|
|
15
15
|
import { applyCustomDomain } from "../customDomain.js";
|
|
16
|
-
import * as
|
|
16
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
17
17
|
const createApiPulumiApp = ()=>{
|
|
18
18
|
const baseApp = createPulumiApp({
|
|
19
19
|
name: "api",
|
|
@@ -50,16 +50,16 @@ const createApiPulumiApp = ()=>{
|
|
|
50
50
|
if (useExistingVpc) {
|
|
51
51
|
if (!useExistingVpc.lambdaFunctionsVpcConfig) throw new Error("Cannot specify `useExistingVpc` parameter because the `lambdaFunctionsVpcConfig` parameter wasn't provided.");
|
|
52
52
|
onResource((resource)=>{
|
|
53
|
-
if (isResourceOfType(resource,
|
|
53
|
+
if (isResourceOfType(resource, __rspack_external__pulumi_aws_9e2bee2d.lambda.Function)) {
|
|
54
54
|
const canUseVpc = false !== resource.meta.canUseVpc;
|
|
55
55
|
if (canUseVpc) resource.config.vpcConfig(useExistingVpc.lambdaFunctionsVpcConfig);
|
|
56
56
|
}
|
|
57
|
-
if (isResourceOfType(resource,
|
|
58
|
-
if (resource.meta.isLambdaFunctionRole) addResource(
|
|
57
|
+
if (isResourceOfType(resource, __rspack_external__pulumi_aws_9e2bee2d.iam.Role)) {
|
|
58
|
+
if (resource.meta.isLambdaFunctionRole) addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
59
59
|
name: `${resource.name}-vpc-access-execution-role`,
|
|
60
60
|
config: {
|
|
61
61
|
role: resource.output.name,
|
|
62
|
-
policyArn:
|
|
62
|
+
policyArn: __rspack_external__pulumi_aws_9e2bee2d.iam.ManagedPolicy.AWSLambdaVPCAccessExecutionRole
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -162,7 +162,7 @@ const createApiPulumiApp = ()=>{
|
|
|
162
162
|
}
|
|
163
163
|
app.addOutputs({
|
|
164
164
|
awsAccountId: getAwsAccountId(app),
|
|
165
|
-
region:
|
|
165
|
+
region: __rspack_external__pulumi_aws_9e2bee2d.config.region,
|
|
166
166
|
cognitoUserPoolId: core.cognitoUserPoolId,
|
|
167
167
|
cognitoAppClientId: core.cognitoAppClientId,
|
|
168
168
|
cognitoUserPoolPasswordPolicy: core.cognitoUserPoolPasswordPolicy,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CoreOutput } from "../../index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
3
3
|
const handleGuardDutyEvents = (app)=>{
|
|
4
4
|
const core = app.getModule(CoreOutput);
|
|
5
5
|
const graphql = app.resources.graphql.functions.graphql;
|
|
6
6
|
const baseConfig = graphql.config.clone();
|
|
7
|
-
const threatDetectionHandler = app.addResource(
|
|
7
|
+
const threatDetectionHandler = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Function, {
|
|
8
8
|
name: "fm-threat-detection",
|
|
9
9
|
config: {
|
|
10
10
|
...baseConfig,
|
|
@@ -21,7 +21,7 @@ const handleGuardDutyEvents = (app)=>{
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
const eventRule = app.addResource(
|
|
24
|
+
const eventRule = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventRule, {
|
|
25
25
|
name: "fm-bucket-malware-protection-event-rule",
|
|
26
26
|
config: {
|
|
27
27
|
eventBusName: core.eventBusName,
|
|
@@ -35,7 +35,7 @@ const handleGuardDutyEvents = (app)=>{
|
|
|
35
35
|
})
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
app.addResource(
|
|
38
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.lambda.Permission, {
|
|
39
39
|
name: "fm-bucket-malware-protection-event-permission",
|
|
40
40
|
config: {
|
|
41
41
|
action: "lambda:InvokeFunction",
|
|
@@ -44,7 +44,7 @@ const handleGuardDutyEvents = (app)=>{
|
|
|
44
44
|
sourceArn: eventRule.output.arn
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
app.addResource(
|
|
47
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventTarget, {
|
|
48
48
|
name: "fm-bucket-malware-protection-event-target",
|
|
49
49
|
config: {
|
|
50
50
|
rule: eventRule.output.name,
|
package/pulumi/apps/awsUtils.js
CHANGED
|
@@ -4,12 +4,12 @@ import { getEnvVariableWebinyEnv } from "../env/env.js";
|
|
|
4
4
|
import { getEnvVariableWebinyVariant } from "../env/variant.js";
|
|
5
5
|
import { getProjectSdk } from "@webiny/project";
|
|
6
6
|
import { AwsTags } from "../extensions/AwsTags.js";
|
|
7
|
-
import * as
|
|
7
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
8
8
|
function getAwsAccountId(app) {
|
|
9
|
-
return app.addHandler(()=>
|
|
9
|
+
return app.addHandler(()=>__rspack_external__pulumi_aws_9e2bee2d.getCallerIdentity({}).then((x)=>x.accountId));
|
|
10
10
|
}
|
|
11
11
|
function getAwsRegion(app) {
|
|
12
|
-
return app.addHandler(()=>
|
|
12
|
+
return app.addHandler(()=>__rspack_external__pulumi_aws_9e2bee2d.config.requireRegion());
|
|
13
13
|
}
|
|
14
14
|
async function applyAwsResourceTags(appName) {
|
|
15
15
|
const sdk = await getProjectSdk();
|
|
@@ -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 BlueGreenRouterApiGateway = createAppModule({
|
|
4
4
|
name: "BlueGreenRouterApiGateway",
|
|
5
5
|
config (app, params) {
|
|
6
|
-
const apiGateway = app.addResource(
|
|
6
|
+
const apiGateway = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Api, {
|
|
7
7
|
name: "blueGreenRouterApi",
|
|
8
8
|
opts: {
|
|
9
9
|
protect: params.protect,
|
|
@@ -14,7 +14,7 @@ const BlueGreenRouterApiGateway = createAppModule({
|
|
|
14
14
|
description: "Blue / Green Router API"
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
const apiStage = app.addResource(
|
|
17
|
+
const apiStage = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.apigatewayv2.Stage, {
|
|
18
18
|
name: "blue-green-stage",
|
|
19
19
|
opts: {
|
|
20
20
|
protect: params.protect,
|