dcl-ops-lib 5.23.2 → 5.24.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.
@@ -20,5 +20,12 @@ export declare type StaticWebsite = {
20
20
  * Default: false
21
21
  */
22
22
  unprotect?: boolean;
23
+ /**
24
+ * Delete EVERYTHING from the buckets, leave always in false until
25
+ * deletion of buckets is required.
26
+ *
27
+ * Default: false
28
+ */
29
+ destroy?: boolean;
23
30
  priceClass?: "PriceClass_All" | "PriceClass_200" | "PriceClass_100";
24
31
  };
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 Makes a given securityGropup accesible by the shared supra ALB */
31
- function makeSecurityGroupAccessibleFromSharedAlb(securityGroup, ruleName = "") {
32
- new awsx.ec2.IngressSecurityGroupRule((0, utils_1.withRuleName)("accept-alb-ingress-rule", ruleName), securityGroup, {
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,
@@ -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
- export declare function makeSecurityGroupAccessibleFromBastion(securityGroup: awsx.ec2.SecurityGroup, ruleName?: string): void;
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
- function makeSecurityGroupAccessibleFromBastion(securityGroup, ruleName = "") {
35
- new aws.ec2.SecurityGroupRule((0, utils_1.withRuleName)("accesible-from-bastion", ruleName), {
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
@@ -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
- /** Enables egress traffic to 0.0.0.0/0/all */
12
- export declare function makeSecurityGroupAccessTheInternet(securityGroup: awsx.ec2.SecurityGroup, ruleName?: string): void;
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 */
@@ -42,9 +42,9 @@ function accessFromCloudflareSecurityGroup() {
42
42
  });
43
43
  }
44
44
  exports.accessFromCloudflareSecurityGroup = accessFromCloudflareSecurityGroup;
45
- /** Enables egress traffic to 0.0.0.0/0/all */
46
- function makeSecurityGroupAccessTheInternet(securityGroup, ruleName = "") {
47
- securityGroup.createEgressRule((0, utils_1.withRuleName)("access-the-internet", ruleName), {
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/buildStatic.js CHANGED
@@ -30,6 +30,7 @@ function buildStatic(staticSite) {
30
30
  indexDocument: "index.html",
31
31
  errorDocument: (_a = staticSite.defaultPath) !== null && _a !== void 0 ? _a : "404.html",
32
32
  },
33
+ forceDestroy: staticSite.destroy === true
33
34
  };
34
35
  if (staticSite.corsRules !== undefined) {
35
36
  Object.assign(bucketInfo, { corsRules: staticSite.corsRules });
@@ -40,6 +41,7 @@ function buildStatic(staticSite) {
40
41
  // logsBucket is an S3 bucket that will contain the CDN's request logs.
41
42
  const logsBucket = new aws.s3.Bucket(slug + "logs", {
42
43
  acl: "private",
44
+ forceDestroy: staticSite.destroy === true
43
45
  }, {
44
46
  protect,
45
47
  });
package/certificate.js CHANGED
@@ -4,8 +4,8 @@ exports.getCertificateFor = void 0;
4
4
  const getDomainAndSubdomain_1 = require("./getDomainAndSubdomain");
5
5
  const CERTIFICATE_ARNS = {
6
6
  // Development
7
- "decentraland.io": "arn:aws:acm:us-east-1:564327678575:certificate/0e9bc16e-6a3c-4e2d-a93c-314bdab51261",
8
- "decentraland.zone": "arn:aws:acm:us-east-1:564327678575:certificate/8123afb1-a8b5-415f-996e-37b099cc3baa",
7
+ "decentraland.io": "arn:aws:acm:us-east-1:564327678575:certificate/5e4d2d87-7429-4767-bd70-7ba4093ff639",
8
+ "decentraland.zone": "arn:aws:acm:us-east-1:564327678575:certificate/5e4d2d87-7429-4767-bd70-7ba4093ff639",
9
9
  // Staging
10
10
  "decentraland.net": "arn:aws:acm:us-east-1:000333518097:certificate/155d0080-cb6c-46a1-9cbf-f74cccb54c2c",
11
11
  "decentraland.today": "arn:aws:acm:us-east-1:000333518097:certificate/155d0080-cb6c-46a1-9cbf-f74cccb54c2c",
@@ -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, serviceName);
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, serviceName);
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, serviceName);
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, serviceName);
233
+ (0, acceptAlb_1.makeSecurityGroupAccessibleFromSharedAlb)(taskSecurityGroup);
234
234
  const service = yield createInternalService({
235
235
  serviceName,
236
236
  cluster,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "5.23.2",
3
+ "version": "5.24.0",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* .",
6
6
  "clean": "rm *.d.ts *.js *.js.map"
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
- export declare function makeSecurityGroupAccessibleByPrometheus(securityGroup: awsx.ec2.SecurityGroup, fromPort?: number, toPort?: number, ruleName?: string): void;
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
- function makeSecurityGroupAccessibleByPrometheus(securityGroup, fromPort = 0, toPort = 0, ruleName = "") {
26
- new awsx.ec2.IngressSecurityGroupRule((0, utils_1.withRuleName)(`accept-prom-${fromPort}-${toPort}`, ruleName), securityGroup, {
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