@mstuercke/pulumi-modules 0.0.21 → 0.0.23

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.
@@ -28,4 +28,3 @@ export declare class Auth0 extends ComponentResource {
28
28
  connectionName: Output<string>;
29
29
  constructor(name: string, args: Auth0Args, opts?: ComponentResourceOptions);
30
30
  }
31
- //# sourceMappingURL=Auth0.d.ts.map
@@ -3,4 +3,3 @@ export * from './Auth0.ts';
3
3
  export declare const auth0: {
4
4
  Auth0: typeof Auth0;
5
5
  };
6
- //# sourceMappingURL=index.d.ts.map
@@ -11,4 +11,3 @@ export type DomainResult = {
11
11
  euCentral1CertificateArn: string;
12
12
  };
13
13
  export declare const getDomain: (options: DataDomainOptions) => Promise<DomainResult>;
14
- //# sourceMappingURL=getDomain.d.ts.map
@@ -2,4 +2,3 @@ export * from './getDomain.ts';
2
2
  export declare const domain: {
3
3
  getDomain: (options: import("./getDomain.ts").DataDomainOptions) => Promise<import("./getDomain.ts").DomainResult>;
4
4
  };
5
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@ import { type ComponentResourceOptions } from '@pulumi/pulumi';
4
4
  export declare class SimpleIamRolePolicy extends iam.RolePolicy {
5
5
  constructor(iamRoleId: string, config: SimpleIamRolePolicyConfig, opts?: ComponentResourceOptions);
6
6
  }
7
- //# sourceMappingURL=SimpleIamRolePolicy.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import type { Input } from '@pulumi/pulumi';
2
- import type { PolicyStatement } from '@pulumi/aws/iam';
2
+ import type { iam } from '@pulumi/aws';
3
3
  export type SimpleIamRolePolicyConfig = CustomPolicyConfig | DynamoDbPolicyConfig | TimestreamPolicyConfig | S3PolicyConfig | CognitoPolicyConfig | WebsocketPolicyConfig | ExecuteLambdaConfig | SnsPolicyConfig | EventBridgeConfig;
4
4
  interface CustomPolicyConfig {
5
5
  type: 'custom';
6
6
  name: string;
7
- statements: PolicyStatement[];
7
+ statements: iam.PolicyStatement[];
8
8
  }
9
9
  interface DynamoDbPolicyConfig {
10
10
  type: 'dynamodb';
@@ -55,4 +55,3 @@ interface EventBridgeConfig {
55
55
  ruleArn: Input<string>;
56
56
  }
57
57
  export {};
58
- //# sourceMappingURL=SimpleIamRolePolicyConfig.d.ts.map
@@ -4,4 +4,3 @@ export * from './SimpleIamRolePolicyConfig.ts';
4
4
  export declare const iam: {
5
5
  SimpleIamRolePolicy: typeof SimpleIamRolePolicy;
6
6
  };
7
- //# sourceMappingURL=index.d.ts.map
package/dist/index.d.ts CHANGED
@@ -43,4 +43,3 @@ export declare const mstuercke: {
43
43
  WebsocketApi: typeof import("./websocket/WebsocketApi.ts").WebsocketApi;
44
44
  };
45
45
  };
46
- //# sourceMappingURL=index.d.ts.map
@@ -14,4 +14,3 @@ export declare class LambdaCronTrigger extends ComponentResource {
14
14
  ruleArn: Output<string>;
15
15
  constructor(resourceName: string, args: LambdaCronTriggerArgs, opts?: ComponentResourceOptions);
16
16
  }
17
- //# sourceMappingURL=LambdaCronTrigger.d.ts.map
@@ -1,4 +1,4 @@
1
- import { ComponentResource, type ComponentResourceOptions, type Output } from '@pulumi/pulumi';
1
+ import { ComponentResource, type ComponentResourceOptions, type Input, type Output } from '@pulumi/pulumi';
2
2
  import { type SimpleIamRolePolicyConfig } from '../iam/index.ts';
3
3
  import type { WithInputs } from './WithInputs.ts';
