dcl-ops-lib 6.0.2 → 6.0.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.
@@ -15,7 +15,8 @@ const cloudflare = require("@pulumi/cloudflare");
15
15
  const utils_1 = require("./utils");
16
16
  /** Enables egress traffic to 0.0.0.0/0/all */
17
17
  function makeSecurityGroupAccessTheInternetV2(securityGroup, ruleName = "") {
18
- new aws.ec2.SecurityGroupRule((0, utils_1.withRuleName)("access-the-internet-v2", ruleName), {
18
+ new aws.ec2.SecurityGroupRule((0, utils_1.withRuleName)("access-internet-v2", ruleName), {
19
+ description: `Allow access to the internet`,
19
20
  securityGroupId: securityGroup.id,
20
21
  cidrBlocks: ["0.0.0.0/0"],
21
22
  fromPort: 65000,
package/alb.js CHANGED
@@ -23,9 +23,9 @@ const cache = {
23
23
  };
24
24
  exports.getAlb = (0, withCache_1.default)(() => __awaiter(void 0, void 0, void 0, function* () {
25
25
  const dns = yield supra_1.supra.getOutputValue("dns");
26
- const loadBalancer = yield supra_1.supra.getOutputDetails("albInstance");
26
+ const loadBalancer = yield supra_1.supra.getOutputValue("albInstance");
27
27
  const elbValues = yield supra_1.supra.getOutputValue("elbValues");
28
- const alb = yield aws.lb.getLoadBalancer({ arn: JSON.parse(loadBalancer.value).arn });
28
+ const alb = yield aws.lb.getLoadBalancer({ arn: loadBalancer.arn });
29
29
  const listener = yield aws.lb.getListener({ arn: elbValues.listenerArn });
30
30
  return { dns, alb, listener };
31
31
  }));
@@ -190,12 +190,12 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
190
190
  serviceDiscoveryPort = port;
191
191
  });
192
192
  // enable prometheus to access fromPort-toPort
193
- (0, prometheus_1.makeSecurityGroupAccessibleByPrometheus)(taskSecurityGroup, fromPort, toPort);
193
+ (0, prometheus_1.makeSecurityGroupAccessibleByPrometheus)(taskSecurityGroup, fromPort, toPort, serviceName);
194
194
  }
195
195
  // enable egress traffic from the task to the internet
196
- (0, accessTheInternet_1.makeSecurityGroupAccessTheInternetV2)(taskSecurityGroup);
196
+ (0, accessTheInternet_1.makeSecurityGroupAccessTheInternetV2)(taskSecurityGroup, serviceName);
197
197
  // make the container fully accessible from the bastion of the environment
198
- (0, acceptBastion_1.makeSecurityGroupAccessibleFromBastion)(taskSecurityGroup);
198
+ (0, acceptBastion_1.makeSecurityGroupAccessibleFromBastion)(taskSecurityGroup, serviceName);
199
199
  if (dontExpose) {
200
200
  const service = yield createInternalService({
201
201
  serviceName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "6.0.2",
3
+ "version": "6.0.4",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"
package/prometheus.js CHANGED
@@ -23,7 +23,7 @@ exports.prometheusSecurityGroupId = (0, withCache_1.default)(() => __awaiter(voi
23
23
  return (yield prom.requireOutputValue("prometheusSecurityGroupId"));
24
24
  }));
25
25
  function makeSecurityGroupAccessibleByPrometheus(securityGroup, fromPort = 0, toPort = 0, ruleName = "") {
26
- new aws.ec2.SecurityGroupRule((0, utils_1.withRuleName)("access-the-internet-v2", ruleName), {
26
+ new aws.ec2.SecurityGroupRule((0, utils_1.withRuleName)("allow-prometheus", ruleName), {
27
27
  sourceSecurityGroupId: (0, exports.prometheusSecurityGroupId)(),
28
28
  description: `Allow access from prometheus`,
29
29
  fromPort,