@mstuercke/pulumi-modules 1.1.0 → 1.2.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.
|
@@ -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
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentResource, output } from '@pulumi/pulumi';
|
|
2
|
-
import {
|
|
2
|
+
import { getFlexCluster, getProject } from '@pulumi/mongodbatlas';
|
|
3
3
|
export class MongoDBDefaultInstance extends ComponentResource {
|
|
4
4
|
mongoProjectId;
|
|
5
5
|
connectionString;
|
|
@@ -8,12 +8,12 @@ export class MongoDBDefaultInstance extends ComponentResource {
|
|
|
8
8
|
const { projectId, environmentName } = args;
|
|
9
9
|
super('mstuercke:mongodb:MongoDBDefaultInstance', name, undefined, opts);
|
|
10
10
|
const mongoProject = output(getProject({ name: 'default' }));
|
|
11
|
-
const mongoInstance = mongoProject.id.apply((mongoProjectId) => output(
|
|
11
|
+
const mongoInstance = mongoProject.id.apply((mongoProjectId) => output(getFlexCluster({
|
|
12
12
|
projectId: mongoProjectId,
|
|
13
13
|
name: 'default',
|
|
14
14
|
})));
|
|
15
15
|
this.mongoProjectId = mongoProject.id;
|
|
16
|
-
this.connectionString = mongoInstance.
|
|
16
|
+
this.connectionString = mongoInstance.connectionStrings.standardSrv;
|
|
17
17
|
this.databaseName = `${projectId}-${environmentName}`;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -38,7 +38,7 @@ export class PublicS3Bucket extends s3.Bucket {
|
|
|
38
38
|
corsRules: [
|
|
39
39
|
{
|
|
40
40
|
maxAgeSeconds: 3000,
|
|
41
|
-
allowedMethods: allowPresignedPost ? ['GET', 'POST'] : ['GET'],
|
|
41
|
+
allowedMethods: allowPresignedPost ? ['GET', 'POST', 'PUT'] : ['GET'],
|
|
42
42
|
allowedHeaders: ['*'],
|
|
43
43
|
allowedOrigins: ['*'],
|
|
44
44
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mstuercke/pulumi-modules",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/!(*.test|*.fixture){.d.ts,.js}",
|
|
6
6
|
"README.md"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@pulumi/random": "^4.16.7",
|
|
26
26
|
"@pulumiverse/sentry": "^0.0.9",
|
|
27
27
|
"@types/mime": "^3.0.4",
|
|
28
|
-
"glob": "^
|
|
28
|
+
"glob": "^13.0.6",
|
|
29
29
|
"mime": "^3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|