@gradientedge/cdk-utils 9.15.0 → 9.17.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.
- package/dist/src/lib/aws/services/identity-access-management/main.js +1 -1
- package/dist/src/lib/aws/services/lambda/main.js +2 -2
- package/dist/src/lib/aws/services/systems-manager/main.js +3 -3
- package/package.json +6 -6
- package/src/lib/aws/services/identity-access-management/main.ts +1 -1
- package/src/lib/aws/services/lambda/main.ts +2 -2
- package/src/lib/aws/services/systems-manager/main.ts +6 -3
|
@@ -525,7 +525,7 @@ class IamManager {
|
|
|
525
525
|
assumedBy: servicePrincipal ?? new aws_iam_1.ServicePrincipal('appconfig.amazonaws.com'),
|
|
526
526
|
description: `Role for ${id} AppConfig Secrets`,
|
|
527
527
|
inlinePolicies: { policy },
|
|
528
|
-
roleName: scope.resourceNameFormatter.format(`${id}-
|
|
528
|
+
roleName: scope.resourceNameFormatter.format(`${id}-config`, scope.props.resourceNameOptions?.iam),
|
|
529
529
|
});
|
|
530
530
|
(0, utils_1.createCfnOutput)(`${id}Arn`, scope, role.roleArn);
|
|
531
531
|
(0, utils_1.createCfnOutput)(`${id}Name`, scope, role.roleName);
|
|
@@ -91,7 +91,7 @@ class LambdaManager {
|
|
|
91
91
|
environment: {
|
|
92
92
|
LAST_MODIFIED_TS: props.excludeLastModifiedTimestamp
|
|
93
93
|
? ''
|
|
94
|
-
: scope.ssmManager.readStringParameter(`${id}-sm-ts`, scope, `${systems_manager_1.SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}
|
|
94
|
+
: scope.ssmManager.readStringParameter(`${id}-sm-ts`, scope, `${systems_manager_1.SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}`),
|
|
95
95
|
LOG_LEVEL: props.logLevel,
|
|
96
96
|
REGION: scope.props.region,
|
|
97
97
|
STAGE: scope.props.stage,
|
|
@@ -196,7 +196,7 @@ class LambdaManager {
|
|
|
196
196
|
environment: {
|
|
197
197
|
LAST_MODIFIED_TS: props.excludeLastModifiedTimestamp
|
|
198
198
|
? ''
|
|
199
|
-
: scope.ssmManager.readStringParameter(`${id}-sm-ts`, scope, `${systems_manager_1.SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}
|
|
199
|
+
: scope.ssmManager.readStringParameter(`${id}-sm-ts`, scope, `${systems_manager_1.SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}`),
|
|
200
200
|
LOG_LEVEL: props.logLevel,
|
|
201
201
|
REGION: scope.props.region,
|
|
202
202
|
STAGE: scope.props.stage,
|
|
@@ -51,7 +51,7 @@ class SsmManager {
|
|
|
51
51
|
readStringParameter(id, scope, parameterName) {
|
|
52
52
|
if (!parameterName || parameterName == '')
|
|
53
53
|
throw 'Invalid parameter name';
|
|
54
|
-
return aws_ssm_1.StringParameter.valueFromLookup(scope, parameterName);
|
|
54
|
+
return aws_ssm_1.StringParameter.valueFromLookup(scope, scope.resourceNameFormatter.format(parameterName, scope.props.resourceNameOptions?.ssm));
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Method to read a string parameter from the parameters store in a given region
|
|
@@ -66,7 +66,7 @@ class SsmManager {
|
|
|
66
66
|
if (!region || region == '')
|
|
67
67
|
throw `Invalid region for ${id}`;
|
|
68
68
|
return new SSMParameterReader(scope, `${id}`, {
|
|
69
|
-
parameterName,
|
|
69
|
+
parameterName: scope.resourceNameFormatter.format(parameterName, scope.props.resourceNameOptions?.ssm),
|
|
70
70
|
region,
|
|
71
71
|
}).getParameterValue();
|
|
72
72
|
}
|
|
@@ -81,7 +81,7 @@ class SSMParameterReader extends custom_resources_1.AwsCustomResource {
|
|
|
81
81
|
const ssmAwsSdkCall = {
|
|
82
82
|
action: 'getParameter',
|
|
83
83
|
parameters: {
|
|
84
|
-
Name:
|
|
84
|
+
Name: parameterName,
|
|
85
85
|
},
|
|
86
86
|
physicalResourceId: custom_resources_1.PhysicalResourceId.of(Date.now().toString()),
|
|
87
87
|
region,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/cdk-utils",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.17.0",
|
|
4
4
|
"description": "Utilities for AWS CDK provisioning",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"@cdktf/provider-azurerm": "^13.0.0",
|
|
58
58
|
"@cdktf/provider-cloudflare": "^11.18.0",
|
|
59
59
|
"@types/lodash": "^4.17.7",
|
|
60
|
-
"@types/node": "^22.5.
|
|
60
|
+
"@types/node": "^22.5.2",
|
|
61
61
|
"@types/uuid": "^10.0.0",
|
|
62
62
|
"app-root-path": "^3.1.0",
|
|
63
63
|
"aws-cdk-lib": "^2.155.0",
|
|
64
64
|
"cdktf": "^0.20.8",
|
|
65
|
-
"cdktf-local-exec": "^0.5.
|
|
65
|
+
"cdktf-local-exec": "^0.5.36",
|
|
66
66
|
"constructs": "^10.3.0",
|
|
67
67
|
"lodash": "^4.17.21",
|
|
68
68
|
"moment": "^2.30.1",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"@babel/eslint-parser": "^7.25.1",
|
|
77
77
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
78
78
|
"@types/jest": "^29.5.12",
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
80
|
-
"@typescript-eslint/parser": "^8.
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
|
80
|
+
"@typescript-eslint/parser": "^8.4.0",
|
|
81
81
|
"aws-cdk": "^2.155.0",
|
|
82
82
|
"better-docs": "^2.7.3",
|
|
83
83
|
"codecov": "^3.8.3",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"jsdoc-babel": "^0.5.0",
|
|
97
97
|
"jsdoc-mermaid": "^1.0.0",
|
|
98
98
|
"jsdoc-plugin-typescript": "^2.3.0",
|
|
99
|
-
"jsdoc-to-markdown": "^
|
|
99
|
+
"jsdoc-to-markdown": "^9.0.0",
|
|
100
100
|
"prettier": "^3.3.3",
|
|
101
101
|
"prettier-plugin-organize-imports": "^4.0.0",
|
|
102
102
|
"rimraf": "^6.0.1",
|
|
@@ -608,7 +608,7 @@ export class IamManager {
|
|
|
608
608
|
assumedBy: servicePrincipal ?? new ServicePrincipal('appconfig.amazonaws.com'),
|
|
609
609
|
description: `Role for ${id} AppConfig Secrets`,
|
|
610
610
|
inlinePolicies: { policy },
|
|
611
|
-
roleName: scope.resourceNameFormatter.format(`${id}-
|
|
611
|
+
roleName: scope.resourceNameFormatter.format(`${id}-config`, scope.props.resourceNameOptions?.iam),
|
|
612
612
|
})
|
|
613
613
|
|
|
614
614
|
createCfnOutput(`${id}Arn`, scope, role.roleArn)
|
|
@@ -135,7 +135,7 @@ export class LambdaManager {
|
|
|
135
135
|
: scope.ssmManager.readStringParameter(
|
|
136
136
|
`${id}-sm-ts`,
|
|
137
137
|
scope,
|
|
138
|
-
`${SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}
|
|
138
|
+
`${SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}`
|
|
139
139
|
),
|
|
140
140
|
LOG_LEVEL: props.logLevel,
|
|
141
141
|
REGION: scope.props.region,
|
|
@@ -296,7 +296,7 @@ export class LambdaManager {
|
|
|
296
296
|
: scope.ssmManager.readStringParameter(
|
|
297
297
|
`${id}-sm-ts`,
|
|
298
298
|
scope,
|
|
299
|
-
`${SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}
|
|
299
|
+
`${SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}`
|
|
300
300
|
),
|
|
301
301
|
LOG_LEVEL: props.logLevel,
|
|
302
302
|
REGION: scope.props.region,
|
|
@@ -59,7 +59,10 @@ export class SsmManager {
|
|
|
59
59
|
public readStringParameter(id: string, scope: CommonConstruct, parameterName: string) {
|
|
60
60
|
if (!parameterName || parameterName == '') throw 'Invalid parameter name'
|
|
61
61
|
|
|
62
|
-
return StringParameter.valueFromLookup(
|
|
62
|
+
return StringParameter.valueFromLookup(
|
|
63
|
+
scope,
|
|
64
|
+
scope.resourceNameFormatter.format(parameterName, scope.props.resourceNameOptions?.ssm)
|
|
65
|
+
)
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
/**
|
|
@@ -74,7 +77,7 @@ export class SsmManager {
|
|
|
74
77
|
if (!region || region == '') throw `Invalid region for ${id}`
|
|
75
78
|
|
|
76
79
|
return new SSMParameterReader(scope, `${id}`, {
|
|
77
|
-
parameterName,
|
|
80
|
+
parameterName: scope.resourceNameFormatter.format(parameterName, scope.props.resourceNameOptions?.ssm),
|
|
78
81
|
region,
|
|
79
82
|
}).getParameterValue()
|
|
80
83
|
}
|
|
@@ -90,7 +93,7 @@ export class SSMParameterReader extends AwsCustomResource {
|
|
|
90
93
|
const ssmAwsSdkCall: AwsSdkCall = {
|
|
91
94
|
action: 'getParameter',
|
|
92
95
|
parameters: {
|
|
93
|
-
Name:
|
|
96
|
+
Name: parameterName,
|
|
94
97
|
},
|
|
95
98
|
physicalResourceId: PhysicalResourceId.of(Date.now().toString()),
|
|
96
99
|
region,
|