dcl-ops-lib 6.2.0 → 6.3.0
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/acceptAlb.js +1 -2
- package/acceptBastion.js +1 -2
- package/accessTheInternet.js +2 -3
- package/buildStatic.js +1 -2
- package/certificate.js +1 -2
- package/cloudflare.js +4 -5
- package/createBucketWithUser.js +1 -2
- package/createFargateTask.d.ts +2 -0
- package/createFargateTask.js +9 -7
- package/createImageFromContext.js +1 -2
- package/exposePublicService.js +1 -2
- package/getAmi.js +1 -2
- package/getDomainAndSubdomain.js +1 -2
- package/getImageRegistryAndCredentials.js +1 -2
- package/lambda.js +1 -2
- package/network.js +3 -4
- package/package.json +1 -1
- package/prometheus.js +2 -2
- package/secrets.js +1 -2
- package/stack.js +3 -4
- package/supra.js +6 -6
- package/utils.js +2 -3
- package/vpc.js +2 -2
- package/withCache.js +1 -1
package/acceptAlb.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeSecurityGroupAccessibleFromSharedAlb =
|
|
3
|
+
exports.makeSecurityGroupAccessibleFromSharedAlb = makeSecurityGroupAccessibleFromSharedAlb;
|
|
4
4
|
const aws = require("@pulumi/aws");
|
|
5
5
|
const utils_1 = require("./utils");
|
|
6
6
|
const values_1 = require("./values");
|
|
@@ -16,6 +16,5 @@ function makeSecurityGroupAccessibleFromSharedAlb(securityGroup, ruleName = "")
|
|
|
16
16
|
type: "ingress",
|
|
17
17
|
}, { deleteBeforeReplace: true });
|
|
18
18
|
}
|
|
19
|
-
exports.makeSecurityGroupAccessibleFromSharedAlb = makeSecurityGroupAccessibleFromSharedAlb;
|
|
20
19
|
exports.default = makeSecurityGroupAccessibleFromSharedAlb;
|
|
21
20
|
//# sourceMappingURL=acceptAlb.js.map
|
package/acceptBastion.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.makeSecurityGroupAccessibleFromBastion =
|
|
12
|
+
exports.makeSecurityGroupAccessibleFromBastion = makeSecurityGroupAccessibleFromBastion;
|
|
13
13
|
const aws = require("@pulumi/aws");
|
|
14
14
|
const values_1 = require("./values");
|
|
15
15
|
const withCache_1 = require("./withCache");
|
|
@@ -28,6 +28,5 @@ function makeSecurityGroupAccessibleFromBastion(securityGroup, ruleName = "") {
|
|
|
28
28
|
protocol: "-1",
|
|
29
29
|
}, { deleteBeforeReplace: true });
|
|
30
30
|
}
|
|
31
|
-
exports.makeSecurityGroupAccessibleFromBastion = makeSecurityGroupAccessibleFromBastion;
|
|
32
31
|
exports.default = makeSecurityGroupAccessibleFromBastion;
|
|
33
32
|
//# sourceMappingURL=acceptBastion.js.map
|
package/accessTheInternet.js
CHANGED
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.makeSecurityGroupAccessTheInternetV2 = makeSecurityGroupAccessTheInternetV2;
|
|
13
|
+
exports.makeSecurityGroupAccessibleByCloudflare = makeSecurityGroupAccessibleByCloudflare;
|
|
13
14
|
const aws = require("@pulumi/aws");
|
|
14
15
|
const cloudflare = require("@pulumi/cloudflare");
|
|
15
16
|
const utils_1 = require("./utils");
|
|
@@ -25,7 +26,6 @@ function makeSecurityGroupAccessTheInternetV2(securityGroup, ruleName = "") {
|
|
|
25
26
|
type: "egress",
|
|
26
27
|
}, { deleteBeforeReplace: true });
|
|
27
28
|
}
|
|
28
|
-
exports.makeSecurityGroupAccessTheInternetV2 = makeSecurityGroupAccessTheInternetV2;
|
|
29
29
|
/** Enables ingress traffic from cloudflare CIDRs */
|
|
30
30
|
function makeSecurityGroupAccessibleByCloudflare(securityGroup) {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -53,5 +53,4 @@ function makeSecurityGroupAccessibleByCloudflare(securityGroup) {
|
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
exports.makeSecurityGroupAccessibleByCloudflare = makeSecurityGroupAccessibleByCloudflare;
|
|
57
56
|
//# sourceMappingURL=accessTheInternet.js.map
|
package/buildStatic.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildStatic =
|
|
3
|
+
exports.buildStatic = buildStatic;
|
|
4
4
|
const aws = require("@pulumi/aws");
|
|
5
5
|
const pulumi = require("@pulumi/pulumi");
|
|
6
6
|
const certificate_1 = require("./certificate");
|
|
@@ -168,5 +168,4 @@ function buildStatic(staticSite) {
|
|
|
168
168
|
targetDomainEndpoint,
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
exports.buildStatic = buildStatic;
|
|
172
171
|
//# sourceMappingURL=buildStatic.js.map
|
package/certificate.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCertificateFor =
|
|
3
|
+
exports.getCertificateFor = getCertificateFor;
|
|
4
4
|
const getDomainAndSubdomain_1 = require("./getDomainAndSubdomain");
|
|
5
5
|
const CERTIFICATE_ARNS = {
|
|
6
6
|
// Development
|
|
@@ -38,5 +38,4 @@ function getCertificateFor(domain, arn) {
|
|
|
38
38
|
}
|
|
39
39
|
return result;
|
|
40
40
|
}
|
|
41
|
-
exports.getCertificateFor = getCertificateFor;
|
|
42
41
|
//# sourceMappingURL=certificate.js.map
|
package/cloudflare.js
CHANGED
|
@@ -9,7 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.getZoneId = getZoneId;
|
|
13
|
+
exports.getAccountId = getAccountId;
|
|
14
|
+
exports.deployWorker = deployWorker;
|
|
15
|
+
exports.setRecord = setRecord;
|
|
13
16
|
const pulumi = require("@pulumi/pulumi");
|
|
14
17
|
const cloudflare = require("@pulumi/cloudflare");
|
|
15
18
|
const domain_1 = require("./domain");
|
|
@@ -22,7 +25,6 @@ function getZoneId() {
|
|
|
22
25
|
return res.zones[0].id;
|
|
23
26
|
});
|
|
24
27
|
}
|
|
25
|
-
exports.getZoneId = getZoneId;
|
|
26
28
|
function getAccountId() {
|
|
27
29
|
if (process.env.CLOUDFLARE_ACCOUNT_ID) {
|
|
28
30
|
return process.env.CLOUDFLARE_ACCOUNT_ID;
|
|
@@ -31,7 +33,6 @@ function getAccountId() {
|
|
|
31
33
|
throw new Error("CLOUDFLARE_ACCOUNT_ID not set");
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
|
-
exports.getAccountId = getAccountId;
|
|
35
36
|
function deployWorker(workerName, config) {
|
|
36
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
38
|
// get file contents
|
|
@@ -59,7 +60,6 @@ function deployWorker(workerName, config) {
|
|
|
59
60
|
return ret;
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
|
-
exports.deployWorker = deployWorker;
|
|
63
63
|
function setRecord(config) {
|
|
64
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
if (!config.proxied && config.ttl < 120) {
|
|
@@ -77,5 +77,4 @@ function setRecord(config) {
|
|
|
77
77
|
return record;
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
exports.setRecord = setRecord;
|
|
81
80
|
//# sourceMappingURL=cloudflare.js.map
|
package/createBucketWithUser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createBucketWithUser =
|
|
3
|
+
exports.createBucketWithUser = createBucketWithUser;
|
|
4
4
|
const aws = require("@pulumi/aws");
|
|
5
5
|
const pulumi = require("@pulumi/pulumi");
|
|
6
6
|
function createBucketWithUser(name, bucketArgs) {
|
|
@@ -31,7 +31,6 @@ function createBucketWithUser(name, bucketArgs) {
|
|
|
31
31
|
secretAccessKey: unprivilegedUserCreds.secret,
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
exports.createBucketWithUser = createBucketWithUser;
|
|
35
34
|
function publicReadWithUserWrite(userArn, bucketName) {
|
|
36
35
|
return pulumi.interpolate `{
|
|
37
36
|
"Version": "2012-10-17",
|
package/createFargateTask.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as aws from "@pulumi/aws";
|
|
2
2
|
import * as pulumi from "@pulumi/pulumi";
|
|
3
3
|
import { ExtraExposedServiceOptions } from "./exposePublicService";
|
|
4
|
+
import { HealthCheck } from "@pulumi/aws/ecs";
|
|
4
5
|
export declare const getDefaultLogs: (serviceName: string, logGroup: aws.cloudwatch.LogGroup) => aws.ecs.LogConfiguration;
|
|
5
6
|
export declare function getClusterInstance(cluster: string | aws.ecs.Cluster | undefined): Promise<pulumi.Output<string> | string>;
|
|
6
7
|
export type ALBMapping = {
|
|
@@ -21,6 +22,7 @@ export type FargateTaskOptions = {
|
|
|
21
22
|
securityGroups?: (string | pulumi.Output<string>)[];
|
|
22
23
|
cluster?: aws.ecs.Cluster | string;
|
|
23
24
|
healthCheck?: Partial<aws.types.input.alb.TargetGroupHealthCheck>;
|
|
25
|
+
healthCheckContainer?: HealthCheck;
|
|
24
26
|
desiredCount?: number;
|
|
25
27
|
memoryReservation?: number;
|
|
26
28
|
cpuReservation?: number;
|
package/createFargateTask.js
CHANGED
|
@@ -9,7 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.getDefaultLogs = void 0;
|
|
13
|
+
exports.getClusterInstance = getClusterInstance;
|
|
14
|
+
exports.getFargateExecutionRole = getFargateExecutionRole;
|
|
15
|
+
exports.getFargateTaskRole = getFargateTaskRole;
|
|
16
|
+
exports.createFargateTask = createFargateTask;
|
|
17
|
+
exports.createInternalService = createInternalService;
|
|
13
18
|
const aws = require("@pulumi/aws");
|
|
14
19
|
const pulumi = require("@pulumi/pulumi");
|
|
15
20
|
const acceptAlb_1 = require("./acceptAlb");
|
|
@@ -56,7 +61,6 @@ function getClusterInstance(cluster) {
|
|
|
56
61
|
return cluster.arn;
|
|
57
62
|
});
|
|
58
63
|
}
|
|
59
|
-
exports.getClusterInstance = getClusterInstance;
|
|
60
64
|
function getFargateExecutionRole(name, policyArnNamedMap) {
|
|
61
65
|
const assumeRolePolicy = aws.iam.assumeRolePolicyForPrincipal({
|
|
62
66
|
Service: "ecs-tasks.amazonaws.com",
|
|
@@ -79,7 +83,6 @@ function getFargateExecutionRole(name, policyArnNamedMap) {
|
|
|
79
83
|
});
|
|
80
84
|
return { role, policies };
|
|
81
85
|
}
|
|
82
|
-
exports.getFargateExecutionRole = getFargateExecutionRole;
|
|
83
86
|
function getFargateTaskRole(name, policyArnNamedMap) {
|
|
84
87
|
const assumeRolePolicy = aws.iam.assumeRolePolicyForPrincipal({
|
|
85
88
|
Service: "ecs-tasks.amazonaws.com",
|
|
@@ -97,7 +100,6 @@ function getFargateTaskRole(name, policyArnNamedMap) {
|
|
|
97
100
|
});
|
|
98
101
|
return { role, policies };
|
|
99
102
|
}
|
|
100
|
-
exports.getFargateTaskRole = getFargateTaskRole;
|
|
101
103
|
/**
|
|
102
104
|
*
|
|
103
105
|
* @param serviceName A name for this service. For example, "builder-api"
|
|
@@ -112,7 +114,7 @@ exports.getFargateTaskRole = getFargateTaskRole;
|
|
|
112
114
|
*/
|
|
113
115
|
function createFargateTask(serviceName, dockerImage, dockerListeningPort, environment, hostname, options) {
|
|
114
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
-
let { healthCheck, essential, dontExpose, securityGroups, cluster, memoryReservation, command, version, desiredCount, cpuReservation, extraPortMappings, extraALBMappings, executionRolePolicies, taskRolePolicies, ignoreServiceDiscovery, secrets, metrics, dontAssignPublicIp, dependsOn, volumes, deregistrationDelay, mountPoints, repositoryCredentials, team, } = options;
|
|
117
|
+
let { healthCheck, healthCheckContainer, essential, dontExpose, securityGroups, cluster, memoryReservation, command, version, desiredCount, cpuReservation, extraPortMappings, extraALBMappings, executionRolePolicies, taskRolePolicies, ignoreServiceDiscovery, secrets, metrics, dontAssignPublicIp, dependsOn, volumes, deregistrationDelay, mountPoints, repositoryCredentials, team, } = options;
|
|
116
118
|
if (undefined === essential) {
|
|
117
119
|
essential = true;
|
|
118
120
|
}
|
|
@@ -220,6 +222,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
|
|
|
220
222
|
essential,
|
|
221
223
|
image: dockerImage,
|
|
222
224
|
command,
|
|
225
|
+
healthCheck: healthCheckContainer,
|
|
223
226
|
memoryReservation,
|
|
224
227
|
cpu: cpuReservation,
|
|
225
228
|
portMappings: extraPortMappings,
|
|
@@ -272,6 +275,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
|
|
|
272
275
|
essential,
|
|
273
276
|
image: dockerImage,
|
|
274
277
|
command,
|
|
278
|
+
healthCheck: healthCheckContainer,
|
|
275
279
|
memoryReservation,
|
|
276
280
|
cpu: cpuReservation,
|
|
277
281
|
dockerLabels,
|
|
@@ -287,7 +291,6 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
|
|
|
287
291
|
return { endpoint: `https://${hostname}/`, service, exposed };
|
|
288
292
|
});
|
|
289
293
|
}
|
|
290
|
-
exports.createFargateTask = createFargateTask;
|
|
291
294
|
function createInternalService(config) {
|
|
292
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
293
296
|
var _a, _b;
|
|
@@ -354,5 +357,4 @@ function createInternalService(config) {
|
|
|
354
357
|
}, Object.assign(Object.assign({}, extraOpts), { dependsOn }));
|
|
355
358
|
});
|
|
356
359
|
}
|
|
357
|
-
exports.createInternalService = createInternalService;
|
|
358
360
|
//# sourceMappingURL=createFargateTask.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createImageFromContext =
|
|
3
|
+
exports.createImageFromContext = createImageFromContext;
|
|
4
4
|
const aws = require("@pulumi/aws");
|
|
5
5
|
const docker = require("@pulumi/docker");
|
|
6
6
|
const getImageRegistryAndCredentials_1 = require("./getImageRegistryAndCredentials");
|
|
@@ -20,5 +20,4 @@ function createImageFromContext(name, context, options, imageOpts) {
|
|
|
20
20
|
image,
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
exports.createImageFromContext = createImageFromContext;
|
|
24
23
|
//# sourceMappingURL=createImageFromContext.js.map
|
package/exposePublicService.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.exposePublicService =
|
|
12
|
+
exports.exposePublicService = exposePublicService;
|
|
13
13
|
const aws = require("@pulumi/aws");
|
|
14
14
|
const domain_1 = require("./domain");
|
|
15
15
|
const alb_1 = require("./alb");
|
|
@@ -120,5 +120,4 @@ function exposePublicService(name_1, domain_2, port_1) {
|
|
|
120
120
|
};
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
exports.exposePublicService = exposePublicService;
|
|
124
123
|
//# sourceMappingURL=exposePublicService.js.map
|
package/getAmi.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getAmi =
|
|
12
|
+
exports.getAmi = getAmi;
|
|
13
13
|
const aws = require("@pulumi/aws");
|
|
14
14
|
/**
|
|
15
15
|
* @param amiId the ID of the AMI in the Amazon Marketplace
|
|
@@ -31,5 +31,4 @@ function getAmi(amiId, args) {
|
|
|
31
31
|
return ami.id;
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
exports.getAmi = getAmi;
|
|
35
34
|
//# sourceMappingURL=getAmi.js.map
|
package/getDomainAndSubdomain.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDomainAndSubdomain =
|
|
3
|
+
exports.getDomainAndSubdomain = getDomainAndSubdomain;
|
|
4
4
|
// Split a domain name into its subdomain and parent domain names.
|
|
5
5
|
// e.g. "www.example.com" => "www", "example.com".
|
|
6
6
|
function getDomainAndSubdomain(domain) {
|
|
@@ -18,5 +18,4 @@ function getDomainAndSubdomain(domain) {
|
|
|
18
18
|
parentDomain: parts.slice(-2).join(".") + ".",
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
exports.getDomainAndSubdomain = getDomainAndSubdomain;
|
|
22
21
|
//# sourceMappingURL=getDomainAndSubdomain.js.map
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getImageRegistryAndCredentials =
|
|
12
|
+
exports.getImageRegistryAndCredentials = getImageRegistryAndCredentials;
|
|
13
13
|
const aws = require("@pulumi/aws");
|
|
14
14
|
function getImageRegistryAndCredentials(repo) {
|
|
15
15
|
return repo.registryId.apply((registryId) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -29,5 +29,4 @@ function getImageRegistryAndCredentials(repo) {
|
|
|
29
29
|
};
|
|
30
30
|
}));
|
|
31
31
|
}
|
|
32
|
-
exports.getImageRegistryAndCredentials = getImageRegistryAndCredentials;
|
|
33
32
|
//# sourceMappingURL=getImageRegistryAndCredentials.js.map
|
package/lambda.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.createGateway =
|
|
12
|
+
exports.createGateway = createGateway;
|
|
13
13
|
const aws = require("@pulumi/aws");
|
|
14
14
|
const apigateway = require("@pulumi/aws-apigateway");
|
|
15
15
|
const pulumi = require("@pulumi/pulumi");
|
|
@@ -110,7 +110,6 @@ function createGateway(options, fn) {
|
|
|
110
110
|
};
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
exports.createGateway = createGateway;
|
|
114
113
|
function configureApiGatewayDomain(fullyQualifiedDomainName, gateway) {
|
|
115
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116
115
|
const domainParts = (0, getDomainAndSubdomain_1.getDomainAndSubdomain)(fullyQualifiedDomainName);
|
package/network.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getPublicSubnetIds = getPublicSubnetIds;
|
|
4
|
+
exports.getPrivateSubnetIds = getPrivateSubnetIds;
|
|
5
|
+
exports.getInternalSubnetIds = getInternalSubnetIds;
|
|
4
6
|
const supra_1 = require("./supra");
|
|
5
7
|
function getPublicSubnetIds() {
|
|
6
8
|
return supra_1.supra.getOutputValue('vpcPublicSubnetIds');
|
|
7
9
|
}
|
|
8
|
-
exports.getPublicSubnetIds = getPublicSubnetIds;
|
|
9
10
|
function getPrivateSubnetIds() {
|
|
10
11
|
return supra_1.supra.getOutputValue('vpcPrivateSubnetIds');
|
|
11
12
|
}
|
|
12
|
-
exports.getPrivateSubnetIds = getPrivateSubnetIds;
|
|
13
13
|
function getInternalSubnetIds() {
|
|
14
14
|
return supra_1.supra.getOutputValue('vpcInternalSubnetIds');
|
|
15
15
|
}
|
|
16
|
-
exports.getInternalSubnetIds = getInternalSubnetIds;
|
|
17
16
|
//# sourceMappingURL=network.js.map
|
package/package.json
CHANGED
package/prometheus.js
CHANGED
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.prometheusSecurityGroupId = exports.prometheusStack = void 0;
|
|
13
|
+
exports.makeSecurityGroupAccessibleByPrometheus = makeSecurityGroupAccessibleByPrometheus;
|
|
13
14
|
const pulumi = require("@pulumi/pulumi");
|
|
14
15
|
const aws = require("@pulumi/aws");
|
|
15
16
|
const domain_1 = require("./domain");
|
|
@@ -33,5 +34,4 @@ function makeSecurityGroupAccessibleByPrometheus(securityGroup, fromPort = 0, to
|
|
|
33
34
|
securityGroupId: securityGroup.id,
|
|
34
35
|
}, { deleteBeforeReplace: true });
|
|
35
36
|
}
|
|
36
|
-
exports.makeSecurityGroupAccessibleByPrometheus = makeSecurityGroupAccessibleByPrometheus;
|
|
37
37
|
//# sourceMappingURL=prometheus.js.map
|
package/secrets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.secretToSSM =
|
|
3
|
+
exports.secretToSSM = secretToSSM;
|
|
4
4
|
const aws = require("@pulumi/aws");
|
|
5
5
|
function secretToSSM(name, secureString) {
|
|
6
6
|
return new aws.ssm.Parameter(name, {
|
|
@@ -8,5 +8,4 @@ function secretToSSM(name, secureString) {
|
|
|
8
8
|
value: secureString,
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
exports.secretToSSM = secretToSSM;
|
|
12
11
|
//# sourceMappingURL=secrets.js.map
|
package/stack.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getStackId = getStackId;
|
|
4
|
+
exports.getStackScopedName = getStackScopedName;
|
|
5
|
+
exports.getTeam = getTeam;
|
|
4
6
|
const pulumi = require("@pulumi/pulumi");
|
|
5
7
|
const supraConfig = new pulumi.Config("supra");
|
|
6
8
|
function getStackId() {
|
|
7
9
|
return supraConfig.require("stack-id");
|
|
8
10
|
}
|
|
9
|
-
exports.getStackId = getStackId;
|
|
10
11
|
function getStackScopedName(name) {
|
|
11
12
|
const stackId = getStackId();
|
|
12
13
|
if (stackId) {
|
|
@@ -14,9 +15,7 @@ function getStackScopedName(name) {
|
|
|
14
15
|
}
|
|
15
16
|
return name;
|
|
16
17
|
}
|
|
17
|
-
exports.getStackScopedName = getStackScopedName;
|
|
18
18
|
function getTeam() {
|
|
19
19
|
return supraConfig.require("team");
|
|
20
20
|
}
|
|
21
|
-
exports.getTeam = getTeam;
|
|
22
21
|
//# sourceMappingURL=stack.js.map
|
package/supra.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.supra = void 0;
|
|
4
|
+
exports.getDbHostAndPort = getDbHostAndPort;
|
|
5
|
+
exports.getDbHost = getDbHost;
|
|
6
|
+
exports.getDbPort = getDbPort;
|
|
7
|
+
exports.getPublicBastionIp = getPublicBastionIp;
|
|
8
|
+
exports.getInternalServiceDiscoveryNamespaceId = getInternalServiceDiscoveryNamespaceId;
|
|
4
9
|
const pulumi = require("@pulumi/pulumi");
|
|
5
10
|
const domain_1 = require("./domain");
|
|
6
11
|
exports.supra = new pulumi.StackReference(`supra-${domain_1.env}`, {
|
|
@@ -18,24 +23,19 @@ function getDbHostAndPort() {
|
|
|
18
23
|
}
|
|
19
24
|
});
|
|
20
25
|
}
|
|
21
|
-
exports.getDbHostAndPort = getDbHostAndPort;
|
|
22
26
|
// returns "db.hostname.com" from "db.hostname.com:port" Output<string> for the supra shared database
|
|
23
27
|
function getDbHost() {
|
|
24
28
|
return exports.supra.requireOutput("db").apply((db) => db.endpoint.split(":")[0]);
|
|
25
29
|
}
|
|
26
|
-
exports.getDbHost = getDbHost;
|
|
27
30
|
// returns "port" from "db.hostname.com:port" Output<string> for the supra shared database
|
|
28
31
|
function getDbPort() {
|
|
29
32
|
return exports.supra.requireOutput("db").apply((db) => parseInt(db.endpoint.split(":")[1] || DEFAULT_DB_PORT));
|
|
30
33
|
}
|
|
31
|
-
exports.getDbPort = getDbPort;
|
|
32
34
|
// returns the public IP of the bastion
|
|
33
35
|
function getPublicBastionIp() {
|
|
34
36
|
return exports.supra.requireOutput("bastionValues").apply((bastionValues) => bastionValues.publicIp);
|
|
35
37
|
}
|
|
36
|
-
exports.getPublicBastionIp = getPublicBastionIp;
|
|
37
38
|
function getInternalServiceDiscoveryNamespaceId() {
|
|
38
39
|
return exports.supra.requireOutput("internalSdNamespace").apply(($) => $.id);
|
|
39
40
|
}
|
|
40
|
-
exports.getInternalServiceDiscoveryNamespaceId = getInternalServiceDiscoveryNamespaceId;
|
|
41
41
|
//# sourceMappingURL=supra.js.map
|
package/utils.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.sha256hash = sha256hash;
|
|
4
|
+
exports.withRuleName = withRuleName;
|
|
4
5
|
const crypto = require("crypto");
|
|
5
6
|
function sha256hash(s) {
|
|
6
7
|
const shasum = crypto.createHash("sha256");
|
|
7
8
|
shasum.update(s);
|
|
8
9
|
return shasum.digest("hex").substring(0, 8);
|
|
9
10
|
}
|
|
10
|
-
exports.sha256hash = sha256hash;
|
|
11
11
|
function withRuleName(name, ruleName) {
|
|
12
12
|
if (ruleName === null || ruleName === void 0 ? void 0 : ruleName.length) {
|
|
13
13
|
return `${ruleName}-${name}`;
|
|
14
14
|
}
|
|
15
15
|
return name;
|
|
16
16
|
}
|
|
17
|
-
exports.withRuleName = withRuleName;
|
|
18
17
|
//# sourceMappingURL=utils.js.map
|
package/vpc.js
CHANGED
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getVpc =
|
|
12
|
+
exports.getVpc = void 0;
|
|
13
|
+
exports.vpc = vpc;
|
|
13
14
|
const aws = require("@pulumi/aws");
|
|
14
15
|
const supra_1 = require("./supra");
|
|
15
16
|
let vpcReference;
|
|
@@ -23,6 +24,5 @@ function vpc() {
|
|
|
23
24
|
return vpcReference;
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
|
-
exports.vpc = vpc;
|
|
27
27
|
exports.getVpc = vpc;
|
|
28
28
|
//# sourceMappingURL=vpc.js.map
|
package/withCache.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = withCache;
|
|
3
4
|
function withCache(handler) {
|
|
4
5
|
const empty = Symbol('@empty');
|
|
5
6
|
let cache = empty;
|
|
@@ -10,5 +11,4 @@ function withCache(handler) {
|
|
|
10
11
|
return cache;
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
|
-
exports.default = withCache;
|
|
14
14
|
//# sourceMappingURL=withCache.js.map
|