@gradientedge/cdk-utils 8.7.0 → 8.9.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.
@@ -120,8 +120,6 @@ class GraphQLApiLambdaWithCache extends __1.GraphQLApiLambda {
120
120
  */
121
121
  createLambdaEnvironment() {
122
122
  this.graphQLApiLambdaEnvironment = {
123
- CACHE_REDIS_HOST: `${this.graphQLElastiCache.attrPrimaryEndPointAddress}`,
124
- CACHE_REDIS_PORT: `${this.graphQLElastiCache.attrPrimaryEndPointPort}`,
125
123
  NODE_ENV: this.props.nodeEnv,
126
124
  LOG_LEVEL: this.props.logLevel,
127
125
  TZ: this.props.timezone,
@@ -45,8 +45,9 @@ export declare class EcsManager {
45
45
  * @param {ecs.ContainerImage} containerImage
46
46
  * @param {Map<string, string>} environment
47
47
  * @param {Map<string, string>} secrets
48
+ * @param {string[]} command
48
49
  */
49
- createEcsFargateTask(id: string, scope: common.CommonConstruct, props: types.EcsTaskProps, cluster: ecs.ICluster, role: iam.Role, logGroup: logs.ILogGroup, containerImage: ecs.ContainerImage, environment?: any, secrets?: any): cdk.aws_ecs.TaskDefinition;
50
+ createEcsFargateTask(id: string, scope: common.CommonConstruct, props: types.EcsTaskProps, cluster: ecs.ICluster, role: iam.Role, logGroup: logs.ILogGroup, containerImage: ecs.ContainerImage, environment?: any, secrets?: any, command?: string[]): cdk.aws_ecs.TaskDefinition;
50
51
  /**
51
52
  * @summary Method to create an application loadbalanced ecs fargate task
52
53
  * @param {string} id scoped id of the resource
@@ -83,8 +83,9 @@ class EcsManager {
83
83
  * @param {ecs.ContainerImage} containerImage
84
84
  * @param {Map<string, string>} environment
85
85
  * @param {Map<string, string>} secrets
86
+ * @param {string[]} command
86
87
  */
87
- createEcsFargateTask(id, scope, props, cluster, role, logGroup, containerImage, environment, secrets) {
88
+ createEcsFargateTask(id, scope, props, cluster, role, logGroup, containerImage, environment, secrets, command) {
88
89
  if (!props)
89
90
  throw `EcsTask props undefined for ${id}`;
90
91
  const ecsTask = new ecs.TaskDefinition(scope, `${id}`, {
@@ -119,6 +120,7 @@ class EcsManager {
119
120
  memoryLimitMiB: props.memoryMiB ? parseInt(props.memoryMiB) : undefined,
120
121
  privileged: false,
121
122
  secrets: secrets,
123
+ command: command,
122
124
  });
123
125
  utils.createCfnOutput(`${id}-taskArn`, scope, ecsTask.taskDefinitionArn);
124
126
  return ecsTask;
@@ -137,14 +137,6 @@ class ElastiCacheManager {
137
137
  autoMinorVersionUpgrade: props.autoMinorVersionUpgrade,
138
138
  });
139
139
  elasticacheCluster.addDependency(subnetGroup);
140
- if (elasticacheCluster.attrPrimaryEndPointAddress) {
141
- utils.createCfnOutput(`${id}-primaryEndPointAddress`, scope, elasticacheCluster.attrPrimaryEndPointAddress);
142
- utils.createCfnOutput(`${id}-primaryEndPointPort`, scope, elasticacheCluster.attrPrimaryEndPointPort);
143
- }
144
- if (elasticacheCluster.attrConfigurationEndPointAddress) {
145
- utils.createCfnOutput(`${id}-configurationEndPointAddress`, scope, elasticacheCluster.attrConfigurationEndPointAddress);
146
- utils.createCfnOutput(`${id}-configurationEndPointPort`, scope, elasticacheCluster.attrConfigurationEndPointPort);
147
- }
148
140
  return elasticacheCluster;
149
141
  }
150
142
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "8.7.0",
3
+ "version": "8.9.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -120,8 +120,6 @@ export class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
120
120
  */
121
121
  protected createLambdaEnvironment() {
122
122
  this.graphQLApiLambdaEnvironment = {
123
- CACHE_REDIS_HOST: `${this.graphQLElastiCache.attrPrimaryEndPointAddress}`,
124
- CACHE_REDIS_PORT: `${this.graphQLElastiCache.attrPrimaryEndPointPort}`,
125
123
  NODE_ENV: this.props.nodeEnv,
126
124
  LOG_LEVEL: this.props.logLevel,
127
125
  TZ: this.props.timezone,
@@ -66,6 +66,7 @@ export class EcsManager {
66
66
  * @param {ecs.ContainerImage} containerImage
67
67
  * @param {Map<string, string>} environment
68
68
  * @param {Map<string, string>} secrets
69
+ * @param {string[]} command
69
70
  */
70
71
  public createEcsFargateTask(
71
72
  id: string,
@@ -76,7 +77,8 @@ export class EcsManager {
76
77
  logGroup: logs.ILogGroup,
77
78
  containerImage: ecs.ContainerImage,
78
79
  environment?: any,
79
- secrets?: any
80
+ secrets?: any,
81
+ command?: string[]
80
82
  ) {
81
83
  if (!props) throw `EcsTask props undefined for ${id}`
82
84
 
@@ -113,6 +115,7 @@ export class EcsManager {
113
115
  memoryLimitMiB: props.memoryMiB ? parseInt(props.memoryMiB) : undefined,
114
116
  privileged: false,
115
117
  secrets: secrets,
118
+ command: command,
116
119
  })
117
120
 
118
121
  utils.createCfnOutput(`${id}-taskArn`, scope, ecsTask.taskDefinitionArn)
@@ -137,20 +137,6 @@ export class ElastiCacheManager {
137
137
 
138
138
  elasticacheCluster.addDependency(subnetGroup)
139
139
 
140
- if (elasticacheCluster.attrPrimaryEndPointAddress) {
141
- utils.createCfnOutput(`${id}-primaryEndPointAddress`, scope, elasticacheCluster.attrPrimaryEndPointAddress)
142
- utils.createCfnOutput(`${id}-primaryEndPointPort`, scope, elasticacheCluster.attrPrimaryEndPointPort)
143
- }
144
-
145
- if (elasticacheCluster.attrConfigurationEndPointAddress) {
146
- utils.createCfnOutput(
147
- `${id}-configurationEndPointAddress`,
148
- scope,
149
- elasticacheCluster.attrConfigurationEndPointAddress
150
- )
151
- utils.createCfnOutput(`${id}-configurationEndPointPort`, scope, elasticacheCluster.attrConfigurationEndPointPort)
152
- }
153
-
154
140
  return elasticacheCluster
155
141
  }
156
142
  }