@gradientedge/cdk-utils 4.9.2 → 4.9.6
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/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +4 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +5 -2
- package/dist/src/lib/manager/aws/elasticache-manager.js +0 -2
- package/package.json +9 -8
- package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +5 -2
- package/src/lib/manager/aws/elasticache-manager.ts +0 -6
|
@@ -31,7 +31,6 @@ export declare class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
|
|
|
31
31
|
graphQLElastiCache: elasticache.CfnCacheCluster;
|
|
32
32
|
graphQLSecurityGroup: ec2.ISecurityGroup;
|
|
33
33
|
securityGroupExportName: string;
|
|
34
|
-
vpcExportName: string;
|
|
35
34
|
constructor(parent: Construct, id: string, props: GraphQlApiLambdaWithCacheProps);
|
|
36
35
|
protected initResources(): void;
|
|
37
36
|
/**
|
|
@@ -59,5 +58,9 @@ export declare class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
|
|
|
59
58
|
* @protected
|
|
60
59
|
*/
|
|
61
60
|
protected createLambdaEnvironment(): void;
|
|
61
|
+
/**
|
|
62
|
+
* @summary Method to create lambda function for GraphQL API
|
|
63
|
+
* @protected
|
|
64
|
+
*/
|
|
62
65
|
protected createLambdaFunction(): void;
|
|
63
66
|
}
|
|
@@ -55,7 +55,6 @@ class GraphQLApiLambdaWithCache extends __1.GraphQLApiLambda {
|
|
|
55
55
|
graphQLElastiCache;
|
|
56
56
|
graphQLSecurityGroup;
|
|
57
57
|
securityGroupExportName;
|
|
58
|
-
vpcExportName;
|
|
59
58
|
constructor(parent, id, props) {
|
|
60
59
|
super(parent, id, props);
|
|
61
60
|
this.props = props;
|
|
@@ -101,7 +100,7 @@ class GraphQLApiLambdaWithCache extends __1.GraphQLApiLambda {
|
|
|
101
100
|
* @protected
|
|
102
101
|
*/
|
|
103
102
|
createElastiCache() {
|
|
104
|
-
this.graphQLElastiCache = this.elasticacheManager.createElastiCache(`${this.id}-elasticache`, this, this.props.graphQLElastiCache, this.graphQLVpc.privateSubnets.map(subnet => subnet.subnetId), [this.graphQLSecurityGroup.
|
|
103
|
+
this.graphQLElastiCache = this.elasticacheManager.createElastiCache(`${this.id}-elasticache`, this, this.props.graphQLElastiCache, this.graphQLVpc.privateSubnets.map(subnet => subnet.subnetId), [this.graphQLSecurityGroup.securityGroupId]);
|
|
105
104
|
}
|
|
106
105
|
/**
|
|
107
106
|
* Create Lambda Role
|
|
@@ -124,6 +123,10 @@ class GraphQLApiLambdaWithCache extends __1.GraphQLApiLambda {
|
|
|
124
123
|
TZ: this.props.timezone,
|
|
125
124
|
};
|
|
126
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* @summary Method to create lambda function for GraphQL API
|
|
128
|
+
* @protected
|
|
129
|
+
*/
|
|
127
130
|
createLambdaFunction() {
|
|
128
131
|
this.graphQLApiLambdaFunction = this.lambdaManager.createLambdaFunction(`${this.id}-graphql-server`, this, this.props.graphqlApi, this.graphQLApiLambdaRole, this.graphQLApiLambdaLayers, this.props.graphQLApiSource, this.props.graphQLApiHandler || 'index.handler', this.graphQLApiLambdaEnvironment, this.graphQLVpc, [this.graphQLSecurityGroup], undefined, undefined, this.graphQLVpc);
|
|
129
132
|
}
|
|
@@ -92,8 +92,6 @@ class ElastiCacheManager {
|
|
|
92
92
|
logDeliveryConfigurations: logDeliveryConfigurations,
|
|
93
93
|
});
|
|
94
94
|
utils.createCfnOutput(`${id}-clusterName`, scope, elasticacheCluster.clusterName);
|
|
95
|
-
utils.createCfnOutput(`${id}-configurationEndpointAddress`, scope, elasticacheCluster.attrConfigurationEndpointAddress);
|
|
96
|
-
utils.createCfnOutput(`${id}-configurationEndpointPort`, scope, elasticacheCluster.attrConfigurationEndpointPort);
|
|
97
95
|
utils.createCfnOutput(`${id}-redisEndpointPort`, scope, elasticacheCluster.attrRedisEndpointPort);
|
|
98
96
|
utils.createCfnOutput(`${id}-redisEndpointAddress`, scope, elasticacheCluster.attrRedisEndpointAddress);
|
|
99
97
|
return elasticacheCluster;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/cdk-utils",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.6",
|
|
4
4
|
"description": "Utilities for AWS CDK provisioning",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": "
|
|
7
|
+
"node": "<15"
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"gradientedge",
|
|
20
|
-
"
|
|
20
|
+
"cdk",
|
|
21
|
+
"awscdk"
|
|
21
22
|
],
|
|
22
23
|
"license": "MIT",
|
|
23
24
|
"bugs": {
|
|
@@ -44,13 +45,13 @@
|
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"@aws-cdk/aws-lambda-python-alpha": "2.
|
|
48
|
+
"@aws-cdk/aws-lambda-python-alpha": "2.13.0-alpha.0",
|
|
48
49
|
"@types/lodash": "^4.14.178",
|
|
49
50
|
"@types/node": "^17.0.18",
|
|
50
51
|
"app-root-path": "^3.0.0",
|
|
51
|
-
"aws-cdk-lib": "^2.
|
|
52
|
-
"aws-sdk": "^2.
|
|
53
|
-
"constructs": "^10.0.
|
|
52
|
+
"aws-cdk-lib": "^2.13.0",
|
|
53
|
+
"aws-sdk": "^2.1077.0",
|
|
54
|
+
"constructs": "^10.0.66",
|
|
54
55
|
"lodash": "^4.17.21",
|
|
55
56
|
"moment": "^2.29.1",
|
|
56
57
|
"nconf": "^0.11.3",
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
"typescript": "4.5.5"
|
|
89
90
|
},
|
|
90
91
|
"optionalDependencies": {
|
|
91
|
-
"@babel/core": "^7.17.
|
|
92
|
+
"@babel/core": "^7.17.5",
|
|
92
93
|
"prop-types": "^15.8.1",
|
|
93
94
|
"react": "^17.0.2",
|
|
94
95
|
"react-dom": "^17.0.2"
|
|
@@ -38,7 +38,6 @@ export class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
|
|
|
38
38
|
graphQLElastiCache: elasticache.CfnCacheCluster
|
|
39
39
|
graphQLSecurityGroup: ec2.ISecurityGroup
|
|
40
40
|
securityGroupExportName: string
|
|
41
|
-
vpcExportName: string
|
|
42
41
|
|
|
43
42
|
constructor(parent: Construct, id: string, props: GraphQlApiLambdaWithCacheProps) {
|
|
44
43
|
super(parent, id, props)
|
|
@@ -99,7 +98,7 @@ export class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
|
|
|
99
98
|
this,
|
|
100
99
|
this.props.graphQLElastiCache,
|
|
101
100
|
this.graphQLVpc.privateSubnets.map(subnet => subnet.subnetId),
|
|
102
|
-
[this.graphQLSecurityGroup.
|
|
101
|
+
[this.graphQLSecurityGroup.securityGroupId]
|
|
103
102
|
)
|
|
104
103
|
}
|
|
105
104
|
|
|
@@ -129,6 +128,10 @@ export class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
|
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
|
|
131
|
+
/**
|
|
132
|
+
* @summary Method to create lambda function for GraphQL API
|
|
133
|
+
* @protected
|
|
134
|
+
*/
|
|
132
135
|
protected createLambdaFunction() {
|
|
133
136
|
this.graphQLApiLambdaFunction = this.lambdaManager.createLambdaFunction(
|
|
134
137
|
`${this.id}-graphql-server`,
|
|
@@ -84,12 +84,6 @@ export class ElastiCacheManager {
|
|
|
84
84
|
})
|
|
85
85
|
|
|
86
86
|
utils.createCfnOutput(`${id}-clusterName`, scope, elasticacheCluster.clusterName)
|
|
87
|
-
utils.createCfnOutput(
|
|
88
|
-
`${id}-configurationEndpointAddress`,
|
|
89
|
-
scope,
|
|
90
|
-
elasticacheCluster.attrConfigurationEndpointAddress
|
|
91
|
-
)
|
|
92
|
-
utils.createCfnOutput(`${id}-configurationEndpointPort`, scope, elasticacheCluster.attrConfigurationEndpointPort)
|
|
93
87
|
utils.createCfnOutput(`${id}-redisEndpointPort`, scope, elasticacheCluster.attrRedisEndpointPort)
|
|
94
88
|
utils.createCfnOutput(`${id}-redisEndpointAddress`, scope, elasticacheCluster.attrRedisEndpointAddress)
|
|
95
89
|
|