dcl-ops-lib 5.23.2 → 5.23.3
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.d.ts +2 -1
- package/acceptAlb.js +4 -3
- package/acceptBastion.d.ts +3 -1
- package/acceptBastion.js +15 -3
- package/accessTheInternet.d.ts +2 -2
- package/accessTheInternet.js +3 -3
- package/createFargateTask.js +4 -4
- package/package.json +1 -1
- package/prometheus.d.ts +5 -1
- package/prometheus.js +16 -3
package/acceptAlb.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import * as awsx from "@pulumi/awsx";
|
|
|
3
3
|
export declare const acceptAlbSecurityGroup: () => Promise<awsx.ec2.SecurityGroup>;
|
|
4
4
|
/** @deprecated use makeSecurityGroupAccessibleFromSharedAlb instead */
|
|
5
5
|
export declare function acceptAlbSecurityGroupId(): Promise<import("@pulumi/pulumi").Output<string>>;
|
|
6
|
+
/** @deprecated use makeSecurityGroupAccessibleFromSharedAlbV2 */
|
|
7
|
+
export declare function makeSecurityGroupAccessibleFromSharedAlb(securityGroup: awsx.ec2.SecurityGroup): void;
|
|
6
8
|
/** @deprecated Makes a given securityGropup accesible by the shared supra ALB */
|
|
7
|
-
export declare function makeSecurityGroupAccessibleFromSharedAlb(securityGroup: awsx.ec2.SecurityGroup, ruleName?: string): void;
|
|
8
9
|
export declare function makeSecurityGroupAccessibleFromSharedAlbV2(securityGroup: awsx.ec2.SecurityGroup, ruleName?: string): void;
|
|
9
10
|
export default acceptAlbSecurityGroup;
|
package/acceptAlb.js
CHANGED
|
@@ -27,9 +27,9 @@ function acceptAlbSecurityGroupId() {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
exports.acceptAlbSecurityGroupId = acceptAlbSecurityGroupId;
|
|
30
|
-
/** @deprecated
|
|
31
|
-
function makeSecurityGroupAccessibleFromSharedAlb(securityGroup
|
|
32
|
-
new awsx.ec2.IngressSecurityGroupRule(
|
|
30
|
+
/** @deprecated use makeSecurityGroupAccessibleFromSharedAlbV2 */
|
|
31
|
+
function makeSecurityGroupAccessibleFromSharedAlb(securityGroup) {
|
|
32
|
+
new awsx.ec2.IngressSecurityGroupRule("accept-alb-ingress-rule", securityGroup, {
|
|
33
33
|
sourceSecurityGroupId: (0, values_1.getEnvConfiguration)().then(($) => $.albSecurityGroupId),
|
|
34
34
|
description: `Allow access from the supra ALB`,
|
|
35
35
|
fromPort: 0,
|
|
@@ -38,6 +38,7 @@ function makeSecurityGroupAccessibleFromSharedAlb(securityGroup, ruleName = "")
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
exports.makeSecurityGroupAccessibleFromSharedAlb = makeSecurityGroupAccessibleFromSharedAlb;
|
|
41
|
+
/** @deprecated Makes a given securityGropup accesible by the shared supra ALB */
|
|
41
42
|
function makeSecurityGroupAccessibleFromSharedAlbV2(securityGroup, ruleName = "") {
|
|
42
43
|
new aws.ec2.SecurityGroupRule((0, utils_1.withRuleName)("accept-alb-ingress-rule-v2", ruleName), {
|
|
43
44
|
securityGroupId: securityGroup.id,
|
package/acceptBastion.d.ts
CHANGED
|
@@ -3,5 +3,7 @@ import * as awsx from "@pulumi/awsx";
|
|
|
3
3
|
export declare const acceptBastionSecurityGroup: () => Promise<awsx.ec2.SecurityGroup>;
|
|
4
4
|
/** @deprecated please use makeSecurityGroupAccessTheInternet */
|
|
5
5
|
export declare function acceptBastionSecurityGroupId(): Promise<import("@pulumi/pulumi").Output<string>>;
|
|
6
|
-
|
|
6
|
+
/** @deprecated use makeSecurityGroupAccessibleFromBastionV2 */
|
|
7
|
+
export declare function makeSecurityGroupAccessibleFromBastion(securityGroup: awsx.ec2.SecurityGroup): void;
|
|
8
|
+
export declare function makeSecurityGroupAccessibleFromBastionV2(securityGroup: awsx.ec2.SecurityGroup, ruleName?: string): void;
|
|
7
9
|
export default acceptBastionSecurityGroup;
|
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 = exports.acceptBastionSecurityGroupId = exports.acceptBastionSecurityGroup = void 0;
|
|
12
|
+
exports.makeSecurityGroupAccessibleFromBastionV2 = exports.makeSecurityGroupAccessibleFromBastion = exports.acceptBastionSecurityGroupId = exports.acceptBastionSecurityGroup = void 0;
|
|
13
13
|
const awsx = require("@pulumi/awsx");
|
|
14
14
|
const aws = require("@pulumi/aws");
|
|
15
15
|
const values_1 = require("./values");
|
|
@@ -31,8 +31,9 @@ const bastionSecurityGroupId = (0, withCache_1.default)(() => __awaiter(void 0,
|
|
|
31
31
|
const config = yield (0, values_1.getEnvConfiguration)();
|
|
32
32
|
return config.bastionSecurityGroupId;
|
|
33
33
|
}));
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
/** @deprecated use makeSecurityGroupAccessibleFromBastionV2 */
|
|
35
|
+
function makeSecurityGroupAccessibleFromBastion(securityGroup) {
|
|
36
|
+
new aws.ec2.SecurityGroupRule("accesible-from-bastion", {
|
|
36
37
|
securityGroupId: securityGroup.id,
|
|
37
38
|
sourceSecurityGroupId: bastionSecurityGroupId(),
|
|
38
39
|
fromPort: -1,
|
|
@@ -42,5 +43,16 @@ function makeSecurityGroupAccessibleFromBastion(securityGroup, ruleName = "") {
|
|
|
42
43
|
}, { deleteBeforeReplace: true });
|
|
43
44
|
}
|
|
44
45
|
exports.makeSecurityGroupAccessibleFromBastion = makeSecurityGroupAccessibleFromBastion;
|
|
46
|
+
function makeSecurityGroupAccessibleFromBastionV2(securityGroup, ruleName = "") {
|
|
47
|
+
new aws.ec2.SecurityGroupRule((0, utils_1.withRuleName)("accesible-from-bastion-v2", ruleName), {
|
|
48
|
+
securityGroupId: securityGroup.id,
|
|
49
|
+
sourceSecurityGroupId: bastionSecurityGroupId(),
|
|
50
|
+
fromPort: -1,
|
|
51
|
+
toPort: -1,
|
|
52
|
+
type: "ingress",
|
|
53
|
+
protocol: "-1",
|
|
54
|
+
}, { deleteBeforeReplace: true });
|
|
55
|
+
}
|
|
56
|
+
exports.makeSecurityGroupAccessibleFromBastionV2 = makeSecurityGroupAccessibleFromBastionV2;
|
|
45
57
|
exports.default = exports.acceptBastionSecurityGroup;
|
|
46
58
|
//# sourceMappingURL=acceptBastion.js.map
|
package/accessTheInternet.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export declare function accessTheInternetSecurityGroupId(): Promise<import("@pul
|
|
|
8
8
|
export default accessTheInternetSecurityGroup;
|
|
9
9
|
/** @deprecated please use makeSecurityGroupAccessibleByCloudflare */
|
|
10
10
|
export declare function accessFromCloudflareSecurityGroup(): Promise<import("@pulumi/pulumi").Output<string>>;
|
|
11
|
-
/**
|
|
12
|
-
export declare function makeSecurityGroupAccessTheInternet(securityGroup: awsx.ec2.SecurityGroup
|
|
11
|
+
/** @deprecated use makeSecurityGroupAccessTheInternetV2 */
|
|
12
|
+
export declare function makeSecurityGroupAccessTheInternet(securityGroup: awsx.ec2.SecurityGroup): void;
|
|
13
13
|
/** Enables egress traffic to 0.0.0.0/0/all */
|
|
14
14
|
export declare function makeSecurityGroupAccessTheInternetV2(securityGroup: awsx.ec2.SecurityGroup, ruleName?: string): void;
|
|
15
15
|
/** Enables ingress traffic from cloudflare CIDRs */
|
package/accessTheInternet.js
CHANGED
|
@@ -42,9 +42,9 @@ function accessFromCloudflareSecurityGroup() {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
exports.accessFromCloudflareSecurityGroup = accessFromCloudflareSecurityGroup;
|
|
45
|
-
/**
|
|
46
|
-
function makeSecurityGroupAccessTheInternet(securityGroup
|
|
47
|
-
securityGroup.createEgressRule(
|
|
45
|
+
/** @deprecated use makeSecurityGroupAccessTheInternetV2 */
|
|
46
|
+
function makeSecurityGroupAccessTheInternet(securityGroup) {
|
|
47
|
+
securityGroup.createEgressRule("access-the-internet", {
|
|
48
48
|
cidrBlocks: ["0.0.0.0/0"],
|
|
49
49
|
fromPort: -1,
|
|
50
50
|
toPort: -1,
|
package/createFargateTask.js
CHANGED
|
@@ -186,12 +186,12 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
|
|
|
186
186
|
serviceDiscoveryPort = port;
|
|
187
187
|
});
|
|
188
188
|
// enable prometheus to access fromPort-toPort
|
|
189
|
-
(0, prometheus_1.makeSecurityGroupAccessibleByPrometheus)(taskSecurityGroup, fromPort, toPort
|
|
189
|
+
(0, prometheus_1.makeSecurityGroupAccessibleByPrometheus)(taskSecurityGroup, fromPort, toPort);
|
|
190
190
|
}
|
|
191
191
|
// enable egress traffic from the task to the internet
|
|
192
|
-
(0, accessTheInternet_1.makeSecurityGroupAccessTheInternet)(taskSecurityGroup
|
|
192
|
+
(0, accessTheInternet_1.makeSecurityGroupAccessTheInternet)(taskSecurityGroup);
|
|
193
193
|
// make the container fully accessible from the bastion of the environment
|
|
194
|
-
(0, acceptBastion_1.makeSecurityGroupAccessibleFromBastion)(taskSecurityGroup
|
|
194
|
+
(0, acceptBastion_1.makeSecurityGroupAccessibleFromBastion)(taskSecurityGroup);
|
|
195
195
|
if (dontExpose) {
|
|
196
196
|
const service = yield createInternalService({
|
|
197
197
|
serviceName,
|
|
@@ -230,7 +230,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
|
|
|
230
230
|
}
|
|
231
231
|
const portMapping = exposed.targetGroup;
|
|
232
232
|
// make the service accesible by the ALB
|
|
233
|
-
(0, acceptAlb_1.makeSecurityGroupAccessibleFromSharedAlb)(taskSecurityGroup
|
|
233
|
+
(0, acceptAlb_1.makeSecurityGroupAccessibleFromSharedAlb)(taskSecurityGroup);
|
|
234
234
|
const service = yield createInternalService({
|
|
235
235
|
serviceName,
|
|
236
236
|
cluster,
|
package/package.json
CHANGED
package/prometheus.d.ts
CHANGED
|
@@ -2,4 +2,8 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
2
2
|
import * as awsx from "@pulumi/awsx";
|
|
3
3
|
export declare const prometheusStack: () => Promise<pulumi.StackReference>;
|
|
4
4
|
export declare const prometheusSecurityGroupId: () => Promise<string>;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated use makeSecurityGroupAccessibleByPrometheusV2
|
|
7
|
+
*/
|
|
8
|
+
export declare function makeSecurityGroupAccessibleByPrometheus(securityGroup: awsx.ec2.SecurityGroup, fromPort?: number, toPort?: number): void;
|
|
9
|
+
export declare function makeSecurityGroupAccessibleByPrometheusV2(securityGroup: awsx.ec2.SecurityGroup, fromPort?: number, toPort?: number, ruleName?: string): void;
|
package/prometheus.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.makeSecurityGroupAccessibleByPrometheus = exports.prometheusSecurityGroupId = exports.prometheusStack = void 0;
|
|
12
|
+
exports.makeSecurityGroupAccessibleByPrometheusV2 = exports.makeSecurityGroupAccessibleByPrometheus = exports.prometheusSecurityGroupId = exports.prometheusStack = void 0;
|
|
13
13
|
const pulumi = require("@pulumi/pulumi");
|
|
14
14
|
const awsx = require("@pulumi/awsx");
|
|
15
15
|
const domain_1 = require("./domain");
|
|
@@ -22,8 +22,11 @@ exports.prometheusSecurityGroupId = (0, withCache_1.default)(() => __awaiter(voi
|
|
|
22
22
|
const prom = yield (0, exports.prometheusStack)();
|
|
23
23
|
return (yield prom.requireOutputValue("prometheusSecurityGroupId"));
|
|
24
24
|
}));
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated use makeSecurityGroupAccessibleByPrometheusV2
|
|
27
|
+
*/
|
|
28
|
+
function makeSecurityGroupAccessibleByPrometheus(securityGroup, fromPort = 0, toPort = 0) {
|
|
29
|
+
new awsx.ec2.IngressSecurityGroupRule(`accept-prom-${fromPort}-${toPort}`, securityGroup, {
|
|
27
30
|
sourceSecurityGroupId: (0, exports.prometheusSecurityGroupId)(),
|
|
28
31
|
description: `Allow access from prometheus`,
|
|
29
32
|
fromPort,
|
|
@@ -32,4 +35,14 @@ function makeSecurityGroupAccessibleByPrometheus(securityGroup, fromPort = 0, to
|
|
|
32
35
|
});
|
|
33
36
|
}
|
|
34
37
|
exports.makeSecurityGroupAccessibleByPrometheus = makeSecurityGroupAccessibleByPrometheus;
|
|
38
|
+
function makeSecurityGroupAccessibleByPrometheusV2(securityGroup, fromPort = 0, toPort = 0, ruleName = "") {
|
|
39
|
+
new awsx.ec2.IngressSecurityGroupRule((0, utils_1.withRuleName)(`accept-prom-${fromPort}-${toPort}-v2`, ruleName), securityGroup, {
|
|
40
|
+
sourceSecurityGroupId: (0, exports.prometheusSecurityGroupId)(),
|
|
41
|
+
description: `Allow access from prometheus`,
|
|
42
|
+
fromPort,
|
|
43
|
+
toPort,
|
|
44
|
+
protocol: "-1",
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
exports.makeSecurityGroupAccessibleByPrometheusV2 = makeSecurityGroupAccessibleByPrometheusV2;
|
|
35
48
|
//# sourceMappingURL=prometheus.js.map
|