@mstuercke/pulumi-modules 1.2.2 → 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.
package/dist/domain/getDomain.js
CHANGED
|
@@ -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
|
|
6
|
-
|
|
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,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentResource } from '@pulumi/pulumi';
|
|
2
|
-
import { Project, ProjectIpAccessList
|
|
2
|
+
import { FlexCluster, Project, ProjectIpAccessList } from '@pulumi/mongodbatlas';
|
|
3
3
|
export class MongoDBCustomInstance extends ComponentResource {
|
|
4
4
|
mongoProjectId;
|
|
5
5
|
connectionString;
|
|
@@ -18,15 +18,16 @@ export class MongoDBCustomInstance extends ComponentResource {
|
|
|
18
18
|
projectId: mongoProject.id,
|
|
19
19
|
cidrBlock: '0.0.0.0/0',
|
|
20
20
|
}, { parent: this });
|
|
21
|
-
const mongoInstance = new
|
|
21
|
+
const mongoInstance = new FlexCluster(name, {
|
|
22
22
|
projectId: mongoProject.id,
|
|
23
23
|
name: `${projectId}-${environmentName}`,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
providerSettings: {
|
|
25
|
+
backingProviderName: 'AWS',
|
|
26
|
+
regionName: 'EU_WEST_1', // Ireland
|
|
27
|
+
},
|
|
27
28
|
}, { parent: this });
|
|
28
29
|
this.mongoProjectId = mongoProject.id;
|
|
29
|
-
this.connectionString = mongoInstance.
|
|
30
|
+
this.connectionString = mongoInstance.connectionStrings.standardSrv;
|
|
30
31
|
this.databaseName = `${projectId}-${environmentName}`;
|
|
31
32
|
}
|
|
32
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mstuercke/pulumi-modules",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/!(*.test|*.fixture){.d.ts,.js}",
|
|
6
6
|
"README.md"
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"typeCheck": "tsc --noEmit",
|
|
15
15
|
"build": "tsc -p tsconfig.build.json",
|
|
16
|
-
"release": "node --no-warnings --
|
|
16
|
+
"release": "node --no-warnings --import ts-node/esm scripts/release.ts"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@mstuercke/pulumi-neon": "1.0.0",
|
|
20
|
-
"@pulumi/archive": "^0.
|
|
20
|
+
"@pulumi/archive": "^0.5.0",
|
|
21
21
|
"@pulumi/auth0": "^3.8.1",
|
|
22
22
|
"@pulumi/aws": "^7.0.0",
|
|
23
|
-
"@pulumi/mongodbatlas": "^
|
|
23
|
+
"@pulumi/mongodbatlas": "^4.0.0",
|
|
24
24
|
"@pulumi/pulumi": "^3.142.0",
|
|
25
25
|
"@pulumi/random": "^4.16.7",
|
|
26
26
|
"@pulumiverse/sentry": "^0.0.9",
|
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@mstuercke/node-utils": "0.0.3",
|
|
33
|
-
"typescript": "
|
|
33
|
+
"@mstuercke/typescript-config": "3.1.0",
|
|
34
|
+
"@types/node": "^24.1.0",
|
|
35
|
+
"typescript": "^6.0.0"
|
|
34
36
|
},
|
|
35
37
|
"publishConfig": {
|
|
36
38
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -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
|
package/dist/mongodb/MongoDB.js
DELETED
|
@@ -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
|
-
}
|