@webiny/project-aws 6.4.4-beta.5 → 6.4.4-beta.7
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAwsAccountId, getAwsRegion } from "../awsUtils.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 configureS3BucketMalwareProtection = (app)=>{
|
|
5
5
|
const awsAccountId = getAwsAccountId(app);
|
|
6
6
|
const awsRegion = getAwsRegion(app);
|
|
@@ -16,7 +16,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
16
16
|
"events:ManagedBy": "malware-protection-plan.guardduty.amazonaws.com"
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
const assumeRole =
|
|
19
|
+
const assumeRole = __rspack_external__pulumi_aws_9e2bee2d.iam.getPolicyDocument({
|
|
20
20
|
statements: [
|
|
21
21
|
{
|
|
22
22
|
effect: "Allow",
|
|
@@ -34,13 +34,13 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
});
|
|
37
|
-
const role = app.addResource(
|
|
37
|
+
const role = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Role, {
|
|
38
38
|
name: "fm-bucket-guardduty-role",
|
|
39
39
|
config: {
|
|
40
40
|
assumeRolePolicy: assumeRole.then((assumeRole)=>assumeRole.json)
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
const policy = app.addResource(
|
|
43
|
+
const policy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Policy, {
|
|
44
44
|
name: "fm-bucket-guardduty-role-policy",
|
|
45
45
|
config: {
|
|
46
46
|
description: "This policy enables GuardDuty to interact with the S3 bucket.",
|
|
@@ -54,7 +54,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
54
54
|
"events:PutRule"
|
|
55
55
|
],
|
|
56
56
|
Resource: [
|
|
57
|
-
|
|
57
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:events:${awsRegion}:${awsAccountId}:rule/DO-NOT-DELETE-AmazonGuardDutyMalwareProtectionS3*`
|
|
58
58
|
],
|
|
59
59
|
Condition: {
|
|
60
60
|
...managedByGuardDuty,
|
|
@@ -80,7 +80,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
80
80
|
"events:RemoveTargets"
|
|
81
81
|
],
|
|
82
82
|
Resource: [
|
|
83
|
-
|
|
83
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:events:${awsRegion}:${awsAccountId}:rule/DO-NOT-DELETE-AmazonGuardDutyMalwareProtectionS3*`
|
|
84
84
|
],
|
|
85
85
|
Condition: {
|
|
86
86
|
...managedByGuardDuty
|
|
@@ -94,7 +94,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
94
94
|
"events:ListTargetsByRule"
|
|
95
95
|
],
|
|
96
96
|
Resource: [
|
|
97
|
-
|
|
97
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:events:${awsRegion}:${awsAccountId}:rule/DO-NOT-DELETE-AmazonGuardDutyMalwareProtectionS3*`
|
|
98
98
|
]
|
|
99
99
|
},
|
|
100
100
|
{
|
|
@@ -107,7 +107,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
107
107
|
"s3:PutObjectVersionTagging"
|
|
108
108
|
],
|
|
109
109
|
Resource: [
|
|
110
|
-
|
|
110
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${bucket.bucket}/*`
|
|
111
111
|
],
|
|
112
112
|
Condition: {
|
|
113
113
|
...currentAccount
|
|
@@ -121,7 +121,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
121
121
|
"s3:GetBucketNotification"
|
|
122
122
|
],
|
|
123
123
|
Resource: [
|
|
124
|
-
|
|
124
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${bucket.bucket}`
|
|
125
125
|
],
|
|
126
126
|
Condition: {
|
|
127
127
|
...currentAccount
|
|
@@ -134,7 +134,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
134
134
|
"s3:PutObject"
|
|
135
135
|
],
|
|
136
136
|
Resource: [
|
|
137
|
-
|
|
137
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${bucket.bucket}/malware-protection-resource-validation-object`
|
|
138
138
|
],
|
|
139
139
|
Condition: {
|
|
140
140
|
...currentAccount
|
|
@@ -147,7 +147,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
147
147
|
"s3:ListBucket"
|
|
148
148
|
],
|
|
149
149
|
Resource: [
|
|
150
|
-
|
|
150
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${bucket.bucket}`
|
|
151
151
|
],
|
|
152
152
|
Condition: {
|
|
153
153
|
...currentAccount
|
|
@@ -161,7 +161,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
161
161
|
"s3:GetObjectVersion"
|
|
162
162
|
],
|
|
163
163
|
Resource: [
|
|
164
|
-
|
|
164
|
+
__rspack_external__pulumi_pulumi_f3e773ed.interpolate`arn:aws:s3:::${bucket.bucket}/*`
|
|
165
165
|
],
|
|
166
166
|
Condition: {
|
|
167
167
|
...currentAccount
|
|
@@ -171,14 +171,14 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
-
app.addResource(
|
|
174
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
175
175
|
name: "fm-bucket-malware-protection-role-policy-attachment",
|
|
176
176
|
config: {
|
|
177
177
|
role: role.output.name,
|
|
178
178
|
policyArn: policy.output.arn
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
|
-
app.addResource(
|
|
181
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.guardduty.MalwareProtectionPlan, {
|
|
182
182
|
name: "fm-bucket-malware-protection-plan",
|
|
183
183
|
config: {
|
|
184
184
|
role: role.output.arn,
|
|
@@ -189,7 +189,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
|
-
const eventBridgeRole = app.addResource(
|
|
192
|
+
const eventBridgeRole = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.Role, {
|
|
193
193
|
name: "guard-duty-forward-events-role",
|
|
194
194
|
config: {
|
|
195
195
|
assumeRolePolicy: JSON.stringify({
|
|
@@ -206,11 +206,11 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
206
206
|
})
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
|
-
app.addResource(
|
|
209
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicy, {
|
|
210
210
|
name: "guard-duty-forward-events-policy",
|
|
211
211
|
config: {
|
|
212
212
|
role: eventBridgeRole.output,
|
|
213
|
-
policy:
|
|
213
|
+
policy: __rspack_external__pulumi_pulumi_f3e773ed.output(eventBus.output.arn).apply((arn)=>JSON.stringify({
|
|
214
214
|
Version: "2012-10-17",
|
|
215
215
|
Statement: [
|
|
216
216
|
{
|
|
@@ -222,7 +222,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
222
222
|
}))
|
|
223
223
|
}
|
|
224
224
|
});
|
|
225
|
-
const forwardToCustomBusRule = app.addResource(
|
|
225
|
+
const forwardToCustomBusRule = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventRule, {
|
|
226
226
|
name: "forward-events-from-default-to-custom-bus-rule",
|
|
227
227
|
config: {
|
|
228
228
|
eventBusName: "default",
|
|
@@ -243,7 +243,7 @@ const configureS3BucketMalwareProtection = (app)=>{
|
|
|
243
243
|
}))
|
|
244
244
|
}
|
|
245
245
|
});
|
|
246
|
-
app.addResource(
|
|
246
|
+
app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudwatch.EventTarget, {
|
|
247
247
|
name: "forward-events-from-default-to-custom-bus-target",
|
|
248
248
|
config: {
|
|
249
249
|
rule: forwardToCustomBusRule.output.name,
|
|
@@ -16,9 +16,9 @@ import { getVpcConfigFromExtension } from "../extensions/getVpcConfigFromExtensi
|
|
|
16
16
|
import { applyAwsResourceTags, getAwsRegion } from "../awsUtils.js";
|
|
17
17
|
import { configureS3BucketMalwareProtection } from "./configureS3BucketMalwareProtection.js";
|
|
18
18
|
import { CoreAuditLogsDynamo } from "../../index.js";
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
19
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
20
|
+
import * as __rspack_external__pulumi_random_073a0f72 from "@pulumi/random";
|
|
21
|
+
import * as __rspack_external__pulumi_pulumi_f3e773ed from "@pulumi/pulumi";
|
|
22
22
|
function createCorePulumiApp() {
|
|
23
23
|
const baseApp = createPulumiApp({
|
|
24
24
|
name: "core",
|
|
@@ -30,7 +30,7 @@ function createCorePulumiApp() {
|
|
|
30
30
|
const coreStackOutput = await sdk.getAppStackOutput("core");
|
|
31
31
|
const vpcExtensionsConfig = getVpcConfigFromExtension(projectConfig);
|
|
32
32
|
const opensearchExtensionConfig = getOsConfigFromExtension(projectConfig);
|
|
33
|
-
const deploymentId = new
|
|
33
|
+
const deploymentId = new __rspack_external__pulumi_random_073a0f72.RandomId("deploymentId", {
|
|
34
34
|
byteLength: 8
|
|
35
35
|
});
|
|
36
36
|
let searchEngineType = null;
|
|
@@ -65,21 +65,21 @@ function createCorePulumiApp() {
|
|
|
65
65
|
if (opensearchExtensionConfig) {
|
|
66
66
|
if (!useExistingVpc.openSearchDomainVpcConfig) throw new Error("Cannot specify `useExistingVpc` parameter because the `openSearchDomainVpcConfig` parameter wasn't provided.");
|
|
67
67
|
onResource((resource)=>{
|
|
68
|
-
if (isResourceOfType(resource,
|
|
68
|
+
if (isResourceOfType(resource, __rspack_external__pulumi_aws_9e2bee2d.opensearch.Domain)) resource.config.vpcOptions(useExistingVpc.openSearchDomainVpcConfig);
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
if (!useExistingVpc.lambdaFunctionsVpcConfig) throw new Error("Cannot specify `useExistingVpc` parameter because the `lambdaFunctionsVpcConfig` parameter wasn't provided.");
|
|
72
72
|
onResource((resource)=>{
|
|
73
|
-
if (isResourceOfType(resource,
|
|
73
|
+
if (isResourceOfType(resource, __rspack_external__pulumi_aws_9e2bee2d.lambda.Function)) {
|
|
74
74
|
const canUseVpc = false !== resource.meta.canUseVpc;
|
|
75
75
|
if (canUseVpc) resource.config.vpcConfig(useExistingVpc.lambdaFunctionsVpcConfig);
|
|
76
76
|
}
|
|
77
|
-
if (isResourceOfType(resource,
|
|
78
|
-
if (resource.meta.isLambdaFunctionRole) addResource(
|
|
77
|
+
if (isResourceOfType(resource, __rspack_external__pulumi_aws_9e2bee2d.iam.Role)) {
|
|
78
|
+
if (resource.meta.isLambdaFunctionRole) addResource(__rspack_external__pulumi_aws_9e2bee2d.iam.RolePolicyAttachment, {
|
|
79
79
|
name: `${resource.name}-vpc-access-execution-role`,
|
|
80
80
|
config: {
|
|
81
81
|
role: resource.output.name,
|
|
82
|
-
policyArn:
|
|
82
|
+
policyArn: __rspack_external__pulumi_aws_9e2bee2d.iam.ManagedPolicy.AWSLambdaVPCAccessExecutionRole
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
}
|
|
@@ -89,37 +89,37 @@ function createCorePulumiApp() {
|
|
|
89
89
|
if (useVpcEndpoints) {
|
|
90
90
|
const region = getAwsRegion(app);
|
|
91
91
|
onResource((resource)=>{
|
|
92
|
-
if (isResourceOfType(resource,
|
|
92
|
+
if (isResourceOfType(resource, __rspack_external__pulumi_aws_9e2bee2d.ec2.Vpc)) {
|
|
93
93
|
resource.config.enableDnsSupport(true);
|
|
94
94
|
resource.config.enableDnsHostnames(true);
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
const { vpc, subnets, routeTables } = resources.vpc;
|
|
98
|
-
addResource(
|
|
98
|
+
addResource(__rspack_external__pulumi_aws_9e2bee2d.ec2.VpcEndpoint, {
|
|
99
99
|
name: "vpc-s3-vpc-endpoint",
|
|
100
100
|
config: {
|
|
101
101
|
vpcId: vpc.output.id,
|
|
102
|
-
serviceName:
|
|
102
|
+
serviceName: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`com.amazonaws.${region}.s3`,
|
|
103
103
|
routeTableIds: [
|
|
104
104
|
routeTables.privateSubnets.output.id
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
|
-
addResource(
|
|
108
|
+
addResource(__rspack_external__pulumi_aws_9e2bee2d.ec2.VpcEndpoint, {
|
|
109
109
|
name: "vpc-dynamodb-vpc-endpoint",
|
|
110
110
|
config: {
|
|
111
111
|
vpcId: vpc.output.id,
|
|
112
|
-
serviceName:
|
|
112
|
+
serviceName: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`com.amazonaws.${region}.dynamodb`,
|
|
113
113
|
routeTableIds: [
|
|
114
114
|
routeTables.privateSubnets.output.id
|
|
115
115
|
]
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
|
-
addResource(
|
|
118
|
+
addResource(__rspack_external__pulumi_aws_9e2bee2d.ec2.VpcEndpoint, {
|
|
119
119
|
name: "vpc-sqs-vpc-endpoint",
|
|
120
120
|
config: {
|
|
121
121
|
vpcId: vpc.output.id,
|
|
122
|
-
serviceName:
|
|
122
|
+
serviceName: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`com.amazonaws.${region}.sqs`,
|
|
123
123
|
vpcEndpointType: "Interface",
|
|
124
124
|
privateDnsEnabled: true,
|
|
125
125
|
securityGroupIds: [
|
|
@@ -128,11 +128,11 @@ function createCorePulumiApp() {
|
|
|
128
128
|
subnetIds: subnets.private.map((subNet)=>subNet.output.id)
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
addResource(
|
|
131
|
+
addResource(__rspack_external__pulumi_aws_9e2bee2d.ec2.VpcEndpoint, {
|
|
132
132
|
name: "vpc-events-vpc-endpoint",
|
|
133
133
|
config: {
|
|
134
134
|
vpcId: vpc.output.id,
|
|
135
|
-
serviceName:
|
|
135
|
+
serviceName: __rspack_external__pulumi_pulumi_f3e773ed.interpolate`com.amazonaws.${region}.events`,
|
|
136
136
|
vpcEndpointType: "Interface",
|
|
137
137
|
privateDnsEnabled: true,
|
|
138
138
|
securityGroupIds: [
|
|
@@ -196,7 +196,7 @@ function createCorePulumiApp() {
|
|
|
196
196
|
});
|
|
197
197
|
app.addOutputs({
|
|
198
198
|
deploymentId: deploymentId.hex,
|
|
199
|
-
region:
|
|
199
|
+
region: __rspack_external__pulumi_aws_9e2bee2d.config.region,
|
|
200
200
|
fileManagerBucketId: fileManagerBucket.output.id,
|
|
201
201
|
primaryDynamodbTableArn: dynamoDbTable.output.arn,
|
|
202
202
|
primaryDynamodbTableName: dynamoDbTable.output.name,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ApiOutput } from "./api/index.js";
|
|
2
2
|
import { getEnvVariableAwsRegion } from "../env/awsRegion.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as __rspack_external__pulumi_aws_9e2bee2d from "@pulumi/aws";
|
|
4
4
|
function createPublicAppBucket(app, name) {
|
|
5
|
-
const bucket = app.addResource(
|
|
5
|
+
const bucket = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.s3.Bucket, {
|
|
6
6
|
name: name,
|
|
7
7
|
config: {
|
|
8
8
|
forceDestroy: true,
|
|
@@ -12,7 +12,7 @@ function createPublicAppBucket(app, name) {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
const bucketOwnershipControls = app.addResource(
|
|
15
|
+
const bucketOwnershipControls = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.s3.BucketOwnershipControls, {
|
|
16
16
|
name: `${name}-ownership-controls`,
|
|
17
17
|
config: {
|
|
18
18
|
bucket: bucket.output.id,
|
|
@@ -21,11 +21,11 @@ function createPublicAppBucket(app, name) {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
const bucketAcl = app.addResource(
|
|
24
|
+
const bucketAcl = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.s3.BucketAcl, {
|
|
25
25
|
name: `${name}-acl`,
|
|
26
26
|
config: {
|
|
27
27
|
bucket: bucket.output.id,
|
|
28
|
-
acl:
|
|
28
|
+
acl: __rspack_external__pulumi_aws_9e2bee2d.s3.CannedAcl.PublicRead
|
|
29
29
|
},
|
|
30
30
|
opts: {
|
|
31
31
|
dependsOn: [
|
|
@@ -54,13 +54,13 @@ function createPublicAppBucket(app, name) {
|
|
|
54
54
|
}
|
|
55
55
|
function createPrivateAppBucket(app, name) {
|
|
56
56
|
const api = app.getModule(ApiOutput);
|
|
57
|
-
const bucket = app.addResource(
|
|
57
|
+
const bucket = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.s3.Bucket, {
|
|
58
58
|
name: name,
|
|
59
59
|
config: {
|
|
60
60
|
forceDestroy: true
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
const bucketOwnershipControls = app.addResource(
|
|
63
|
+
const bucketOwnershipControls = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.s3.BucketOwnershipControls, {
|
|
64
64
|
name: `${name}-ownership-controls`,
|
|
65
65
|
config: {
|
|
66
66
|
bucket: bucket.output.id,
|
|
@@ -69,11 +69,11 @@ function createPrivateAppBucket(app, name) {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
const bucketAcl = app.addResource(
|
|
72
|
+
const bucketAcl = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.s3.BucketAcl, {
|
|
73
73
|
name: `${name}-acl`,
|
|
74
74
|
config: {
|
|
75
75
|
bucket: bucket.output.id,
|
|
76
|
-
acl:
|
|
76
|
+
acl: __rspack_external__pulumi_aws_9e2bee2d.s3.CannedAcl.Private
|
|
77
77
|
},
|
|
78
78
|
opts: {
|
|
79
79
|
dependsOn: [
|
|
@@ -81,7 +81,7 @@ function createPrivateAppBucket(app, name) {
|
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
const originIdentity = app.addResource(
|
|
84
|
+
const originIdentity = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.cloudfront.OriginAccessIdentity, {
|
|
85
85
|
name: `${name}-origin-identity`,
|
|
86
86
|
config: {}
|
|
87
87
|
});
|
|
@@ -92,7 +92,7 @@ function createPrivateAppBucket(app, name) {
|
|
|
92
92
|
originAccessIdentity: originIdentity.output.cloudfrontAccessIdentityPath
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
const bucketPublicAccessBlock = app.addResource(
|
|
95
|
+
const bucketPublicAccessBlock = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.s3.BucketPublicAccessBlock, {
|
|
96
96
|
name: `${name}-bucket-block-access`,
|
|
97
97
|
config: {
|
|
98
98
|
bucket: bucket.output.id,
|
|
@@ -102,7 +102,7 @@ function createPrivateAppBucket(app, name) {
|
|
|
102
102
|
restrictPublicBuckets: true
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
|
-
const bucketPolicy = app.addResource(
|
|
105
|
+
const bucketPolicy = app.addResource(__rspack_external__pulumi_aws_9e2bee2d.s3.BucketPolicy, {
|
|
106
106
|
name: `${name}-bucket-policy`,
|
|
107
107
|
config: {
|
|
108
108
|
bucket: bucket.output.bucket,
|
|
@@ -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,
|