@mstuercke/pulumi-modules 1.2.3 → 1.2.4

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.
@@ -2,8 +2,13 @@ import { acm, route53 } from '@pulumi/aws';
2
2
  export const getDomain = async (options) => {
3
3
  const { usEast1Provider, name } = options;
4
4
  const zone = await route53.getZone({ name });
5
- const euCentral1Certificate = await acm.getCertificate({ domain: name });
6
- const usEast1Certificate = await acm.getCertificate({ domain: name }, { provider: usEast1Provider });
5
+ const certificateArgs = {
6
+ domain: name,
7
+ mostRecent: true,
8
+ statuses: ['PENDING_VALIDATION', 'ISSUED', 'INACTIVE', 'EXPIRED', 'VALIDATION_TIMED_OUT', 'REVOKED', 'FAILED'],
9
+ };
10
+ const euCentral1Certificate = await acm.getCertificate(certificateArgs);
11
+ const usEast1Certificate = await acm.getCertificate(certificateArgs, { provider: usEast1Provider });
7
12
  return {
8
13
  name: zone.name,
9
14
  zoneId: zone.zoneId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstuercke/pulumi-modules",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "files": [
5
5
  "dist/**/!(*.test|*.fixture){.d.ts,.js}",
6
6
  "README.md"
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@mstuercke/pulumi-neon": "1.0.0",
20
- "@pulumi/archive": "^0.3.0",
20
+ "@pulumi/archive": "^0.5.0",
21
21
  "@pulumi/auth0": "^3.8.1",
22
22
  "@pulumi/aws": "^7.0.0",
23
23
  "@pulumi/mongodbatlas": "^4.0.0",
@@ -30,6 +30,8 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@mstuercke/node-utils": "0.0.3",
33
+ "@mstuercke/typescript-config": "3.1.0",
34
+ "@types/node": "^24.1.0",
33
35
  "typescript": "^6.0.0"
34
36
  },
35
37
  "publishConfig": {
@@ -1,18 +0,0 @@
1
- import {
2
- type CustomResourceOptions,
3
- type Output,
4
- Resource,
5
- } from "@pulumi/pulumi";
6
- export type MongoDBArgs = {
7
- organizationId: string;
8
- projectId: string;
9
- environmentName: string;
10
- };
11
- export declare class MongoDB extends Resource {
12
- readonly connectionString: Output<string>;
13
- readonly databaseName: string;
14
- readonly username: string;
15
- readonly password: Output<string>;
16
- constructor(args: MongoDBArgs, opts?: CustomResourceOptions);
17
- }
18
- //# sourceMappingURL=MongoDB.d.ts.map
@@ -1,77 +0,0 @@
1
- import {
2
- DatabaseUser,
3
- Project,
4
- ProjectIpAccessList,
5
- Provider,
6
- ServerlessInstance,
7
- } from "@pulumi/mongodbatlas";
8
- import { Resource } from "@pulumi/pulumi";
9
- import { RandomPassword } from "@pulumi/random";
10
- export class MongoDB extends Resource {
11
- connectionString;
12
- databaseName;
13
- username;
14
- password;
15
- constructor(args, opts) {
16
- const { organizationId, projectId, environmentName } = args;
17
- super("mstuercke:mongodb:MongoDB", organizationId, false, undefined, opts);
18
- new Provider("provider", {}, { parent: this });
19
- const mongoProject = new Project(
20
- "project",
21
- {
22
- orgId: organizationId,
23
- name: `${projectId}-${environmentName}`,
24
- tags: {
25
- project: projectId,
26
- },
27
- },
28
- { parent: this },
29
- );
30
- new ProjectIpAccessList(
31
- "network-access",
32
- {
33
- projectId: mongoProject.id,
34
- cidrBlock: "0.0.0.0/0",
35
- },
36
- { parent: mongoProject },
37
- );
38
- const mongoInstance = new ServerlessInstance(
39
- "database",
40
- {
41
- projectId: mongoProject.id,
42
- name: `${projectId}-${environmentName}`,
43
- providerSettingsBackingProviderName: "AWS",
44
- providerSettingsProviderName: "SERVERLESS",
45
- providerSettingsRegionName: "EU_WEST_1", // Ireland
46
- },
47
- { parent: mongoProject },
48
- );
49
- const username = `${projectId}-${environmentName}`;
50
- const password = new RandomPassword(
51
- "password",
52
- {
53
- length: 32,
54
- },
55
- { parent: mongoProject },
56
- );
57
- const databaseName = projectId;
58
- new DatabaseUser(
59
- "user",
60
- {
61
- projectId: mongoProject.id,
62
- username,
63
- password: password.result,
64
- authDatabaseName: "admin",
65
- roles: [
66
- { roleName: "dbAdmin", databaseName },
67
- { roleName: "readWrite", databaseName },
68
- ],
69
- },
70
- { parent: mongoProject },
71
- );
72
- this.connectionString = mongoInstance.connectionStringsStandardSrv;
73
- this.databaseName = databaseName;
74
- this.username = username;
75
- this.password = password.result;
76
- }
77
- }