dcl-ops-lib 6.0.1 → 6.0.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/acceptDb.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import * as aws from "@pulumi/aws";
2
2
  export declare const acceptDbSecurityGroup: () => Promise<aws.ec2.GetSecurityGroupResult>;
3
- export declare function acceptDbSecurityGroupId(): Promise<string>;
3
+ export declare const acceptDbSecurityGroupId: () => Promise<string>;
4
4
  export default acceptDbSecurityGroup;
package/acceptDb.js CHANGED
@@ -15,13 +15,11 @@ const values_1 = require("./values");
15
15
  const withCache_1 = require("./withCache");
16
16
  exports.acceptDbSecurityGroup = (0, withCache_1.default)(() => __awaiter(void 0, void 0, void 0, function* () {
17
17
  const config = yield (0, values_1.getEnvConfiguration)();
18
- return aws.ec2.getSecurityGroup({ name: config.dbSecurity });
18
+ return aws.ec2.getSecurityGroup({ id: config.dbSecurity });
19
+ }));
20
+ exports.acceptDbSecurityGroupId = (0, withCache_1.default)(() => __awaiter(void 0, void 0, void 0, function* () {
21
+ const config = yield (0, values_1.getEnvConfiguration)();
22
+ return config.dbSecurity;
19
23
  }));
20
- function acceptDbSecurityGroupId() {
21
- return __awaiter(this, void 0, void 0, function* () {
22
- return (yield (0, exports.acceptDbSecurityGroup)()).id;
23
- });
24
- }
25
- exports.acceptDbSecurityGroupId = acceptDbSecurityGroupId;
26
24
  exports.default = exports.acceptDbSecurityGroup;
27
25
  //# sourceMappingURL=acceptDb.js.map
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.1",
3
+ "version": "6.0.3",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"