@gradientedge/cdk-utils 8.18.0 → 8.20.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.
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "scripts": {
15
15
  "build": "yarn package:function",
16
- "init": "yarn install",
16
+ "initialise": "yarn install",
17
17
  "package:function": "mkdirp layers/nodejs && cp -R package.json layers/nodejs && cd layers/nodejs && yarn install --production --no-lockfile",
18
18
  "start": "node dist/index",
19
19
  "test": "npx jest --ci --runInBand --passWithNoTests"
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "scripts": {
15
15
  "build": "yarn package:function",
16
- "init": "yarn install",
16
+ "initialise": "yarn install",
17
17
  "package:function": "mkdirp layers/nodejs && cp -R package.json layers/nodejs && cd layers/nodejs && yarn install --production --no-lockfile",
18
18
  "start": "node dist/index",
19
19
  "test": "npx jest --ci --runInBand --passWithNoTests"
@@ -93,6 +93,7 @@ class SiteWithEcsBackend extends common_1.CommonConstruct {
93
93
  this.resolveCertificate();
94
94
  this.resolveSiteSecrets();
95
95
  this.resolveSiteDomainNames();
96
+ this.createSiteLogBucket();
96
97
  this.createVpc();
97
98
  this.createEcsPolicy();
98
99
  this.createEcsRole();
@@ -102,7 +103,6 @@ class SiteWithEcsBackend extends common_1.CommonConstruct {
102
103
  this.createEcsBuildArgs();
103
104
  this.createEcsContainerImage();
104
105
  this.createEcsService();
105
- this.createSiteLogBucket();
106
106
  this.createSiteOrigin();
107
107
  this.createSiteCloudfrontFunction();
108
108
  this.resolveSiteFunctionAssociations();
@@ -267,6 +267,7 @@ class SiteWithEcsBackend extends common_1.CommonConstruct {
267
267
  this.siteEcsListener = fargateService.listener;
268
268
  this.siteEcsLoadBalancer = fargateService.loadBalancer;
269
269
  this.siteEcsTargetGroup = fargateService.targetGroup;
270
+ fargateService.loadBalancer.logAccessLogs(this.siteLogBucket, 'alb');
270
271
  this.addCfnOutput(`${this.id}-loadBalancerArn`, this.siteEcsLoadBalancer.loadBalancerArn ?? '');
271
272
  this.addCfnOutput(`${this.id}-loadBalancerName`, this.siteEcsLoadBalancer.loadBalancerName ?? '');
272
273
  this.addCfnOutput(`${this.id}-loadBalancerFullName`, this.siteEcsLoadBalancer.loadBalancerFullName ?? '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "8.18.0",
3
+ "version": "8.20.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -34,11 +34,11 @@
34
34
  "docs": "rimraf api-docs && npx jsdoc --pedantic -c jsdoc.json .",
35
35
  "lint": "yarn prettify && eslint **/*.ts --max-warnings=0",
36
36
  "fix": "yarn prettify && eslint --fix **/*.ts",
37
- "postinstall": "npx lerna run init",
37
+ "postinstall": "npx lerna run initialise",
38
38
  "prettier": "npx prettier --check \"**/*.{ts,json,md}\"",
39
39
  "prettify": "npx prettier --write \"**/*.{ts,json,md}\"",
40
40
  "test": "rimraf coverage && npx jest --ci --maxWorkers=100%",
41
- "update:deps": "ncu -u -x lerna,semantic-release",
41
+ "update:deps": "ncu -u -x semantic-release",
42
42
  "validate": "yarn prettier && yarn test"
43
43
  },
44
44
  "husky": {
@@ -80,7 +80,7 @@
80
80
  "jsdoc": "^4.0.0",
81
81
  "jsdoc-babel": "^0.5.0",
82
82
  "jsdoc-mermaid": "^1.0.0",
83
- "lerna": "^5.6.2",
83
+ "lerna": "^6.5.1",
84
84
  "prettier": "^2.8.4",
85
85
  "prettier-plugin-organize-imports": "^3.2.2",
86
86
  "rimraf": "^4.1.2",
@@ -80,6 +80,7 @@ export class SiteWithEcsBackend extends CommonConstruct {
80
80
  this.resolveCertificate()
81
81
  this.resolveSiteSecrets()
82
82
  this.resolveSiteDomainNames()
83
+ this.createSiteLogBucket()
83
84
  this.createVpc()
84
85
  this.createEcsPolicy()
85
86
  this.createEcsRole()
@@ -89,7 +90,6 @@ export class SiteWithEcsBackend extends CommonConstruct {
89
90
  this.createEcsBuildArgs()
90
91
  this.createEcsContainerImage()
91
92
  this.createEcsService()
92
- this.createSiteLogBucket()
93
93
  this.createSiteOrigin()
94
94
  this.createSiteCloudfrontFunction()
95
95
  this.resolveSiteFunctionAssociations()
@@ -292,6 +292,8 @@ export class SiteWithEcsBackend extends CommonConstruct {
292
292
  this.siteEcsLoadBalancer = fargateService.loadBalancer
293
293
  this.siteEcsTargetGroup = fargateService.targetGroup
294
294
 
295
+ fargateService.loadBalancer.logAccessLogs(this.siteLogBucket, 'alb')
296
+
295
297
  this.addCfnOutput(`${this.id}-loadBalancerArn`, this.siteEcsLoadBalancer.loadBalancerArn ?? '')
296
298
  this.addCfnOutput(`${this.id}-loadBalancerName`, this.siteEcsLoadBalancer.loadBalancerName ?? '')
297
299
  this.addCfnOutput(`${this.id}-loadBalancerFullName`, this.siteEcsLoadBalancer.loadBalancerFullName ?? '')