@gradientedge/cdk-utils 8.63.0 → 8.65.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.
@@ -237,6 +237,7 @@ class SiteWithEcsBackend extends common_1.CommonConstruct {
237
237
  healthCheckGracePeriod: cdk.Duration.seconds(60),
238
238
  assignPublicIp: true,
239
239
  minHealthyPercent: this.props.siteTask.minHealthyPercent,
240
+ maxHealthyPercent: this.props.siteTask.maxHealthyPercent,
240
241
  taskDefinition: this.props.siteTask.taskDefinition,
241
242
  taskImageOptions: {
242
243
  enableLogging: true,
@@ -70,7 +70,8 @@ class EfsManager {
70
70
  createFileSystem(id, scope, props, vpc, accessPointOptions, securityGroup, vpcSubnets) {
71
71
  if (!props)
72
72
  throw `EFS props undefined for ${id}`;
73
- const fileSystem = new efs.FileSystem(scope, `${id}`, {
73
+ const fileSystemId = props.provisionNewOnDeployment ? `${id}-${new Date().getMilliseconds()}` : `${id}`;
74
+ const fileSystem = new efs.FileSystem(scope, `${fileSystemId}`, {
74
75
  ...props,
75
76
  vpc,
76
77
  securityGroup,
@@ -85,6 +85,7 @@ class LogManager {
85
85
  if (!props)
86
86
  throw `Logs props undefined for ${id}`;
87
87
  const logGroup = new logs.CfnLogGroup(scope, `${id}`, {
88
+ ...props,
88
89
  logGroupName: `${props.logGroupName}-${scope.props.stage}`,
89
90
  retentionInDays: props.retention,
90
91
  });
@@ -106,6 +107,7 @@ class LogManager {
106
107
  if (!props)
107
108
  throw `Logs props undefined for ${id}`;
108
109
  const logGroup = new logs.LogGroup(scope, `${id}`, {
110
+ ...props,
109
111
  logGroupName: `${props.logGroupName}-${scope.props.stage}`,
110
112
  retention: props.retention,
111
113
  removalPolicy: props.removalPolicy ?? cdk.RemovalPolicy.DESTROY,
@@ -603,6 +603,7 @@ export interface LogQueryWidgetProps extends watch.LogQueryWidgetProps {
603
603
  * @subcategory Properties
604
604
  */
605
605
  export interface EfsFileSystemProps extends efs.FileSystemProps {
606
+ provisionNewOnDeployment?: boolean;
606
607
  rootDirectory?: string;
607
608
  transitEncryption?: string;
608
609
  transitEncryptionPort?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "8.63.0",
3
+ "version": "8.65.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -46,13 +46,13 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@aws-sdk/client-secrets-manager": "^3.334.0",
50
- "@types/lodash": "^4.14.194",
51
- "@types/node": "^20.2.0",
49
+ "@aws-sdk/client-secrets-manager": "^3.338.0",
50
+ "@types/lodash": "^4.14.195",
51
+ "@types/node": "^20.2.4",
52
52
  "@types/uuid": "^9.0.1",
53
53
  "app-root-path": "^3.1.0",
54
- "aws-cdk-lib": "^2.79.1",
55
- "constructs": "^10.2.27",
54
+ "aws-cdk-lib": "^2.81.0",
55
+ "constructs": "^10.2.33",
56
56
  "lodash": "^4.17.21",
57
57
  "moment": "^2.29.4",
58
58
  "nconf": "^0.12.0",
@@ -65,18 +65,18 @@
65
65
  "@babel/eslint-parser": "^7.21.8",
66
66
  "@babel/plugin-proposal-class-properties": "^7.18.6",
67
67
  "@types/jest": "^29.5.1",
68
- "@typescript-eslint/eslint-plugin": "^5.59.6",
69
- "@typescript-eslint/parser": "^5.59.6",
70
- "aws-cdk": "^2.79.1",
68
+ "@typescript-eslint/eslint-plugin": "^5.59.7",
69
+ "@typescript-eslint/parser": "^5.59.7",
70
+ "aws-cdk": "^2.81.0",
71
71
  "better-docs": "^2.7.2",
72
72
  "codecov": "^3.8.3",
73
73
  "commitizen": "^4.3.0",
74
74
  "docdash": "^2.0.1",
75
75
  "dotenv": "^16.0.3",
76
- "eslint": "^8.40.0",
76
+ "eslint": "^8.41.0",
77
77
  "eslint-config-prettier": "^8.8.0",
78
78
  "eslint-plugin-import": "^2.27.5",
79
- "eslint-plugin-jsdoc": "^44.2.4",
79
+ "eslint-plugin-jsdoc": "^44.2.5",
80
80
  "husky": "^8.0.3",
81
81
  "jest": "^29.5.0",
82
82
  "jest-extended": "^3.2.4",
@@ -260,6 +260,7 @@ export class SiteWithEcsBackend extends CommonConstruct {
260
260
  healthCheckGracePeriod: cdk.Duration.seconds(60),
261
261
  assignPublicIp: true,
262
262
  minHealthyPercent: this.props.siteTask.minHealthyPercent,
263
+ maxHealthyPercent: this.props.siteTask.maxHealthyPercent,
263
264
  taskDefinition: this.props.siteTask.taskDefinition,
264
265
  taskImageOptions: {
265
266
  enableLogging: true,
@@ -58,7 +58,8 @@ export class EfsManager {
58
58
  ) {
59
59
  if (!props) throw `EFS props undefined for ${id}`
60
60
 
61
- const fileSystem = new efs.FileSystem(scope, `${id}`, {
61
+ const fileSystemId = props.provisionNewOnDeployment ? `${id}-${new Date().getMilliseconds()}` : `${id}`
62
+ const fileSystem = new efs.FileSystem(scope, `${fileSystemId}`, {
62
63
  ...props,
63
64
  vpc,
64
65
  securityGroup,
@@ -70,6 +70,7 @@ export class LogManager {
70
70
  if (!props) throw `Logs props undefined for ${id}`
71
71
 
72
72
  const logGroup = new logs.CfnLogGroup(scope, `${id}`, {
73
+ ...props,
73
74
  logGroupName: `${props.logGroupName}-${scope.props.stage}`,
74
75
  retentionInDays: props.retention,
75
76
  })
@@ -95,6 +96,7 @@ export class LogManager {
95
96
  if (!props) throw `Logs props undefined for ${id}`
96
97
 
97
98
  const logGroup = new logs.LogGroup(scope, `${id}`, {
99
+ ...props,
98
100
  logGroupName: `${props.logGroupName}-${scope.props.stage}`,
99
101
  retention: props.retention,
100
102
  removalPolicy: props.removalPolicy ?? cdk.RemovalPolicy.DESTROY,
@@ -641,6 +641,7 @@ export interface LogQueryWidgetProps extends watch.LogQueryWidgetProps {
641
641
  * @subcategory Properties
642
642
  */
643
643
  export interface EfsFileSystemProps extends efs.FileSystemProps {
644
+ provisionNewOnDeployment?: boolean
644
645
  rootDirectory?: string
645
646
  transitEncryption?: string
646
647
  transitEncryptionPort?: number