4
4
  export type NodeLambdaFunctionArgs<EnvironmentVariables> = {
@@ -10,6 +10,7 @@ export type NodeLambdaFunctionArgs<EnvironmentVariables> = {
10
10
  lambdaPath: string;
11
11
  additionalIamRolePolicies?: SimpleIamRolePolicyConfig[];
12
12
  environmentVariables?: WithInputs<EnvironmentVariables>;
13
+ layers?: Input<string[]>;
13
14
  projectId: string;
14
15
  };
15
16
  export declare class NodeLambdaFunction<EnvironmentVariables extends Record<string, string> = Record<string, string>> extends ComponentResource {
@@ -18,4 +19,3 @@ export declare class NodeLambdaFunction<EnvironmentVariables extends Record<stri
18
19
  invokeArn: Output<string>;
19
20
  constructor(args: NodeLambdaFunctionArgs<EnvironmentVariables>, opts?: ComponentResourceOptions);
20
21
  }
21
- //# sourceMappingURL=NodeLambdaFunction.d.ts.map
@@ -8,7 +8,7 @@ export class NodeLambdaFunction extends ComponentResource {
8
8
  invokeArn;
9
9
  constructor(args, opts) {
10
10
  super('mstuercke:lambda:NodeLambdaFunction', args.name, undefined, opts);
11
- const { name, additionalIamRolePolicies = [], environmentVariables = undefined, runtime = 'nodejs22.x', functionHandler = 'lambdaFunction.lambdaHandler', memorySize = 128, timeoutSeconds = 30, projectId, } = args;
11
+ const { name, additionalIamRolePolicies = [], environmentVariables = undefined, runtime = 'nodejs22.x', functionHandler = 'lambdaFunction.lambdaHandler', memorySize = 128, timeoutSeconds = 30, layers, projectId, } = args;
12
12
  const role = new iam.Role(name, {
13
13
  name: `${name}-lambda`,
14
14
  assumeRolePolicy: JSON.stringify({
@@ -52,6 +52,7 @@ export class NodeLambdaFunction extends ComponentResource {
52
52
  runtime: runtime,
53
53
  memorySize: memorySize,
54
54
  timeout: timeoutSeconds,
55
+ layers: layers,
55
56
  code: new asset.FileArchive(lambdaZip.then((lambdaZip) => lambdaZip.outputPath)),
56
57
  sourceCodeHash: lambdaZip.then((lambdaZip) => lambdaZip.outputBase64sha256),
57
58
  role: role.arn,
@@ -2,4 +2,3 @@ import type { Input } from '@pulumi/pulumi';
2
2
  export type WithInputs<T> = {
3
3
  [key in keyof T]: Input<T[key]>;
4
4
  };
5
- //# sourceMappingURL=WithInputs.d.ts.map
@@ -6,4 +6,3 @@ export declare const lambda: {
6
6
  NodeLambdaFunction: typeof NodeLambdaFunction;
7
7
  LambdaCronTrigger: typeof LambdaCronTrigger;
8
8
  };
9
- //# sourceMappingURL=index.d.ts.map
@@ -10,4 +10,3 @@ export declare class MongoDBCustomInstance extends ComponentResource {
10
10
  readonly databaseName: string;
11
11
  constructor(name: string, args: MongoDBCustomInstanceArgs, opts?: ComponentResourceOptions);
12
12
  }
13
- //# sourceMappingURL=MongoDBCustomInstance.d.ts.map
@@ -9,4 +9,3 @@ export declare class MongoDBDefaultInstance extends ComponentResource {
9
9
  readonly databaseName: string;
10
10
  constructor(name: string, args: MongoDBDefaultInstanceArgs, opts?: ComponentResourceOptions);
11
11
  }
12
- //# sourceMappingURL=MongoDBDefaultInstance.d.ts.map
@@ -10,4 +10,3 @@ export declare class MongoDBUser extends ComponentResource {
10
10
  readonly password: Output<string>;
11
11
  constructor(name: string, args: MongoDBUserArgs, opts?: ComponentResourceOptions);
12
12
  }
13
- //# sourceMappingURL=MongoDBUser.d.ts.map
@@ -9,4 +9,3 @@ export declare const mongodb: {
9
9
  MongoDBDefaultInstance: typeof MongoDBDefaultInstance;
10
10
  MongoDBUser: typeof MongoDBUser;
11
11
  };
12
- //# sourceMappingURL=index.d.ts.map
@@ -13,4 +13,3 @@ export declare class Postgres extends ComponentResource {
13
13
  readonly password: Input<string>;
14
14
  constructor(name: string, options: PostgresOptions, opts?: ComponentResourceOptions);
15
15
  }
16
- //# sourceMappingURL=Postgres.d.ts.map
@@ -3,4 +3,3 @@ export * from './Postgres.ts';
3
3
  export declare const postgres: {
4
4
  Postgres: typeof Postgres;
5
5
  };
6
- //# sourceMappingURL=index.d.ts.map
@@ -17,4 +17,3 @@ export declare class RestApi extends aws.apigateway.RestApi {
17
17
  readonly url: string;
18
18
  constructor(resourceName: string, args: RestApiArgs, opts?: ComponentResourceOptions);
19
19
  }
20
- //# sourceMappingURL=RestApi.d.ts.map
@@ -1,7 +1,5 @@
1
1
  import * as aws from '@pulumi/aws';
2
- import { apigateway, lambda } from '@pulumi/aws';
3
- import { Record } from '@pulumi/aws/route53';
4
- import { BasePathMapping, DomainName } from '@pulumi/aws/apigateway';
2
+ import { apigateway, lambda, route53 } from '@pulumi/aws';
5
3
  export class RestApi extends aws.apigateway.RestApi {
6
4
  url;
7
5
  constructor(resourceName, args, opts) {
@@ -102,11 +100,11 @@ export class RestApi extends aws.apigateway.RestApi {
102
100
  deployment: deployment.id,
103
101
  tags: { project: projectId },
104
102
  }, { parent: deployment });
105
- const domainName = new DomainName(resourceName, {
103
+ const domainName = new apigateway.DomainName(resourceName, {
106
104
  domainName: domain.fullName,
107
105
  certificateArn: domain.usEast1CertificateArn,
108
106
  }, { parent: this });
109
- new Record(resourceName, {
107
+ new route53.Record(resourceName, {
110
108
  zoneId: domain.zoneId,
111
109
  name: domain.fullName,
112
110
  type: 'A',
@@ -119,7 +117,7 @@ export class RestApi extends aws.apigateway.RestApi {
119
117
  ],
120
118
  allowOverwrite: true,
121
119
  }, { parent: domainName });
122
- new BasePathMapping(resourceName, {
120
+ new apigateway.BasePathMapping(resourceName, {
123
121
  restApi: this.id,
124
122
  stageName: stage.stageName,
125
123
  domainName: domainName.domainName,
@@ -3,4 +3,3 @@ export * from './RestApi.ts';
3
3
  export declare const rest: {
4
4
  RestApi: typeof RestApi;
5
5
  };
6
- //# sourceMappingURL=index.d.ts.map
@@ -1,12 +1,11 @@
1
- import { Bucket, type BucketArgs } from '@pulumi/aws/s3';
1
+ import { s3 } from '@pulumi/aws';
2
2
  import type { ComponentResourceOptions } from '@pulumi/pulumi';
3
3
  type PublicS3BucketArgs = {
4
4
  name: string;
5
5
  allowPresignedPost?: boolean;
6
- tags?: BucketArgs['tags'];
6
+ tags?: s3.BucketArgs['tags'];
7
7
  };
8
- export declare class PublicS3Bucket extends Bucket {
8
+ export declare class PublicS3Bucket extends s3.Bucket {
9
9
  constructor(id: string, args: PublicS3BucketArgs, opts?: ComponentResourceOptions);
10
10
  }
11
11
  export {};
12
- //# sourceMappingURL=PublicS3Bucket.d.ts.map
@@ -1,24 +1,24 @@
1
- import { Bucket, BucketAclV2, BucketCorsConfigurationV2, BucketOwnershipControls, BucketPolicy, BucketPublicAccessBlock, } from '@pulumi/aws/s3';
2
- export class PublicS3Bucket extends Bucket {
1
+ import { s3 } from '@pulumi/aws';
2
+ export class PublicS3Bucket extends s3.Bucket {
3
3
  constructor(id, args, opts) {
4
4
  const { name, allowPresignedPost = false, tags } = args;
5
5
  super(id, { bucket: name, tags }, opts);
6
- const accessBlock = new BucketPublicAccessBlock('public-access', {
6
+ const accessBlock = new s3.BucketPublicAccessBlock('public-access', {
7
7
  bucket: this.id,
8
8
  blockPublicAcls: false,
9
9
  blockPublicPolicy: false,
10
10
  ignorePublicAcls: false,
11
11
  restrictPublicBuckets: false,
12
12
  }, { parent: this });
13
- const ownershipControls = new BucketOwnershipControls('ownership', {
13
+ const ownershipControls = new s3.BucketOwnershipControls('ownership', {
14
14
  bucket: this.id,
15
15
  rule: { objectOwnership: 'BucketOwnerPreferred' },
16
16
  }, { parent: this, dependsOn: [accessBlock] });
17
- new BucketAclV2('acl', {
17
+ new s3.BucketAclV2('acl', {
18
18
  bucket: this.id,
19
19
  acl: 'public-read',
20
20
  }, { parent: this, dependsOn: [ownershipControls] });
21
- new BucketPolicy('policy', {
21
+ new s3.BucketPolicy('policy', {
22
22
  bucket: this.id,
23
23
  policy: this.arn.apply((arn) => JSON.stringify({
24
24
  Version: '2012-10-17',
@@ -33,7 +33,7 @@ export class PublicS3Bucket extends Bucket {
33
33
  ],
34
34
  })),
35
35
  }, { parent: this, dependsOn: [accessBlock] });
36
- new BucketCorsConfigurationV2('allowAll', {
36
+ new s3.BucketCorsConfigurationV2('allowAll', {
37
37
  bucket: this.bucket,
38
38
  corsRules: [
39
39
  {
@@ -3,4 +3,3 @@ export * from './PublicS3Bucket.ts';
3
3
  export declare const s3: {
4
4
  PublicS3Bucket: typeof PublicS3Bucket;
5
5
  };
6
- //# sourceMappingURL=index.d.ts.map
@@ -15,4 +15,3 @@ export declare class StaticWebsite extends ComponentResource {
15
15
  bucket: PublicS3Bucket;
16
16
  constructor(name: string, args: StaticWebsiteArgs, opts?: ComponentResourceOptions);
17
17
  }
18
- //# sourceMappingURL=StaticWebsite.d.ts.map
@@ -1,8 +1,6 @@
1
1
  import { ComponentResource } from '@pulumi/pulumi';
2
2
  import { s3 } from "../s3/index.js";
3
- import { BucketObject } from '@pulumi/aws/s3';
4
- import { Distribution } from '@pulumi/aws/cloudfront';
5
- import { Record } from '@pulumi/aws/route53';
3
+ import * as aws from '@pulumi/aws';
6
4
  import { readFilesRecursive } from "./readFilesRecursive.js";
7
5
  export class StaticWebsite extends ComponentResource {
8
6
  url;
@@ -18,7 +16,7 @@ export class StaticWebsite extends ComponentResource {
18
16
  },
19
17
  }, { parent: this });
20
18
  for (const file of readFilesRecursive(filesPath)) {
21
- new BucketObject(`${name}-${file.relativePath}`, {
19
+ new aws.s3.BucketObject(`${name}-${file.relativePath}`, {
22
20
  key: file.relativePath,
23
21
  bucket: bucket.id,
24
22
  source: file.absolutePath,
@@ -29,7 +27,7 @@ export class StaticWebsite extends ComponentResource {
29
27
  },
30
28
  }, { parent: bucket });
31
29
  }
32
- const cloudfront = new Distribution(name, {
30
+ const cloudfront = new aws.cloudfront.Distribution(name, {
33
31
  enabled: true,
34
32
  comment: `${projectId} (${environmentName})`,
35
33
  defaultRootObject: 'index.html',
@@ -109,7 +107,7 @@ export class StaticWebsite extends ComponentResource {
109
107
  },
110
108
  }, { parent: this });
111
109
  if (customDomain) {
112
- new Record(name, {
110
+ new aws.route53.Record(name, {
113
111
  zoneId: customDomain?.zoneId,
114
112
  name: customDomain?.fullName,
115
113
  type: 'A',
@@ -3,4 +3,3 @@ export * from './StaticWebsite.ts';
3
3
  export declare const website: {
4
4
  StaticWebsite: typeof StaticWebsite;
5
5
  };
6
- //# sourceMappingURL=index.d.ts.map
@@ -6,4 +6,3 @@ interface File {
6
6
  }
7
7
  export declare function readFilesRecursive(dir: string): File[];
8
8
  export {};
9
- //# sourceMappingURL=readFilesRecursive.d.ts.map
@@ -20,4 +20,3 @@ export declare class WebsocketApi extends ComponentResource {
20
20
  url: string;
21
21
  constructor(resourceName: string, args: WebsocketApiArgs, opts?: ComponentResourceOptions);
22
22
  }
23
- //# sourceMappingURL=WebsocketApi.d.ts.map
@@ -1,14 +1,12 @@
1
1
  import { ComponentResource } from '@pulumi/pulumi';
2
- import { Api, ApiMapping, Deployment, DomainName, Integration, IntegrationResponse, Route, Stage, } from '@pulumi/aws/apigatewayv2';
3
- import { Policy, Role } from '@pulumi/aws/iam';
4
- import { Record } from '@pulumi/aws/route53';
2
+ import { apigatewayv2, iam, route53 } from '@pulumi/aws';
5
3
  export class WebsocketApi extends ComponentResource {
6
4
  id;
7
5
  url;
8
6
  constructor(resourceName, args, opts) {
9
7
  super('mstuercke:websocket:WebsocketApi', resourceName, undefined, opts);
10
8
  const { name, lambdaFunction, routeThrottling, stageName = 'v1', domain, projectId } = args;
11
- const api = new Api(resourceName, {
9
+ const api = new apigatewayv2.Api(resourceName, {
12
10
  name,
13
11
  protocolType: 'WEBSOCKET',
14
12
  routeSelectionExpression: '\\$default',
@@ -16,7 +14,7 @@ export class WebsocketApi extends ComponentResource {
16
14
  project: projectId,
17
15
  },
18
16
  }, { parent: this });
19
- const executeLambdaPolicy = new Policy(resourceName, {
17
+ const executeLambdaPolicy = new iam.Policy(resourceName, {
20
18
  name: `${name}-execute-lambda`,
21
19
  path: '/',
22
20
  policy: {
@@ -33,7 +31,7 @@ export class WebsocketApi extends ComponentResource {
33
31
  project: projectId,
34
32
  },
35
33
  }, { parent: api });
36
- const wsApiRole = new Role(resourceName, {
34
+ const wsApiRole = new iam.Role(resourceName, {
37
35
  name: `${name}-role`,
38
36
  assumeRolePolicy: JSON.stringify({
39
37
  Version: '2012-10-17',
@@ -50,7 +48,7 @@ export class WebsocketApi extends ComponentResource {
50
48
  },
51
49
  managedPolicyArns: [executeLambdaPolicy.arn],
52
50
  }, { parent: api });
53
- const wsLambdaIntegration = new Integration(resourceName, {
51
+ const wsLambdaIntegration = new apigatewayv2.Integration(resourceName, {
54
52
  apiId: api.id,
55
53
  integrationType: 'AWS_PROXY',
56
54
  integrationUri: lambdaFunction.invokeArn,
@@ -58,7 +56,7 @@ export class WebsocketApi extends ComponentResource {
58
56
  contentHandlingStrategy: 'CONVERT_TO_TEXT',
59
57
  passthroughBehavior: 'WHEN_NO_MATCH',
60
58
  }, { parent: this });
61
- new IntegrationResponse(resourceName, {
59
+ new apigatewayv2.IntegrationResponse(resourceName, {
62
60
  apiId: api.id,
63
61
  integrationId: wsLambdaIntegration.id,
64
62
  integrationResponseKey: '/200/',
@@ -66,7 +64,7 @@ export class WebsocketApi extends ComponentResource {
66
64
  const routes = [];
67
65
  const routeKeys = ['$connect', '$default', '$disconnect'];
68
66
  for (const routeKey of routeKeys) {
69
- const route = new Route(`${resourceName}-${routeKey}-route`, {
67
+ const route = new apigatewayv2.Route(`${resourceName}-${routeKey}-route`, {
70
68
  apiId: api.id,
71
69
  routeKey: routeKey,
72
70
  target: wsLambdaIntegration.id.apply((id) => `integrations/${id}`),
@@ -74,13 +72,13 @@ export class WebsocketApi extends ComponentResource {
74
72
  }, { parent: wsLambdaIntegration });
75
73
  routes.push(route);
76
74
  }
77
- const deployment = new Deployment(resourceName, {
75
+ const deployment = new apigatewayv2.Deployment(resourceName, {
78
76
  apiId: api.id,
79
77
  }, {
80
78
  dependsOn: [wsLambdaIntegration, ...routes],
81
79
  parent: api,
82
80
  });
83
- const stage = new Stage(resourceName, {
81
+ const stage = new apigatewayv2.Stage(resourceName, {
84
82
  apiId: api.id,
85
83
  name: stageName,
86
84
  deploymentId: deployment.id,
@@ -92,7 +90,7 @@ export class WebsocketApi extends ComponentResource {
92
90
  project: projectId,
93
91
  },
94
92
  }, { parent: deployment });
95
- const domainName = new DomainName(resourceName, {
93
+ const domainName = new apigatewayv2.DomainName(resourceName, {
96
94
  domainName: domain.fullName,
97
95
  domainNameConfiguration: {
98
96
  certificateArn: domain.euCentral1CertificateArn,
@@ -100,7 +98,7 @@ export class WebsocketApi extends ComponentResource {
100
98
  securityPolicy: 'TLS_1_2',
101
99
  },
102
100
  }, { parent: api });
103
- new Record(resourceName, {
101
+ new route53.Record(resourceName, {
104
102
  zoneId: domain.zoneId,
105
103
  name: domain.fullName,
106
104
  type: 'A',
@@ -113,12 +111,12 @@ export class WebsocketApi extends ComponentResource {
113
111
  ],
114
112
  allowOverwrite: true,
115
113
  }, { parent: api });
116
- new ApiMapping(`${resourceName}-root`, {
114
+ new apigatewayv2.ApiMapping(`${resourceName}-root`, {
117
115
  apiId: api.id,
118
116
  domainName: domainName.id,
119
117
  stage: stage.name,
120
118
  }, { parent: api });
121
- new ApiMapping(`${resourceName}-stage`, {
119
+ new apigatewayv2.ApiMapping(`${resourceName}-stage`, {
122
120
  apiId: api.id,
123
121
  domainName: domainName.id,
124
122
  stage: stage.name,
@@ -3,4 +3,3 @@ export * from './WebsocketApi.ts';
3
3
  export declare const websocket: {
4
4
  WebsocketApi: typeof WebsocketApi;
5
5
  };
6
- //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstuercke/pulumi-modules",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "files": [
5
5
  "dist/**/!(*.test|*.fixture){.d.ts,.js}",
6
6
  "README.md"
@@ -25,12 +25,12 @@
25
25
  "@pulumi/random": "^4.16.7",
26
26
  "@pulumiverse/sentry": "^0.0.9",
27
27
  "@types/mime": "^3.0.4",
28
- "glob": "11.0.1",
28
+ "glob": "11.0.2",
29
29
  "mime": "^3.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@mstuercke/node-utils": "0.0.2",
33
- "typescript": "5.7.3"
32
+ "@mstuercke/node-utils": "0.0.3",
33
+ "typescript": "5.8.3"
34
34
  },
35
35
  "publishConfig": {
36
36
  "registry": "https://registry.npmjs.org/"