@webiny/pulumi-aws 5.37.3-beta.0 → 5.37.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/admin/createAdminPulumiApp.js +1 -3
- package/apps/admin/index.js +1 -3
- package/apps/api/ApiApwScheduler.js +1 -3
- package/apps/api/ApiCloudfront.js +1 -3
- package/apps/api/ApiFileManager.js +1 -3
- package/apps/api/ApiGateway.js +1 -3
- package/apps/api/ApiGraphql.js +1 -3
- package/apps/api/ApiMigration.js +1 -3
- package/apps/api/ApiOutput.js +1 -3
- package/apps/api/ApiPageBuilder.js +1 -3
- package/apps/api/createApiPulumiApp.js +1 -3
- package/apps/api/index.js +1 -3
- package/apps/awsUtils.d.ts +1 -1
- package/apps/awsUtils.js +1 -3
- package/apps/common/CoreOutput.js +1 -3
- package/apps/common/VpcConfig.js +1 -3
- package/apps/common/index.js +1 -3
- package/apps/core/CoreCognito.js +1 -3
- package/apps/core/CoreDynamo.js +1 -3
- package/apps/core/CoreElasticSearch.js +1 -3
- package/apps/core/CoreEventBus.js +1 -3
- package/apps/core/CoreFileManager.js +1 -3
- package/apps/core/CoreVpc.js +1 -3
- package/apps/core/createCorePulumiApp.js +1 -3
- package/apps/core/index.js +1 -3
- package/apps/createAppBucket.js +1 -3
- package/apps/customDomain.js +1 -3
- package/apps/index.js +1 -3
- package/apps/lambdaUtils.js +1 -3
- package/apps/react/createReactPulumiApp.js +1 -3
- package/apps/react/index.js +1 -3
- package/apps/tenantRouter.js +4 -6
- package/apps/tenantRouter.js.map +1 -1
- package/apps/website/WebsitePrerendering.js +1 -3
- package/apps/website/createWebsitePulumiApp.js +1 -3
- package/apps/website/deliveryViewerRequest.js +1 -3
- package/apps/website/index.js +1 -3
- package/components/tenantRouter/WebsiteTenantRouter.js +1 -3
- package/components/tenantRouter/functions/origin/request.js +1 -3
- package/enterprise/createAdminPulumiApp.js +1 -3
- package/enterprise/createApiPulumiApp.js +5 -4
- package/enterprise/createApiPulumiApp.js.map +1 -1
- package/enterprise/createCorePulumiApp.js +5 -4
- package/enterprise/createCorePulumiApp.js.map +1 -1
- package/enterprise/createWebsitePulumiApp.js +5 -4
- package/enterprise/createWebsitePulumiApp.js.map +1 -1
- package/enterprise/index.js +1 -3
- package/index.js +1 -3
- package/package.json +8 -8
- package/utils/addDomainsUrlsOutputs.js +1 -3
- package/utils/crawlDirectory.js +1 -3
- package/utils/getPresignedPost.js +1 -3
- package/utils/index.js +1 -3
- package/utils/lambdaEnvVariables.js +1 -3
- package/utils/storageMigrate.js +1 -3
- package/utils/tagResources.js +1 -3
- package/utils/uploadFolderToS3.js +1 -3
|
@@ -13,6 +13,4 @@ const createAdminPulumiApp = projectAppParams => {
|
|
|
13
13
|
folder: "apps/admin"
|
|
14
14
|
}, projectAppParams));
|
|
15
15
|
};
|
|
16
|
-
exports.createAdminPulumiApp = createAdminPulumiApp;
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=createAdminPulumiApp.js.map
|
|
16
|
+
exports.createAdminPulumiApp = createAdminPulumiApp;
|
package/apps/admin/index.js
CHANGED
package/apps/api/ApiGateway.js
CHANGED
package/apps/api/ApiGraphql.js
CHANGED
package/apps/api/ApiMigration.js
CHANGED
package/apps/api/ApiOutput.js
CHANGED
|
@@ -189,6 +189,4 @@ const createApiPulumiApp = (projectAppParams = {}) => {
|
|
|
189
189
|
});
|
|
190
190
|
return (0, _utils.withCommonLambdaEnvVariables)(app);
|
|
191
191
|
};
|
|
192
|
-
exports.createApiPulumiApp = createApiPulumiApp;
|
|
193
|
-
|
|
194
|
-
//# sourceMappingURL=createApiPulumiApp.js.map
|
|
192
|
+
exports.createApiPulumiApp = createApiPulumiApp;
|
package/apps/api/index.js
CHANGED
package/apps/awsUtils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PulumiApp } from "@webiny/pulumi";
|
|
2
2
|
export declare function getAwsAccountId(app: PulumiApp): import("@pulumi/pulumi").Output<string>;
|
|
3
|
-
export declare function getAwsRegion(app: PulumiApp): import("@pulumi/pulumi").Output<"af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-south-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-3" | "ca-central-1" | "cn-north-1" | "cn-northwest-1" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-south-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "me-central-1" | "me-south-1" | "sa-east-1" | "us-gov-east-1" | "us-gov-west-1" | "us-east-
|
|
3
|
+
export declare function getAwsRegion(app: PulumiApp): import("@pulumi/pulumi").Output<"us-east-1" | "af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-south-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-3" | "ca-central-1" | "cn-north-1" | "cn-northwest-1" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-south-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "me-central-1" | "me-south-1" | "sa-east-1" | "us-gov-east-1" | "us-gov-west-1" | "us-east-2" | "us-west-1" | "us-west-2">;
|
package/apps/awsUtils.js
CHANGED
package/apps/common/VpcConfig.js
CHANGED
package/apps/common/index.js
CHANGED
package/apps/core/CoreCognito.js
CHANGED
package/apps/core/CoreDynamo.js
CHANGED
package/apps/core/CoreVpc.js
CHANGED
package/apps/core/index.js
CHANGED
package/apps/createAppBucket.js
CHANGED
package/apps/customDomain.js
CHANGED
package/apps/index.js
CHANGED
package/apps/lambdaUtils.js
CHANGED
package/apps/react/index.js
CHANGED
package/apps/tenantRouter.js
CHANGED
|
@@ -61,9 +61,6 @@ function applyTenantRouter(app, cloudfront) {
|
|
|
61
61
|
Effect: "Allow"
|
|
62
62
|
}]
|
|
63
63
|
}
|
|
64
|
-
},
|
|
65
|
-
meta: {
|
|
66
|
-
isLambdaFunctionRole: true
|
|
67
64
|
}
|
|
68
65
|
});
|
|
69
66
|
const awsUsEast1 = new aws.Provider("us-east-1", {
|
|
@@ -92,6 +89,9 @@ function applyTenantRouter(app, cloudfront) {
|
|
|
92
89
|
opts: {
|
|
93
90
|
provider: awsUsEast1,
|
|
94
91
|
retainOnDelete: true
|
|
92
|
+
},
|
|
93
|
+
meta: {
|
|
94
|
+
canUseVpc: false
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
cloudfront.config.defaultCacheBehavior(value => {
|
|
@@ -115,6 +115,4 @@ function applyTenantRouter(app, cloudfront) {
|
|
|
115
115
|
return {
|
|
116
116
|
originLambda
|
|
117
117
|
};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
//# sourceMappingURL=tenantRouter.js.map
|
|
118
|
+
}
|
package/apps/tenantRouter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fs","require","pulumi","_interopRequireWildcard","aws","_common","createFunctionArchive","dynamoDbTable","region","handler","readFileSync","__dirname","source","replace","asset","AssetArchive","StringAsset","PREFIX","applyTenantRouter","app","cloudfront","String","process","env","AWS_REGION","core","getModule","CoreOutput","primaryDynamodbTableName","inlinePolicies","all","getCallerIdentity","apply","identity","name","policy","JSON","stringify","Version","Statement","Sid","Effect","Action","Resource","accountId","role","addResource","iam","Role","config","managedPolicyArns","ManagedPolicies","AWSLambdaBasicExecutionRole","assumeRolePolicy","Principal","Principals","LambdaPrincipal","EdgeLambdaPrincipal","
|
|
1
|
+
{"version":3,"names":["_fs","require","pulumi","_interopRequireWildcard","aws","_common","createFunctionArchive","dynamoDbTable","region","handler","readFileSync","__dirname","source","replace","asset","AssetArchive","StringAsset","PREFIX","applyTenantRouter","app","cloudfront","String","process","env","AWS_REGION","core","getModule","CoreOutput","primaryDynamodbTableName","inlinePolicies","all","getCallerIdentity","apply","identity","name","policy","JSON","stringify","Version","Statement","Sid","Effect","Action","Resource","accountId","role","addResource","iam","Role","config","managedPolicyArns","ManagedPolicies","AWSLambdaBasicExecutionRole","assumeRolePolicy","Principal","Principals","LambdaPrincipal","EdgeLambdaPrincipal","awsUsEast1","Provider","originLambda","lambda","Function","publish","runtime","output","arn","timeout","memorySize","code","opts","provider","retainOnDelete","meta","canUseVpc","defaultCacheBehavior","value","_value$forwardedValue","_value$forwardedValue2","_value$forwardedValue3","_objectSpread2","default","forwardedValues","queryString","cookies","forward","headers","lambdaFunctionAssociations","eventType","includeBody","lambdaArn","qualifiedArn"],"sources":["tenantRouter.ts"],"sourcesContent":["import { readFileSync } from \"fs\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport { PulumiApp, PulumiAppResource } from \"@webiny/pulumi\";\nimport { CoreOutput } from \"./common\";\n\ninterface Params {\n region: string;\n dynamoDbTable: string;\n}\n\nfunction createFunctionArchive({ dynamoDbTable, region }: Params) {\n const handler = readFileSync(\n __dirname + \"/../components/tenantRouter/functions/origin/request.js\",\n \"utf-8\"\n );\n\n const source = handler\n .replace(\"{DB_TABLE_NAME}\", dynamoDbTable)\n .replace(\"{DB_TABLE_REGION}\", region);\n\n return new pulumi.asset.AssetArchive({\n \"index.js\": new pulumi.asset.StringAsset(source)\n });\n}\n\nconst PREFIX = \"website-router\";\n\nexport function applyTenantRouter(\n app: PulumiApp,\n cloudfront: PulumiAppResource<typeof aws.cloudfront.Distribution>\n) {\n const region = String(process.env.AWS_REGION);\n\n // Get Core app output\n const core = app.getModule(CoreOutput);\n\n // `primaryDynamodbTableName` is a string, hence the type cast here.\n const dynamoDbTable = core.primaryDynamodbTableName;\n\n // Because of JSON.stringify, we need to resolve promises upfront.\n const inlinePolicies = pulumi\n .all([aws.getCallerIdentity({}), dynamoDbTable])\n .apply(([identity, dynamoDbTable]) => [\n {\n name: \"tenant-router-policy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Sid: \"PermissionForDynamodb\",\n Effect: \"Allow\",\n Action: [\"dynamodb:GetItem\", \"dynamodb:Query\"],\n Resource: [\n `arn:aws:dynamodb:${region}:${identity.accountId}:table/${dynamoDbTable}`,\n `arn:aws:dynamodb:${region}:${identity.accountId}:table/${dynamoDbTable}/*`\n ]\n }\n ]\n })\n }\n ]);\n\n const role = app.addResource(aws.iam.Role, {\n name: `${PREFIX}-role`,\n config: {\n inlinePolicies,\n managedPolicyArns: [aws.iam.ManagedPolicies.AWSLambdaBasicExecutionRole],\n assumeRolePolicy: {\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: \"sts:AssumeRole\",\n Principal: aws.iam.Principals.LambdaPrincipal,\n Effect: \"Allow\"\n },\n {\n Action: \"sts:AssumeRole\",\n Principal: aws.iam.Principals.EdgeLambdaPrincipal,\n Effect: \"Allow\"\n }\n ]\n }\n }\n });\n\n const awsUsEast1 = new aws.Provider(\"us-east-1\", { region: \"us-east-1\" });\n\n const originLambda = app.addResource(aws.lambda.Function, {\n name: `${PREFIX}-origin-request`,\n config: {\n publish: true,\n runtime: \"nodejs14.x\",\n handler: \"index.handler\",\n role: role.output.arn,\n timeout: 5,\n memorySize: 128,\n code: dynamoDbTable.apply(dynamoDbTable => {\n return createFunctionArchive({\n region,\n dynamoDbTable\n });\n })\n },\n // With the `retainOnDelete` option set to `true`, the Lambda function will not be deleted when\n // the environment is destroyed. Users need to delete the function manually. We decided to use\n // this option here because it enables us to avoid annoying AWS Lambda function replication\n // errors upon destroying the stack (see https://github.com/pulumi/pulumi-aws/issues/2178).\n opts: { provider: awsUsEast1, retainOnDelete: true },\n meta: {\n canUseVpc: false\n }\n });\n\n cloudfront.config.defaultCacheBehavior(value => {\n return {\n ...value,\n // We need to forward the `Host` header so the Lambda@Edge knows what custom domain was requested.\n forwardedValues: {\n ...value.forwardedValues,\n queryString: value.forwardedValues?.queryString || false,\n cookies: value.forwardedValues?.cookies || { forward: \"none\" },\n headers: [...(value.forwardedValues?.headers || []), \"Host\"]\n },\n lambdaFunctionAssociations: [\n ...(value.lambdaFunctionAssociations || []),\n {\n eventType: \"origin-request\",\n includeBody: false,\n lambdaArn: originLambda.output.qualifiedArn\n }\n ]\n };\n });\n\n return { originLambda };\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAD,uBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAOA,SAASK,qBAAqBA,CAAC;EAAEC,aAAa;EAAEC;AAAe,CAAC,EAAE;EAC9D,MAAMC,OAAO,GAAG,IAAAC,gBAAY,EACxBC,SAAS,GAAG,yDAAyD,EACrE,OACJ,CAAC;EAED,MAAMC,MAAM,GAAGH,OAAO,CACjBI,OAAO,CAAC,iBAAiB,EAAEN,aAAa,CAAC,CACzCM,OAAO,CAAC,mBAAmB,EAAEL,MAAM,CAAC;EAEzC,OAAO,IAAIN,MAAM,CAACY,KAAK,CAACC,YAAY,CAAC;IACjC,UAAU,EAAE,IAAIb,MAAM,CAACY,KAAK,CAACE,WAAW,CAACJ,MAAM;EACnD,CAAC,CAAC;AACN;AAEA,MAAMK,MAAM,GAAG,gBAAgB;AAExB,SAASC,iBAAiBA,CAC7BC,GAAc,EACdC,UAAiE,EACnE;EACE,MAAMZ,MAAM,GAAGa,MAAM,CAACC,OAAO,CAACC,GAAG,CAACC,UAAU,CAAC;;EAE7C;EACA,MAAMC,IAAI,GAAGN,GAAG,CAACO,SAAS,CAACC,kBAAU,CAAC;;EAEtC;EACA,MAAMpB,aAAa,GAAGkB,IAAI,CAACG,wBAAwB;;EAEnD;EACA,MAAMC,cAAc,GAAG3B,MAAM,CACxB4B,GAAG,CAAC,CAAC1B,GAAG,CAAC2B,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAExB,aAAa,CAAC,CAAC,CAC/CyB,KAAK,CAAC,CAAC,CAACC,QAAQ,EAAE1B,aAAa,CAAC,KAAK,CAClC;IACI2B,IAAI,EAAE,sBAAsB;I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ACDC,0BAA0B,EAAE,CACxB,IAAIX,KAAK,CAACW,0BAA0B,IAAI,EAAE,CAAC,EAC3C;QACIC,SAAS,EAAE,gBAAgB;QAC3BC,WAAW,EAAE,KAAK;QAClBC,SAAS,EAAE9B,YAAY,CAACK,MAAM,CAAC0B;MACnC,CAAC;IACJ;EAET,CAAC,CAAC;EAEF,OAAO;IAAE/B;EAAa,CAAC;AAC3B"}
|
|
@@ -258,6 +258,4 @@ const createWebsitePulumiApp = (projectAppParams = {}) => {
|
|
|
258
258
|
});
|
|
259
259
|
return (0, _utils.withCommonLambdaEnvVariables)(app);
|
|
260
260
|
};
|
|
261
|
-
exports.createWebsitePulumiApp = createWebsitePulumiApp;
|
|
262
|
-
|
|
263
|
-
//# sourceMappingURL=createWebsitePulumiApp.js.map
|
|
261
|
+
exports.createWebsitePulumiApp = createWebsitePulumiApp;
|
package/apps/website/index.js
CHANGED
|
@@ -21,6 +21,4 @@ Object.defineProperty(exports, "createAdminPulumiApp", {
|
|
|
21
21
|
return _createAdminPulumiApp.createAdminPulumiApp;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
var _createAdminPulumiApp = require("../apps/admin/createAdminPulumiApp");
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=createAdminPulumiApp.js.map
|
|
24
|
+
var _createAdminPulumiApp = require("../apps/admin/createAdminPulumiApp");
|
|
@@ -48,7 +48,10 @@ function createApiPulumiApp(projectAppParams = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
onResource(resource => {
|
|
50
50
|
if ((0, _pulumi.isResourceOfType)(resource, aws.lambda.Function)) {
|
|
51
|
-
resource.
|
|
51
|
+
const canUseVpc = resource.meta.canUseVpc !== false;
|
|
52
|
+
if (canUseVpc) {
|
|
53
|
+
resource.config.vpcConfig(useExistingVpc.lambdaFunctionsVpcConfig);
|
|
54
|
+
}
|
|
52
55
|
}
|
|
53
56
|
if ((0, _pulumi.isResourceOfType)(resource, aws.iam.Role)) {
|
|
54
57
|
if (resource.meta.isLambdaFunctionRole) {
|
|
@@ -66,6 +69,4 @@ function createApiPulumiApp(projectAppParams = {}) {
|
|
|
66
69
|
return (_projectAppParams$pul2 = projectAppParams.pulumi) === null || _projectAppParams$pul2 === void 0 ? void 0 : _projectAppParams$pul2.call(projectAppParams, ...args);
|
|
67
70
|
}
|
|
68
71
|
}));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
//# sourceMappingURL=createApiPulumiApp.js.map
|
|
72
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["aws","_interopRequireWildcard","require","_createApiPulumiApp","_pulumi","createApiPulumiApp","projectAppParams","baseCreateApiPulumiApp","_objectSpread2","default","vpc","getParam","usingAdvancedVpcParams","useExistingVpc","Boolean","pulumi","args","_projectAppParams$pul2","_projectAppParams$pul","call","onResource","addResource","lambdaFunctionsVpcConfig","Error","resource","isResourceOfType","lambda","Function","config","vpcConfig","iam","Role","
|
|
1
|
+
{"version":3,"names":["aws","_interopRequireWildcard","require","_createApiPulumiApp","_pulumi","createApiPulumiApp","projectAppParams","baseCreateApiPulumiApp","_objectSpread2","default","vpc","getParam","usingAdvancedVpcParams","useExistingVpc","Boolean","pulumi","args","_projectAppParams$pul2","_projectAppParams$pul","call","onResource","addResource","lambdaFunctionsVpcConfig","Error","resource","isResourceOfType","lambda","Function","canUseVpc","meta","config","vpcConfig","iam","Role","isLambdaFunctionRole","RolePolicyAttachment","name","role","output","policyArn","ManagedPolicy","AWSLambdaVPCAccessExecutionRole"],"sources":["createApiPulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport {\n createApiPulumiApp as baseCreateApiPulumiApp,\n CreateApiPulumiAppParams as BaseCreateApiPulumiAppParams\n} from \"~/apps/api/createApiPulumiApp\";\nimport { isResourceOfType, PulumiAppParam } from \"@webiny/pulumi\";\n\nexport type ApiPulumiApp = ReturnType<typeof createApiPulumiApp>;\n\nexport type ApiPulumiAppAdvancedVpcParams = Partial<{\n useExistingVpc: {\n lambdaFunctionsVpcConfig: aws.types.input.lambda.FunctionVpcConfig;\n };\n}>;\n\nexport interface CreateApiPulumiAppParams extends Omit<BaseCreateApiPulumiAppParams, \"vpc\"> {\n vpc?: PulumiAppParam<boolean | ApiPulumiAppAdvancedVpcParams>;\n}\n\nexport function createApiPulumiApp(projectAppParams: CreateApiPulumiAppParams = {}) {\n return baseCreateApiPulumiApp({\n ...projectAppParams,\n // If using existing VPC, we ensure `vpc` param is set to `false`.\n vpc: ({ getParam }) => {\n const vpc = getParam(projectAppParams.vpc);\n const usingAdvancedVpcParams = vpc && typeof vpc !== \"boolean\";\n return usingAdvancedVpcParams && vpc.useExistingVpc ? false : Boolean(vpc);\n },\n pulumi(...args) {\n const [{ getParam }] = args;\n const vpc = getParam(projectAppParams.vpc);\n const usingAdvancedVpcParams = vpc && typeof vpc !== \"boolean\";\n\n // Not using advanced VPC params? Then immediately exit.\n if (!usingAdvancedVpcParams) {\n return projectAppParams.pulumi?.(...args);\n }\n\n const [{ onResource, addResource }] = args;\n const { useExistingVpc } = vpc;\n\n // 1. We first deal with \"existing VPC\" setup.\n if (useExistingVpc) {\n if (!useExistingVpc.lambdaFunctionsVpcConfig) {\n throw new Error(\n \"Cannot specify `useExistingVpc` parameter because the `lambdaFunctionsVpcConfig` parameter wasn't provided.\"\n );\n }\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.lambda.Function)) {\n const canUseVpc = resource.meta.canUseVpc !== false;\n if (canUseVpc) {\n resource.config.vpcConfig(useExistingVpc!.lambdaFunctionsVpcConfig);\n }\n }\n\n if (isResourceOfType(resource, aws.iam.Role)) {\n if (resource.meta.isLambdaFunctionRole) {\n addResource(aws.iam.RolePolicyAttachment, {\n name: `${resource.name}-vpc-access-execution-role`,\n config: {\n role: resource.output.name,\n policyArn: aws.iam.ManagedPolicy.AWSLambdaVPCAccessExecutionRole\n }\n });\n }\n }\n });\n }\n\n return projectAppParams.pulumi?.(...args);\n }\n });\n}\n"],"mappings":";;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IC,KAAK,CACX,6GACJ,CAAC;QACL;QAEAH,UAAU,CAACI,QAAQ,IAAI;UACnB,IAAI,IAAAC,wBAAgB,EAACD,QAAQ,EAAExB,GAAG,CAAC0B,MAAM,CAACC,QAAQ,CAAC,EAAE;YACjD,MAAMC,SAAS,GAAGJ,QAAQ,CAACK,IAAI,CAACD,SAAS,KAAK,KAAK;YACnD,IAAIA,SAAS,EAAE;cACXJ,QAAQ,CAACM,MAAM,CAACC,SAAS,CAAClB,cAAc,CAAES,wBAAwB,CAAC;YACvE;UACJ;UAEA,IAAI,IAAAG,wBAAgB,EAACD,QAAQ,EAAExB,GAAG,CAACgC,GAAG,CAACC,IAAI,CAAC,EAAE;YAC1C,IAAIT,QAAQ,CAACK,IAAI,CAACK,oBAAoB,EAAE;cACpCb,WAAW,CAACrB,GAAG,CAACgC,GAAG,CAACG,oBAAoB,EAAE;gBACtCC,IAAI,EAAG,GAAEZ,QAAQ,CAACY,IAAK,4BAA2B;gBAClDN,MAAM,EAAE;kBACJO,IAAI,EAAEb,QAAQ,CAACc,MAAM,CAACF,IAAI;kBAC1BG,SAAS,EAAEvC,GAAG,CAACgC,GAAG,CAACQ,aAAa,CAACC;gBACrC;cACJ,CAAC,CAAC;YACN;UACJ;QACJ,CAAC,CAAC;MACN;MAEA,QAAAxB,sBAAA,GAAOX,gBAAgB,CAACS,MAAM,cAAAE,sBAAA,uBAAvBA,sBAAA,CAAAE,IAAA,CAAAb,gBAAgB,EAAU,GAAGU,IAAI,CAAC;IAC7C;EAAC,EACJ,CAAC;AACN"}
|
|
@@ -67,7 +67,10 @@ function createCorePulumiApp(projectAppParams = {}) {
|
|
|
67
67
|
}
|
|
68
68
|
onResource(resource => {
|
|
69
69
|
if ((0, _pulumi2.isResourceOfType)(resource, aws.lambda.Function)) {
|
|
70
|
-
resource.
|
|
70
|
+
const canUseVpc = resource.meta.canUseVpc !== false;
|
|
71
|
+
if (canUseVpc) {
|
|
72
|
+
resource.config.vpcConfig(useExistingVpc.lambdaFunctionsVpcConfig);
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
if ((0, _pulumi2.isResourceOfType)(resource, aws.iam.Role)) {
|
|
73
76
|
if (resource.meta.isLambdaFunctionRole) {
|
|
@@ -140,6 +143,4 @@ function createCorePulumiApp(projectAppParams = {}) {
|
|
|
140
143
|
return (_projectAppParams$pul3 = projectAppParams.pulumi) === null || _projectAppParams$pul3 === void 0 ? void 0 : _projectAppParams$pul3.call(projectAppParams, ...args);
|
|
141
144
|
}
|
|
142
145
|
}));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
//# sourceMappingURL=createCorePulumiApp.js.map
|
|
146
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["aws","_interopRequireWildcard","require","pulumi","_createCorePulumiApp","_pulumi2","_awsUtils","createCorePulumiApp","projectAppParams","baseCreateCorePulumiApp","_objectSpread2","default","vpc","getParam","usingAdvancedVpcParams","useExistingVpc","Boolean","args","_projectAppParams$pul3","app","_projectAppParams$pul","call","resources","addResource","onResource","useVpcEndpoints","_projectAppParams$pul2","Error","elasticSearch","elasticSearchDomainVpcConfig","resource","isResourceOfType","elasticsearch","Domain","config","vpcOptions","lambdaFunctionsVpcConfig","lambda","Function","vpcConfig","iam","Role","meta","isLambdaFunctionRole","RolePolicyAttachment","name","role","output","policyArn","ManagedPolicy","AWSLambdaVPCAccessExecutionRole","region","getAwsRegion","ec2","Vpc","enableDnsSupport","enableDnsHostnames","subnets","routeTables","VpcEndpoint","vpcId","id","serviceName","interpolate","routeTableIds","privateSubnets","vpcEndpointType","privateDnsEnabled","securityGroupIds","defaultSecurityGroupId","subnetIds","private","map","subNet"],"sources":["createCorePulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport {\n createCorePulumiApp as baseCreateCorePulumiApp,\n CreateCorePulumiAppParams as BaseCreateCorePulumiAppParams\n} from \"~/apps/core/createCorePulumiApp\";\nimport { isResourceOfType, PulumiAppParam } from \"@webiny/pulumi\";\nimport { getAwsRegion } from \"~/apps/awsUtils\";\n\nexport type CorePulumiApp = ReturnType<typeof createCorePulumiApp>;\n\nexport type CorePulumiAppAdvancedVpcParams = Partial<{\n useVpcEndpoints: boolean;\n useExistingVpc: {\n elasticSearchDomainVpcConfig?: aws.types.input.elasticsearch.DomainVpcOptions;\n lambdaFunctionsVpcConfig: aws.types.input.lambda.FunctionVpcConfig;\n };\n}>;\n\nexport interface CreateCorePulumiAppParams extends Omit<BaseCreateCorePulumiAppParams, \"vpc\"> {\n vpc?: PulumiAppParam<boolean | CorePulumiAppAdvancedVpcParams>;\n}\n\nexport function createCorePulumiApp(projectAppParams: CreateCorePulumiAppParams = {}) {\n return baseCreateCorePulumiApp({\n ...projectAppParams,\n // If using existing VPC, we ensure `vpc` param is set to `false`.\n vpc: ({ getParam }) => {\n const vpc = getParam(projectAppParams.vpc);\n const usingAdvancedVpcParams = vpc && typeof vpc !== \"boolean\";\n return usingAdvancedVpcParams && vpc.useExistingVpc ? false : Boolean(vpc);\n },\n pulumi(...args) {\n const [app] = args;\n const { getParam } = app;\n const vpc = getParam(projectAppParams.vpc);\n const usingAdvancedVpcParams = vpc && typeof vpc !== \"boolean\";\n\n // Not using advanced VPC params? Then immediately exit.\n if (!usingAdvancedVpcParams) {\n return projectAppParams.pulumi?.(...args);\n }\n\n const [{ resources, addResource, onResource }] = args;\n const { useExistingVpc, useVpcEndpoints } = vpc;\n\n // 1. We first deal with \"existing VPC\" setup.\n if (useExistingVpc) {\n if (\"useVpcEndpoints\" in vpc) {\n throw new Error(\n \"Cannot specify `useVpcEndpoints` parameter when using an existing VPC. The VPC endpoints configurations should be already defined within the existing VPC.\"\n );\n }\n\n if (projectAppParams.elasticSearch) {\n if (!useExistingVpc.elasticSearchDomainVpcConfig) {\n throw new Error(\n \"Cannot specify `useExistingVpc` parameter because the `elasticSearchDomainVpcConfig` parameter wasn't provided.\"\n );\n }\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.elasticsearch.Domain)) {\n resource.config.vpcOptions(\n useExistingVpc!.elasticSearchDomainVpcConfig\n );\n }\n });\n }\n\n if (!useExistingVpc.lambdaFunctionsVpcConfig) {\n throw new Error(\n \"Cannot specify `useExistingVpc` parameter because the `lambdaFunctionsVpcConfig` parameter wasn't provided.\"\n );\n }\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.lambda.Function)) {\n resource.config.vpcConfig(useExistingVpc!.lambdaFunctionsVpcConfig);\n }\n\n if (isResourceOfType(resource, aws.iam.Role)) {\n if (resource.meta.isLambdaFunctionRole) {\n addResource(aws.iam.RolePolicyAttachment, {\n name: `${resource.name}-vpc-access-execution-role`,\n config: {\n role: resource.output.name,\n policyArn: aws.iam.ManagedPolicy.AWSLambdaVPCAccessExecutionRole\n }\n });\n }\n }\n });\n\n return projectAppParams.pulumi?.(...args);\n }\n\n // 2. Now we deal with \"non-existing VPC\" setup.\n if (useVpcEndpoints) {\n const region = getAwsRegion(app);\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.ec2.Vpc)) {\n resource.config.enableDnsSupport(true);\n resource.config.enableDnsHostnames(true);\n }\n });\n\n const { vpc, subnets, routeTables } = resources.vpc!;\n addResource(aws.ec2.VpcEndpoint, {\n name: \"vpc-s3-vpc-endpoint\",\n config: {\n vpcId: vpc.output.id,\n serviceName: pulumi.interpolate`com.amazonaws.${region}.s3`,\n routeTableIds: [routeTables.privateSubnets.output.id]\n }\n });\n\n addResource(aws.ec2.VpcEndpoint, {\n name: \"vpc-dynamodb-vpc-endpoint\",\n config: {\n vpcId: vpc.output.id,\n serviceName: pulumi.interpolate`com.amazonaws.${region}.dynamodb`,\n routeTableIds: [routeTables.privateSubnets.output.id]\n }\n });\n\n addResource(aws.ec2.VpcEndpoint, {\n name: \"vpc-sqs-vpc-endpoint\",\n config: {\n vpcId: vpc.output.id,\n serviceName: pulumi.interpolate`com.amazonaws.${region}.sqs`,\n vpcEndpointType: \"Interface\",\n privateDnsEnabled: true,\n securityGroupIds: [vpc.output.defaultSecurityGroupId],\n subnetIds: subnets.private.map(subNet => subNet.output.id)\n }\n });\n\n addResource(aws.ec2.VpcEndpoint, {\n name: \"vpc-events-vpc-endpoint\",\n config: {\n vpcId: vpc.output.id,\n serviceName: pulumi.interpolate`com.amazonaws.${region}.events`,\n vpcEndpointType: \"Interface\",\n privateDnsEnabled: true,\n securityGroupIds: [vpc.output.defaultSecurityGroupId],\n subnetIds: subnets.private.map(subNet => subNet.output.id)\n }\n });\n }\n\n return projectAppParams.pulumi?.(...args);\n }\n });\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AAIA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAgBO,SAASK,mBAAmBA,CAACC,gBAA2C,GAAG,CAAC,CAAC,EAAE;EAClF,OAAO,IAAAC,wCAAuB,MAAAC,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MACvBH,gBAAgB;IACnB;IACAI,GAAG,EAAEA,CAAC;MAAEC;IAAS,CAAC,KAAK;MACnB,MAAMD,GAAG,GAAGC,QAAQ,CAACL,gBAAgB,CAACI,GAAG,CAAC;MAC1C,MAAME,sBAAsB,GAAGF,GAAG,IAAI,OAAOA,GAAG,KAAK,SAAS;MAC9D,OAAOE,sBAAsB,IAAIF,GAAG,CAACG,cAAc,GAAG,KAAK,GAAGC,OAAO,CAACJ,GAAG,CAAC;IAC9E,CAAC;IACDT,MAAMA,CAAC,GAAGc,IAAI,EAAE;MAAA,IAAAC,sBAAA;MACZ,MAAM,CAACC,GAAG,CAAC,GAAGF,IAAI;MAClB,MAAM;QAAEJ;MAAS,CAAC,GAAGM,GAAG;MACxB,MAAMP,GAAG,GAAGC,QAAQ,CAACL,gBAAgB,CAAC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AAgB,EAAE,CAACxD,GAAG,CAACmC,MAAM,CAACsB,sBAAsB,CAAC;YACrDC,SAAS,EAAEb,OAAO,CAACc,OAAO,CAACC,GAAG,CAACC,MAAM,IAAIA,MAAM,CAAC1B,MAAM,CAACc,EAAE;UAC7D;QACJ,CAAC,CAAC;MACN;MAEA,QAAA3C,sBAAA,GAAOV,gBAAgB,CAACL,MAAM,cAAAe,sBAAA,uBAAvBA,sBAAA,CAAAG,IAAA,CAAAb,gBAAgB,EAAU,GAAGS,IAAI,CAAC;IAC7C;EAAC,EACJ,CAAC;AACN"}
|
|
1
|
+
{"version":3,"names":["aws","_interopRequireWildcard","require","pulumi","_createCorePulumiApp","_pulumi2","_awsUtils","createCorePulumiApp","projectAppParams","baseCreateCorePulumiApp","_objectSpread2","default","vpc","getParam","usingAdvancedVpcParams","useExistingVpc","Boolean","args","_projectAppParams$pul3","app","_projectAppParams$pul","call","resources","addResource","onResource","useVpcEndpoints","_projectAppParams$pul2","Error","elasticSearch","elasticSearchDomainVpcConfig","resource","isResourceOfType","elasticsearch","Domain","config","vpcOptions","lambdaFunctionsVpcConfig","lambda","Function","canUseVpc","meta","vpcConfig","iam","Role","isLambdaFunctionRole","RolePolicyAttachment","name","role","output","policyArn","ManagedPolicy","AWSLambdaVPCAccessExecutionRole","region","getAwsRegion","ec2","Vpc","enableDnsSupport","enableDnsHostnames","subnets","routeTables","VpcEndpoint","vpcId","id","serviceName","interpolate","routeTableIds","privateSubnets","vpcEndpointType","privateDnsEnabled","securityGroupIds","defaultSecurityGroupId","subnetIds","private","map","subNet"],"sources":["createCorePulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport {\n createCorePulumiApp as baseCreateCorePulumiApp,\n CreateCorePulumiAppParams as BaseCreateCorePulumiAppParams\n} from \"~/apps/core/createCorePulumiApp\";\nimport { isResourceOfType, PulumiAppParam } from \"@webiny/pulumi\";\nimport { getAwsRegion } from \"~/apps/awsUtils\";\n\nexport type CorePulumiApp = ReturnType<typeof createCorePulumiApp>;\n\nexport type CorePulumiAppAdvancedVpcParams = Partial<{\n useVpcEndpoints: boolean;\n useExistingVpc: {\n elasticSearchDomainVpcConfig?: aws.types.input.elasticsearch.DomainVpcOptions;\n lambdaFunctionsVpcConfig: aws.types.input.lambda.FunctionVpcConfig;\n };\n}>;\n\nexport interface CreateCorePulumiAppParams extends Omit<BaseCreateCorePulumiAppParams, \"vpc\"> {\n vpc?: PulumiAppParam<boolean | CorePulumiAppAdvancedVpcParams>;\n}\n\nexport function createCorePulumiApp(projectAppParams: CreateCorePulumiAppParams = {}) {\n return baseCreateCorePulumiApp({\n ...projectAppParams,\n // If using existing VPC, we ensure `vpc` param is set to `false`.\n vpc: ({ getParam }) => {\n const vpc = getParam(projectAppParams.vpc);\n const usingAdvancedVpcParams = vpc && typeof vpc !== \"boolean\";\n return usingAdvancedVpcParams && vpc.useExistingVpc ? false : Boolean(vpc);\n },\n pulumi(...args) {\n const [app] = args;\n const { getParam } = app;\n const vpc = getParam(projectAppParams.vpc);\n const usingAdvancedVpcParams = vpc && typeof vpc !== \"boolean\";\n\n // Not using advanced VPC params? Then immediately exit.\n if (!usingAdvancedVpcParams) {\n return projectAppParams.pulumi?.(...args);\n }\n\n const [{ resources, addResource, onResource }] = args;\n const { useExistingVpc, useVpcEndpoints } = vpc;\n\n // 1. We first deal with \"existing VPC\" setup.\n if (useExistingVpc) {\n if (\"useVpcEndpoints\" in vpc) {\n throw new Error(\n \"Cannot specify `useVpcEndpoints` parameter when using an existing VPC. The VPC endpoints configurations should be already defined within the existing VPC.\"\n );\n }\n\n if (projectAppParams.elasticSearch) {\n if (!useExistingVpc.elasticSearchDomainVpcConfig) {\n throw new Error(\n \"Cannot specify `useExistingVpc` parameter because the `elasticSearchDomainVpcConfig` parameter wasn't provided.\"\n );\n }\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.elasticsearch.Domain)) {\n resource.config.vpcOptions(\n useExistingVpc!.elasticSearchDomainVpcConfig\n );\n }\n });\n }\n\n if (!useExistingVpc.lambdaFunctionsVpcConfig) {\n throw new Error(\n \"Cannot specify `useExistingVpc` parameter because the `lambdaFunctionsVpcConfig` parameter wasn't provided.\"\n );\n }\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.lambda.Function)) {\n const canUseVpc = resource.meta.canUseVpc !== false;\n if (canUseVpc) {\n resource.config.vpcConfig(useExistingVpc!.lambdaFunctionsVpcConfig);\n }\n }\n\n if (isResourceOfType(resource, aws.iam.Role)) {\n if (resource.meta.isLambdaFunctionRole) {\n addResource(aws.iam.RolePolicyAttachment, {\n name: `${resource.name}-vpc-access-execution-role`,\n config: {\n role: resource.output.name,\n policyArn: aws.iam.ManagedPolicy.AWSLambdaVPCAccessExecutionRole\n }\n });\n }\n }\n });\n\n return projectAppParams.pulumi?.(...args);\n }\n\n // 2. Now we deal with \"non-existing VPC\" setup.\n if (useVpcEndpoints) {\n const region = getAwsRegion(app);\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.ec2.Vpc)) {\n resource.config.enableDnsSupport(true);\n resource.config.enableDnsHostnames(true);\n }\n });\n\n const { vpc, subnets, routeTables } = resources.vpc!;\n addResource(aws.ec2.VpcEndpoint, {\n name: \"vpc-s3-vpc-endpoint\",\n config: {\n vpcId: vpc.output.id,\n serviceName: pulumi.interpolate`com.amazonaws.${region}.s3`,\n routeTableIds: [routeTables.privateSubnets.output.id]\n }\n });\n\n addResource(aws.ec2.VpcEndpoint, {\n name: \"vpc-dynamodb-vpc-endpoint\",\n config: {\n vpcId: vpc.output.id,\n serviceName: pulumi.interpolate`com.amazonaws.${region}.dynamodb`,\n routeTableIds: [routeTables.privateSubnets.output.id]\n }\n });\n\n addResource(aws.ec2.VpcEndpoint, {\n name: \"vpc-sqs-vpc-endpoint\",\n config: {\n vpcId: vpc.output.id,\n serviceName: pulumi.interpolate`com.amazonaws.${region}.sqs`,\n vpcEndpointType: \"Interface\",\n privateDnsEnabled: true,\n securityGroupIds: [vpc.output.defaultSecurityGroupId],\n subnetIds: subnets.private.map(subNet => subNet.output.id)\n }\n });\n\n addResource(aws.ec2.VpcEndpoint, {\n name: \"vpc-events-vpc-endpoint\",\n config: {\n vpcId: vpc.output.id,\n serviceName: pulumi.interpolate`com.amazonaws.${region}.events`,\n vpcEndpointType: \"Interface\",\n privateDnsEnabled: true,\n securityGroupIds: [vpc.output.defaultSecurityGroupId],\n subnetIds: subnets.private.map(subNet => subNet.output.id)\n }\n });\n }\n\n return projectAppParams.pulumi?.(...args);\n }\n });\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AAIA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAgBO,SAASK,mBAAmBA,CAACC,gBAA2C,GAAG,CAAC,CAAC,EAAE;EAClF,OAAO,IAAAC,wCAAuB,MAAAC,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MACvBH,gBAAgB;IACnB;IACAI,GAAG,EAAEA,CAAC;MAAEC;IAAS,CAAC,KAAK;MACnB,MAAMD,GAAG,GAAGC,QAAQ,CAACL,gBAAgB,CAACI,GAAG,CAAC;MAC1C,MAAME,sBAAsB,GAAGF,GAAG,IAAI,OAAOA,GAAG,KAAK,SAAS;MAC9D,OAAOE,sBAAsB,IAAIF,GAAG,CAACG,cAAc,GAAG,KAAK,GAAGC,OAAO,CAACJ,GAAG,CAAC;IAC9E,CAAC;IACDT,MAAMA,CAAC,GAAGc,IAAI,EAAE;MAAA,IAAAC,sBAAA;MACZ,MAAM,CAACC,GAAG,CAAC,GAAGF,IAAI;MAClB,MAAM;QAAEJ;MAAS,CAAC,GAAGM,GAAG;MACxB,MAAMP,GAAG,GAAGC,QAAQ,CAACL,gBAAgB,CAACI,GAAG,CAAC;MAC1C,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AAY,iBAAgBZ,MAAO,SAAQ;YAC/De,eAAe,EAAE,WAAW;YAC5BC,iBAAiB,EAAE,IAAI;YACvBC,gBAAgB,EAAE,CAACzD,GAAG,CAACoC,MAAM,CAACsB,sBAAsB,CAAC;YACrDC,SAAS,EAAEb,OAAO,CAACc,OAAO,CAACC,GAAG,CAACC,MAAM,IAAIA,MAAM,CAAC1B,MAAM,CAACc,EAAE;UAC7D;QACJ,CAAC,CAAC;MACN;MAEA,QAAA5C,sBAAA,GAAOV,gBAAgB,CAACL,MAAM,cAAAe,sBAAA,uBAAvBA,sBAAA,CAAAG,IAAA,CAAAb,gBAAgB,EAAU,GAAGS,IAAI,CAAC;IAC7C;EAAC,EACJ,CAAC;AACN"}
|
|
@@ -46,7 +46,10 @@ function createWebsitePulumiApp(projectAppParams = {}) {
|
|
|
46
46
|
}
|
|
47
47
|
onResource(resource => {
|
|
48
48
|
if ((0, _pulumi.isResourceOfType)(resource, aws.lambda.Function)) {
|
|
49
|
-
resource.
|
|
49
|
+
const canUseVpc = resource.meta.canUseVpc !== false;
|
|
50
|
+
if (canUseVpc) {
|
|
51
|
+
resource.config.vpcConfig(useExistingVpc.lambdaFunctionsVpcConfig);
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
if ((0, _pulumi.isResourceOfType)(resource, aws.iam.Role)) {
|
|
52
55
|
if (resource.meta.isLambdaFunctionRole) {
|
|
@@ -64,6 +67,4 @@ function createWebsitePulumiApp(projectAppParams = {}) {
|
|
|
64
67
|
return (_projectAppParams$pul2 = projectAppParams.pulumi) === null || _projectAppParams$pul2 === void 0 ? void 0 : _projectAppParams$pul2.call(projectAppParams, ...args);
|
|
65
68
|
}
|
|
66
69
|
}));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
//# sourceMappingURL=createWebsitePulumiApp.js.map
|
|
70
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["aws","_interopRequireWildcard","require","_createWebsitePulumiApp","_pulumi","createWebsitePulumiApp","projectAppParams","baseCreateWebsitePulumiApp","_objectSpread2","default","vpc","getParam","usingAdvancedVpcParams","useExistingVpc","Boolean","pulumi","args","_projectAppParams$pul2","_projectAppParams$pul","call","onResource","addResource","lambdaFunctionsVpcConfig","Error","resource","isResourceOfType","lambda","Function","config","vpcConfig","iam","Role","
|
|
1
|
+
{"version":3,"names":["aws","_interopRequireWildcard","require","_createWebsitePulumiApp","_pulumi","createWebsitePulumiApp","projectAppParams","baseCreateWebsitePulumiApp","_objectSpread2","default","vpc","getParam","usingAdvancedVpcParams","useExistingVpc","Boolean","pulumi","args","_projectAppParams$pul2","_projectAppParams$pul","call","onResource","addResource","lambdaFunctionsVpcConfig","Error","resource","isResourceOfType","lambda","Function","canUseVpc","meta","config","vpcConfig","iam","Role","isLambdaFunctionRole","RolePolicyAttachment","name","role","output","policyArn","ManagedPolicy","AWSLambdaVPCAccessExecutionRole"],"sources":["createWebsitePulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport {\n createWebsitePulumiApp as baseCreateWebsitePulumiApp,\n CreateWebsitePulumiAppParams as BaseCreateWebsitePulumiAppParams\n} from \"~/apps/website/createWebsitePulumiApp\";\nimport { isResourceOfType, PulumiAppParam } from \"@webiny/pulumi\";\n\nexport type WebsitePulumiApp = ReturnType<typeof createWebsitePulumiApp>;\n\nexport type WebsitePulumiAppAdvancedVpcParams = Partial<{\n useExistingVpc: {\n lambdaFunctionsVpcConfig: aws.types.input.lambda.FunctionVpcConfig;\n };\n}>;\n\nexport interface CreateWebsitePulumiAppParams\n extends Omit<BaseCreateWebsitePulumiAppParams, \"vpc\"> {\n vpc?: PulumiAppParam<boolean | WebsitePulumiAppAdvancedVpcParams>;\n}\n\nexport function createWebsitePulumiApp(projectAppParams: CreateWebsitePulumiAppParams = {}) {\n return baseCreateWebsitePulumiApp({\n ...projectAppParams,\n // If using existing VPC, we ensure `vpc` param is set to `false`.\n vpc: ({ getParam }) => {\n const vpc = getParam(projectAppParams.vpc);\n const usingAdvancedVpcParams = vpc && typeof vpc !== \"boolean\";\n return usingAdvancedVpcParams && vpc.useExistingVpc ? false : Boolean(vpc);\n },\n pulumi(...args) {\n const [{ getParam }] = args;\n const vpc = getParam(projectAppParams.vpc);\n const usingAdvancedVpcParams = vpc && typeof vpc !== \"boolean\";\n\n // Not using advanced VPC params? Then immediately exit.\n if (!usingAdvancedVpcParams) {\n return projectAppParams.pulumi?.(...args);\n }\n\n const [{ onResource, addResource }] = args;\n const { useExistingVpc } = vpc;\n\n if (useExistingVpc) {\n if (!useExistingVpc.lambdaFunctionsVpcConfig) {\n throw new Error(\n \"Cannot specify `useExistingVpc` parameter because the `lambdaFunctionsVpcConfig` parameter wasn't provided.\"\n );\n }\n\n onResource(resource => {\n if (isResourceOfType(resource, aws.lambda.Function)) {\n const canUseVpc = resource.meta.canUseVpc !== false;\n if (canUseVpc) {\n resource.config.vpcConfig(useExistingVpc!.lambdaFunctionsVpcConfig);\n }\n }\n\n if (isResourceOfType(resource, aws.iam.Role)) {\n if (resource.meta.isLambdaFunctionRole) {\n addResource(aws.iam.RolePolicyAttachment, {\n name: `${resource.name}-vpc-access-execution-role`,\n config: {\n role: resource.output.name,\n policyArn: aws.iam.ManagedPolicy.AWSLambdaVPCAccessExecutionRole\n }\n });\n }\n }\n });\n }\n\n return projectAppParams.pulumi?.(...args);\n }\n });\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAIA,IAAAE,OAAA,GAAAF,OAAA;AAeO,SAASG,sBAAsBA,CAACC,gBAA8C,GAAG,CAAC,CAAC,EAAE;EACxF,OAAO,IAAAC,8CAA0B,MAAAC,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MAC1BH,gBAAgB;IACnB;IACAI,GAAG,EAAEA,CAAC;MAAEC;IAAS,CAAC,KAAK;MACnB,MAAMD,GAAG,GAAGC,QAAQ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D,QAAQ,EAAExB,GAAG,CAACgC,GAAG,CAACC,IAAI,CAAC,EAAE;YAC1C,IAAIT,QAAQ,CAACK,IAAI,CAACK,oBAAoB,EAAE;cACpCb,WAAW,CAACrB,GAAG,CAACgC,GAAG,CAACG,oBAAoB,EAAE;gBACtCC,IAAI,EAAG,GAAEZ,QAAQ,CAACY,IAAK,4BAA2B;gBAClDN,MAAM,EAAE;kBACJO,IAAI,EAAEb,QAAQ,CAACc,MAAM,CAACF,IAAI;kBAC1BG,SAAS,EAAEvC,GAAG,CAACgC,GAAG,CAACQ,aAAa,CAACC;gBACrC;cACJ,CAAC,CAAC;YACN;UACJ;QACJ,CAAC,CAAC;MACN;MAEA,QAAAxB,sBAAA,GAAOX,gBAAgB,CAACS,MAAM,cAAAE,sBAAA,uBAAvBA,sBAAA,CAAAE,IAAA,CAAAb,gBAAgB,EAAU,GAAGU,IAAI,CAAC;IAC7C;EAAC,EACJ,CAAC;AACN"}
|
package/enterprise/index.js
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/pulumi-aws",
|
|
3
|
-
"version": "5.37.3-beta.
|
|
3
|
+
"version": "5.37.3-beta.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/webiny/webiny-js.git"
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@pulumi/aws": "^5.8.0",
|
|
17
17
|
"@pulumi/pulumi": "^3.34.0",
|
|
18
|
-
"@webiny/cli-plugin-deploy-pulumi": "5.37.3-beta.
|
|
19
|
-
"@webiny/pulumi": "5.37.3-beta.
|
|
18
|
+
"@webiny/cli-plugin-deploy-pulumi": "5.37.3-beta.1",
|
|
19
|
+
"@webiny/pulumi": "5.37.3-beta.1",
|
|
20
20
|
"form-data": "4.0.0",
|
|
21
21
|
"node-fetch": "2.6.9"
|
|
22
22
|
},
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@babel/preset-env": "7.22.7",
|
|
27
27
|
"@babel/preset-typescript": "7.22.5",
|
|
28
28
|
"@babel/runtime": "7.22.6",
|
|
29
|
-
"@webiny/api-page-builder": "5.37.3-beta.
|
|
30
|
-
"@webiny/aws-layers": "5.37.3-beta.
|
|
31
|
-
"@webiny/cli": "5.37.3-beta.
|
|
32
|
-
"@webiny/project-utils": "5.37.3-beta.
|
|
29
|
+
"@webiny/api-page-builder": "5.37.3-beta.1",
|
|
30
|
+
"@webiny/aws-layers": "5.37.3-beta.1",
|
|
31
|
+
"@webiny/cli": "5.37.3-beta.1",
|
|
32
|
+
"@webiny/project-utils": "5.37.3-beta.1",
|
|
33
33
|
"chalk": "4.1.2",
|
|
34
34
|
"lodash": "4.17.21",
|
|
35
35
|
"mime": "2.6.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "59d377132f34c76cb198cd0f0eee211a56ca25b7"
|
|
53
53
|
}
|
package/utils/crawlDirectory.js
CHANGED
package/utils/index.js
CHANGED
package/utils/storageMigrate.js
CHANGED
package/utils/tagResources.js
CHANGED
|
@@ -33,6 +33,4 @@ function isTaggable(resourceType) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// A list of known AWS type tokens that are taggable.
|
|
36
|
-
const taggableResourceTypes = new Set(["aws:accessanalyzer/analyzer:Analyzer", "aws:acm/certificate:Certificate", "aws:acmpca/certificateAuthority:CertificateAuthority", "aws:alb/loadBalancer:LoadBalancer", "aws:alb/targetGroup:TargetGroup", "aws:apigateway/apiKey:ApiKey", "aws:apigateway/clientCertificate:ClientCertificate", "aws:apigateway/domainName:DomainName", "aws:apigateway/restApi:RestApi", "aws:apigateway/stage:Stage", "aws:apigateway/usagePlan:UsagePlan", "aws:apigateway/vpcLink:VpcLink", "aws:apigatewayv2/api:Api", "aws:apigatewayv2/stage:Stage", "aws:applicationloadbalancing/loadBalancer:LoadBalancer", "aws:applicationloadbalancing/targetGroup:TargetGroup", "aws:appmesh/mesh:Mesh", "aws:appmesh/route:Route", "aws:appmesh/virtualNode:VirtualNode", "aws:appmesh/virtualRouter:VirtualRouter", "aws:appmesh/virtualService:VirtualService", "aws:appsync/graphQLApi:GraphQLApi", "aws:athena/workgroup:Workgroup", "aws:autoscaling/group:Group", "aws:backup/plan:Plan", "aws:backup/vault:Vault", "aws:cfg/aggregateAuthorization:AggregateAuthorization", "aws:cfg/configurationAggregator:ConfigurationAggregator", "aws:cfg/rule:Rule", "aws:cloudformation/stack:Stack", "aws:cloudformation/stackSet:StackSet", "aws:cloudfront/distribution:Distribution", "aws:cloudhsmv2/cluster:Cluster", "aws:cloudtrail/trail:Trail", "aws:cloudwatch/eventRule:EventRule", "aws:cloudwatch/logGroup:LogGroup", "aws:cloudwatch/metricAlarm:MetricAlarm", "aws:codebuild/project:Project", "aws:codecommit/repository:Repository", "aws:codepipeline/pipeline:Pipeline", "aws:codepipeline/webhook:Webhook", "aws:codestarnotifications/notificationRule:NotificationRule", "aws:cognito/identityPool:IdentityPool", "aws:cognito/userPool:UserPool", "aws:datapipeline/pipeline:Pipeline", "aws:datasync/agent:Agent", "aws:datasync/efsLocation:EfsLocation", "aws:datasync/locationSmb:LocationSmb", "aws:datasync/nfsLocation:NfsLocation", "aws:datasync/s3Location:S3Location", "aws:datasync/task:Task", "aws:dax/cluster:Cluster", "aws:directconnect/connection:Connection", "aws:directconnect/hostedPrivateVirtualInterfaceAccepter:HostedPrivateVirtualInterfaceAccepter", "aws:directconnect/hostedPublicVirtualInterfaceAccepter:HostedPublicVirtualInterfaceAccepter", "aws:directconnect/hostedTransitVirtualInterfaceAcceptor:HostedTransitVirtualInterfaceAcceptor", "aws:directconnect/linkAggregationGroup:LinkAggregationGroup", "aws:directconnect/privateVirtualInterface:PrivateVirtualInterface", "aws:directconnect/publicVirtualInterface:PublicVirtualInterface", "aws:directconnect/transitVirtualInterface:TransitVirtualInterface", "aws:directoryservice/directory:Directory", "aws:dlm/lifecyclePolicy:LifecyclePolicy", "aws:dms/endpoint:Endpoint", "aws:dms/replicationInstance:ReplicationInstance", "aws:dms/replicationSubnetGroup:ReplicationSubnetGroup", "aws:dms/replicationTask:ReplicationTask", "aws:docdb/cluster:Cluster", "aws:docdb/clusterInstance:ClusterInstance", "aws:docdb/clusterParameterGroup:ClusterParameterGroup", "aws:docdb/subnetGroup:SubnetGroup", "aws:dynamodb/table:Table", "aws:ebs/snapshot:Snapshot", "aws:ebs/snapshotCopy:SnapshotCopy", "aws:ebs/volume:Volume", "aws:ec2/ami:Ami", "aws:ec2/amiCopy:AmiCopy", "aws:ec2/amiFromInstance:AmiFromInstance", "aws:ec2/capacityReservation:CapacityReservation", "aws:ec2/customerGateway:CustomerGateway", "aws:ec2/defaultNetworkAcl:DefaultNetworkAcl", "aws:ec2/defaultRouteTable:DefaultRouteTable", "aws:ec2/defaultSecurityGroup:DefaultSecurityGroup", "aws:ec2/defaultSubnet:DefaultSubnet", "aws:ec2/defaultVpc:DefaultVpc", "aws:ec2/defaultVpcDhcpOptions:DefaultVpcDhcpOptions", "aws:ec2/eip:Eip", "aws:ec2/fleet:Fleet", "aws:ec2/instance:Instance", "aws:ec2/internetGateway:InternetGateway", "aws:ec2/keyPair:KeyPair", "aws:ec2/launchTemplate:LaunchTemplate", "aws:ec2/natGateway:NatGateway", "aws:ec2/networkAcl:NetworkAcl", "aws:ec2/networkInterface:NetworkInterface", "aws:ec2/placementGroup:PlacementGroup", "aws:ec2/routeTable:RouteTable", "aws:ec2/securityGroup:SecurityGroup", "aws:ec2/spotInstanceRequest:SpotInstanceRequest", "aws:ec2/subnet:Subnet", "aws:ec2/vpc:Vpc", "aws:ec2/vpcDhcpOptions:VpcDhcpOptions", "aws:ec2/vpcEndpoint:VpcEndpoint", "aws:ec2/vpcEndpointService:VpcEndpointService", "aws:ec2/vpcPeeringConnection:VpcPeeringConnection", "aws:ec2/vpcPeeringConnectionAccepter:VpcPeeringConnectionAccepter", "aws:ec2/vpnConnection:VpnConnection", "aws:ec2/vpnGateway:VpnGateway", "aws:ec2clientvpn/endpoint:Endpoint", "aws:ec2transitgateway/routeTable:RouteTable", "aws:ec2transitgateway/transitGateway:TransitGateway", "aws:ec2transitgateway/vpcAttachment:VpcAttachment", "aws:ec2transitgateway/vpcAttachmentAccepter:VpcAttachmentAccepter", "aws:ecr/repository:Repository", "aws:ecs/capacityProvider:CapacityProvider", "aws:ecs/cluster:Cluster", "aws:ecs/service:Service", "aws:ecs/taskDefinition:TaskDefinition", "aws:efs/fileSystem:FileSystem", "aws:eks/cluster:Cluster", "aws:eks/fargateProfile:FargateProfile", "aws:eks/nodeGroup:NodeGroup", "aws:elasticache/cluster:Cluster", "aws:elasticache/replicationGroup:ReplicationGroup", "aws:elasticbeanstalk/application:Application", "aws:elasticbeanstalk/applicationVersion:ApplicationVersion", "aws:elasticbeanstalk/environment:Environment", "aws:elasticloadbalancing/loadBalancer:LoadBalancer", "aws:elasticloadbalancingv2/loadBalancer:LoadBalancer", "aws:elasticloadbalancingv2/targetGroup:TargetGroup", "aws:elasticsearch/domain:Domain", "aws:elb/loadBalancer:LoadBalancer", "aws:emr/cluster:Cluster", "aws:fsx/lustreFileSystem:LustreFileSystem", "aws:fsx/windowsFileSystem:WindowsFileSystem", "aws:gamelift/alias:Alias", "aws:gamelift/build:Build", "aws:gamelift/fleet:Fleet", "aws:gamelift/gameSessionQueue:GameSessionQueue", "aws:glacier/vault:Vault", "aws:glue/crawler:Crawler", "aws:glue/job:Job", "aws:glue/trigger:Trigger", "aws:iam/role:Role", "aws:iam/user:User", "aws:inspector/resourceGroup:ResourceGroup", "aws:kinesis/analyticsApplication:AnalyticsApplication", "aws:kinesis/firehoseDeliveryStream:FirehoseDeliveryStream", "aws:kinesis/stream:Stream", "aws:kms/externalKey:ExternalKey", "aws:kms/key:Key", "aws:lambda/function:Function", "aws:lb/loadBalancer:LoadBalancer", "aws:lb/targetGroup:TargetGroup", "aws:licensemanager/licenseConfiguration:LicenseConfiguration", "aws:lightsail/instance:Instance", "aws:mediaconvert/queue:Queue", "aws:mediapackage/channel:Channel", "aws:mediastore/container:Container", "aws:mq/broker:Broker", "aws:mq/configuration:Configuration", "aws:msk/cluster:Cluster", "aws:neptune/cluster:Cluster", "aws:neptune/clusterInstance:ClusterInstance", "aws:neptune/clusterParameterGroup:ClusterParameterGroup", "aws:neptune/eventSubscription:EventSubscription", "aws:neptune/parameterGroup:ParameterGroup", "aws:neptune/subnetGroup:SubnetGroup", "aws:opsworks/stack:Stack", "aws:organizations/account:Account", "aws:pinpoint/app:App", "aws:qldb/ledger:Ledger", "aws:ram/resourceShare:ResourceShare", "aws:rds/cluster:Cluster", "aws:rds/clusterEndpoint:ClusterEndpoint", "aws:rds/clusterInstance:ClusterInstance", "aws:rds/clusterParameterGroup:ClusterParameterGroup", "aws:rds/clusterSnapshot:ClusterSnapshot", "aws:rds/eventSubscription:EventSubscription", "aws:rds/instance:Instance", "aws:rds/optionGroup:OptionGroup", "aws:rds/parameterGroup:ParameterGroup", "aws:rds/securityGroup:SecurityGroup", "aws:rds/snapshot:Snapshot", "aws:rds/subnetGroup:SubnetGroup", "aws:redshift/cluster:Cluster", "aws:redshift/eventSubscription:EventSubscription", "aws:redshift/parameterGroup:ParameterGroup", "aws:redshift/snapshotCopyGrant:SnapshotCopyGrant", "aws:redshift/snapshotSchedule:SnapshotSchedule", "aws:redshift/subnetGroup:SubnetGroup", "aws:resourcegroups/group:Group", "aws:route53/healthCheck:HealthCheck", "aws:route53/resolverEndpoint:ResolverEndpoint", "aws:route53/resolverRule:ResolverRule", "aws:route53/zone:Zone", "aws:s3/bucket:Bucket", "aws:s3/bucketObject:BucketObject", "aws:sagemaker/endpoint:Endpoint", "aws:sagemaker/endpointConfiguration:EndpointConfiguration", "aws:sagemaker/model:Model", "aws:sagemaker/notebookInstance:NotebookInstance", "aws:secretsmanager/secret:Secret", "aws:servicecatalog/portfolio:Portfolio", "aws:sfn/activity:Activity", "aws:sfn/stateMachine:StateMachine", "aws:sns/topic:Topic", "aws:sqs/queue:Queue", "aws:ssm/activation:Activation", "aws:ssm/document:Document", "aws:ssm/maintenanceWindow:MaintenanceWindow", "aws:ssm/parameter:Parameter", "aws:ssm/patchBaseline:PatchBaseline", "aws:storagegateway/cachesIscsiVolume:CachesIscsiVolume", "aws:storagegateway/gateway:Gateway", "aws:storagegateway/nfsFileShare:NfsFileShare", "aws:storagegateway/smbFileShare:SmbFileShare", "aws:swf/domain:Domain", "aws:transfer/server:Server", "aws:transfer/user:User", "aws:waf/rateBasedRule:RateBasedRule", "aws:waf/rule:Rule", "aws:waf/ruleGroup:RuleGroup", "aws:waf/webAcl:WebAcl", "aws:wafregional/rateBasedRule:RateBasedRule", "aws:wafregional/rule:Rule", "aws:wafregional/ruleGroup:RuleGroup", "aws:wafregional/webAcl:WebAcl", "aws:workspaces/directory:Directory", "aws:workspaces/ipGroup:IpGroup"]);
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=tagResources.js.map
|
|
36
|
+
const taggableResourceTypes = new Set(["aws:accessanalyzer/analyzer:Analyzer", "aws:acm/certificate:Certificate", "aws:acmpca/certificateAuthority:CertificateAuthority", "aws:alb/loadBalancer:LoadBalancer", "aws:alb/targetGroup:TargetGroup", "aws:apigateway/apiKey:ApiKey", "aws:apigateway/clientCertificate:ClientCertificate", "aws:apigateway/domainName:DomainName", "aws:apigateway/restApi:RestApi", "aws:apigateway/stage:Stage", "aws:apigateway/usagePlan:UsagePlan", "aws:apigateway/vpcLink:VpcLink", "aws:apigatewayv2/api:Api", "aws:apigatewayv2/stage:Stage", "aws:applicationloadbalancing/loadBalancer:LoadBalancer", "aws:applicationloadbalancing/targetGroup:TargetGroup", "aws:appmesh/mesh:Mesh", "aws:appmesh/route:Route", "aws:appmesh/virtualNode:VirtualNode", "aws:appmesh/virtualRouter:VirtualRouter", "aws:appmesh/virtualService:VirtualService", "aws:appsync/graphQLApi:GraphQLApi", "aws:athena/workgroup:Workgroup", "aws:autoscaling/group:Group", "aws:backup/plan:Plan", "aws:backup/vault:Vault", "aws:cfg/aggregateAuthorization:AggregateAuthorization", "aws:cfg/configurationAggregator:ConfigurationAggregator", "aws:cfg/rule:Rule", "aws:cloudformation/stack:Stack", "aws:cloudformation/stackSet:StackSet", "aws:cloudfront/distribution:Distribution", "aws:cloudhsmv2/cluster:Cluster", "aws:cloudtrail/trail:Trail", "aws:cloudwatch/eventRule:EventRule", "aws:cloudwatch/logGroup:LogGroup", "aws:cloudwatch/metricAlarm:MetricAlarm", "aws:codebuild/project:Project", "aws:codecommit/repository:Repository", "aws:codepipeline/pipeline:Pipeline", "aws:codepipeline/webhook:Webhook", "aws:codestarnotifications/notificationRule:NotificationRule", "aws:cognito/identityPool:IdentityPool", "aws:cognito/userPool:UserPool", "aws:datapipeline/pipeline:Pipeline", "aws:datasync/agent:Agent", "aws:datasync/efsLocation:EfsLocation", "aws:datasync/locationSmb:LocationSmb", "aws:datasync/nfsLocation:NfsLocation", "aws:datasync/s3Location:S3Location", "aws:datasync/task:Task", "aws:dax/cluster:Cluster", "aws:directconnect/connection:Connection", "aws:directconnect/hostedPrivateVirtualInterfaceAccepter:HostedPrivateVirtualInterfaceAccepter", "aws:directconnect/hostedPublicVirtualInterfaceAccepter:HostedPublicVirtualInterfaceAccepter", "aws:directconnect/hostedTransitVirtualInterfaceAcceptor:HostedTransitVirtualInterfaceAcceptor", "aws:directconnect/linkAggregationGroup:LinkAggregationGroup", "aws:directconnect/privateVirtualInterface:PrivateVirtualInterface", "aws:directconnect/publicVirtualInterface:PublicVirtualInterface", "aws:directconnect/transitVirtualInterface:TransitVirtualInterface", "aws:directoryservice/directory:Directory", "aws:dlm/lifecyclePolicy:LifecyclePolicy", "aws:dms/endpoint:Endpoint", "aws:dms/replicationInstance:ReplicationInstance", "aws:dms/replicationSubnetGroup:ReplicationSubnetGroup", "aws:dms/replicationTask:ReplicationTask", "aws:docdb/cluster:Cluster", "aws:docdb/clusterInstance:ClusterInstance", "aws:docdb/clusterParameterGroup:ClusterParameterGroup", "aws:docdb/subnetGroup:SubnetGroup", "aws:dynamodb/table:Table", "aws:ebs/snapshot:Snapshot", "aws:ebs/snapshotCopy:SnapshotCopy", "aws:ebs/volume:Volume", "aws:ec2/ami:Ami", "aws:ec2/amiCopy:AmiCopy", "aws:ec2/amiFromInstance:AmiFromInstance", "aws:ec2/capacityReservation:CapacityReservation", "aws:ec2/customerGateway:CustomerGateway", "aws:ec2/defaultNetworkAcl:DefaultNetworkAcl", "aws:ec2/defaultRouteTable:DefaultRouteTable", "aws:ec2/defaultSecurityGroup:DefaultSecurityGroup", "aws:ec2/defaultSubnet:DefaultSubnet", "aws:ec2/defaultVpc:DefaultVpc", "aws:ec2/defaultVpcDhcpOptions:DefaultVpcDhcpOptions", "aws:ec2/eip:Eip", "aws:ec2/fleet:Fleet", "aws:ec2/instance:Instance", "aws:ec2/internetGateway:InternetGateway", "aws:ec2/keyPair:KeyPair", "aws:ec2/launchTemplate:LaunchTemplate", "aws:ec2/natGateway:NatGateway", "aws:ec2/networkAcl:NetworkAcl", "aws:ec2/networkInterface:NetworkInterface", "aws:ec2/placementGroup:PlacementGroup", "aws:ec2/routeTable:RouteTable", "aws:ec2/securityGroup:SecurityGroup", "aws:ec2/spotInstanceRequest:SpotInstanceRequest", "aws:ec2/subnet:Subnet", "aws:ec2/vpc:Vpc", "aws:ec2/vpcDhcpOptions:VpcDhcpOptions", "aws:ec2/vpcEndpoint:VpcEndpoint", "aws:ec2/vpcEndpointService:VpcEndpointService", "aws:ec2/vpcPeeringConnection:VpcPeeringConnection", "aws:ec2/vpcPeeringConnectionAccepter:VpcPeeringConnectionAccepter", "aws:ec2/vpnConnection:VpnConnection", "aws:ec2/vpnGateway:VpnGateway", "aws:ec2clientvpn/endpoint:Endpoint", "aws:ec2transitgateway/routeTable:RouteTable", "aws:ec2transitgateway/transitGateway:TransitGateway", "aws:ec2transitgateway/vpcAttachment:VpcAttachment", "aws:ec2transitgateway/vpcAttachmentAccepter:VpcAttachmentAccepter", "aws:ecr/repository:Repository", "aws:ecs/capacityProvider:CapacityProvider", "aws:ecs/cluster:Cluster", "aws:ecs/service:Service", "aws:ecs/taskDefinition:TaskDefinition", "aws:efs/fileSystem:FileSystem", "aws:eks/cluster:Cluster", "aws:eks/fargateProfile:FargateProfile", "aws:eks/nodeGroup:NodeGroup", "aws:elasticache/cluster:Cluster", "aws:elasticache/replicationGroup:ReplicationGroup", "aws:elasticbeanstalk/application:Application", "aws:elasticbeanstalk/applicationVersion:ApplicationVersion", "aws:elasticbeanstalk/environment:Environment", "aws:elasticloadbalancing/loadBalancer:LoadBalancer", "aws:elasticloadbalancingv2/loadBalancer:LoadBalancer", "aws:elasticloadbalancingv2/targetGroup:TargetGroup", "aws:elasticsearch/domain:Domain", "aws:elb/loadBalancer:LoadBalancer", "aws:emr/cluster:Cluster", "aws:fsx/lustreFileSystem:LustreFileSystem", "aws:fsx/windowsFileSystem:WindowsFileSystem", "aws:gamelift/alias:Alias", "aws:gamelift/build:Build", "aws:gamelift/fleet:Fleet", "aws:gamelift/gameSessionQueue:GameSessionQueue", "aws:glacier/vault:Vault", "aws:glue/crawler:Crawler", "aws:glue/job:Job", "aws:glue/trigger:Trigger", "aws:iam/role:Role", "aws:iam/user:User", "aws:inspector/resourceGroup:ResourceGroup", "aws:kinesis/analyticsApplication:AnalyticsApplication", "aws:kinesis/firehoseDeliveryStream:FirehoseDeliveryStream", "aws:kinesis/stream:Stream", "aws:kms/externalKey:ExternalKey", "aws:kms/key:Key", "aws:lambda/function:Function", "aws:lb/loadBalancer:LoadBalancer", "aws:lb/targetGroup:TargetGroup", "aws:licensemanager/licenseConfiguration:LicenseConfiguration", "aws:lightsail/instance:Instance", "aws:mediaconvert/queue:Queue", "aws:mediapackage/channel:Channel", "aws:mediastore/container:Container", "aws:mq/broker:Broker", "aws:mq/configuration:Configuration", "aws:msk/cluster:Cluster", "aws:neptune/cluster:Cluster", "aws:neptune/clusterInstance:ClusterInstance", "aws:neptune/clusterParameterGroup:ClusterParameterGroup", "aws:neptune/eventSubscription:EventSubscription", "aws:neptune/parameterGroup:ParameterGroup", "aws:neptune/subnetGroup:SubnetGroup", "aws:opsworks/stack:Stack", "aws:organizations/account:Account", "aws:pinpoint/app:App", "aws:qldb/ledger:Ledger", "aws:ram/resourceShare:ResourceShare", "aws:rds/cluster:Cluster", "aws:rds/clusterEndpoint:ClusterEndpoint", "aws:rds/clusterInstance:ClusterInstance", "aws:rds/clusterParameterGroup:ClusterParameterGroup", "aws:rds/clusterSnapshot:ClusterSnapshot", "aws:rds/eventSubscription:EventSubscription", "aws:rds/instance:Instance", "aws:rds/optionGroup:OptionGroup", "aws:rds/parameterGroup:ParameterGroup", "aws:rds/securityGroup:SecurityGroup", "aws:rds/snapshot:Snapshot", "aws:rds/subnetGroup:SubnetGroup", "aws:redshift/cluster:Cluster", "aws:redshift/eventSubscription:EventSubscription", "aws:redshift/parameterGroup:ParameterGroup", "aws:redshift/snapshotCopyGrant:SnapshotCopyGrant", "aws:redshift/snapshotSchedule:SnapshotSchedule", "aws:redshift/subnetGroup:SubnetGroup", "aws:resourcegroups/group:Group", "aws:route53/healthCheck:HealthCheck", "aws:route53/resolverEndpoint:ResolverEndpoint", "aws:route53/resolverRule:ResolverRule", "aws:route53/zone:Zone", "aws:s3/bucket:Bucket", "aws:s3/bucketObject:BucketObject", "aws:sagemaker/endpoint:Endpoint", "aws:sagemaker/endpointConfiguration:EndpointConfiguration", "aws:sagemaker/model:Model", "aws:sagemaker/notebookInstance:NotebookInstance", "aws:secretsmanager/secret:Secret", "aws:servicecatalog/portfolio:Portfolio", "aws:sfn/activity:Activity", "aws:sfn/stateMachine:StateMachine", "aws:sns/topic:Topic", "aws:sqs/queue:Queue", "aws:ssm/activation:Activation", "aws:ssm/document:Document", "aws:ssm/maintenanceWindow:MaintenanceWindow", "aws:ssm/parameter:Parameter", "aws:ssm/patchBaseline:PatchBaseline", "aws:storagegateway/cachesIscsiVolume:CachesIscsiVolume", "aws:storagegateway/gateway:Gateway", "aws:storagegateway/nfsFileShare:NfsFileShare", "aws:storagegateway/smbFileShare:SmbFileShare", "aws:swf/domain:Domain", "aws:transfer/server:Server", "aws:transfer/user:User", "aws:waf/rateBasedRule:RateBasedRule", "aws:waf/rule:Rule", "aws:waf/ruleGroup:RuleGroup", "aws:waf/webAcl:WebAcl", "aws:wafregional/rateBasedRule:RateBasedRule", "aws:wafregional/rule:Rule", "aws:wafregional/ruleGroup:RuleGroup", "aws:wafregional/webAcl:WebAcl", "aws:workspaces/directory:Directory", "aws:workspaces/ipGroup:IpGroup"]);
|