Skip to content

Commit d99733f

Browse files
feat(core): support nodejs18.x for CustomResourceProviderRuntime. (#25709)
Closes #25665 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent fa2a2ee commit d99733f

File tree

13 files changed

+812
-1
lines changed

13 files changed

+812
-1
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-custom-resources-node-18.js.snapshot/asset.5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7/__entrypoint__.js

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-custom-resources-node-18.js.snapshot/asset.5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7/index.js

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"31.0.0"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": "31.0.0",
3+
"files": {
4+
"5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7": {
5+
"source": {
6+
"path": "asset.5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7",
7+
"packaging": "zip"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7.zip",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
},
17+
"9e5d3e20624023e8f794f5d686d025da3e98b1b5a8acbe187a994bb8dc26f2c1": {
18+
"source": {
19+
"path": "custom-resource-test-node-18-stack.template.json",
20+
"packaging": "file"
21+
},
22+
"destinations": {
23+
"current_account-current_region": {
24+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25+
"objectKey": "9e5d3e20624023e8f794f5d686d025da3e98b1b5a8acbe187a994bb8dc26f2c1.json",
26+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
27+
}
28+
}
29+
}
30+
},
31+
"dockerImages": {}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
{
2+
"Resources": {
3+
"CustomReflectCustomResourceProviderRoleB4B29AEC": {
4+
"Type": "AWS::IAM::Role",
5+
"Properties": {
6+
"AssumeRolePolicyDocument": {
7+
"Version": "2012-10-17",
8+
"Statement": [
9+
{
10+
"Action": "sts:AssumeRole",
11+
"Effect": "Allow",
12+
"Principal": {
13+
"Service": "lambda.amazonaws.com"
14+
}
15+
}
16+
]
17+
},
18+
"ManagedPolicyArns": [
19+
{
20+
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
21+
}
22+
]
23+
}
24+
},
25+
"CustomReflectCustomResourceProviderHandler2E189D0B": {
26+
"Type": "AWS::Lambda::Function",
27+
"Properties": {
28+
"Code": {
29+
"S3Bucket": {
30+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
31+
},
32+
"S3Key": "5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7.zip"
33+
},
34+
"Timeout": 900,
35+
"MemorySize": 128,
36+
"Handler": "__entrypoint__.handler",
37+
"Role": {
38+
"Fn::GetAtt": [
39+
"CustomReflectCustomResourceProviderRoleB4B29AEC",
40+
"Arn"
41+
]
42+
},
43+
"Runtime": "nodejs18.x",
44+
"Description": "veni vidi vici"
45+
},
46+
"DependsOn": [
47+
"CustomReflectCustomResourceProviderRoleB4B29AEC"
48+
]
49+
},
50+
"MyResource": {
51+
"Type": "Custom::Reflect",
52+
"Properties": {
53+
"ServiceToken": {
54+
"Fn::GetAtt": [
55+
"CustomReflectCustomResourceProviderHandler2E189D0B",
56+
"Arn"
57+
]
58+
},
59+
"physicalResourceId": "MyPhysicalReflectBack",
60+
"attributes": {
61+
"Attribute1": "foo",
62+
"Attribute2": 1234
63+
}
64+
},
65+
"UpdateReplacePolicy": "Delete",
66+
"DeletionPolicy": "Delete"
67+
},
68+
"MyLengthyTypeResource": {
69+
"Type": "Custom::Given_Resource_Type_Is_Exactly_Sixty_Characters_Long",
70+
"Properties": {
71+
"ServiceToken": {
72+
"Fn::GetAtt": [
73+
"CustomReflectCustomResourceProviderHandler2E189D0B",
74+
"Arn"
75+
]
76+
},
77+
"physicalResourceId": "MyPhysicalLengthyType"
78+
},
79+
"UpdateReplacePolicy": "Delete",
80+
"DeletionPolicy": "Delete"
81+
}
82+
},
83+
"Outputs": {
84+
"Ref": {
85+
"Value": {
86+
"Ref": "MyResource"
87+
}
88+
},
89+
"GetAttAttribute1": {
90+
"Value": {
91+
"Fn::GetAtt": [
92+
"MyResource",
93+
"Attribute1"
94+
]
95+
}
96+
},
97+
"GetAttAttribute2": {
98+
"Value": {
99+
"Fn::GetAtt": [
100+
"MyResource",
101+
"Attribute2"
102+
]
103+
}
104+
}
105+
},
106+
"Parameters": {
107+
"BootstrapVersion": {
108+
"Type": "AWS::SSM::Parameter::Value<String>",
109+
"Default": "/cdk-bootstrap/hnb659fds/version",
110+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
111+
}
112+
},
113+
"Rules": {
114+
"CheckBootstrapVersion": {
115+
"Assertions": [
116+
{
117+
"Assert": {
118+
"Fn::Not": [
119+
{
120+
"Fn::Contains": [
121+
[
122+
"1",
123+
"2",
124+
"3",
125+
"4",
126+
"5"
127+
],
128+
{
129+
"Ref": "BootstrapVersion"
130+
}
131+
]
132+
}
133+
]
134+
},
135+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
136+
}
137+
]
138+
}
139+
}
140+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "31.0.0",
3+
"files": {
4+
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5+
"source": {
6+
"path": "customresourcetestnode18integDefaultTestDeployAssert9B8E9A20.template.json",
7+
"packaging": "file"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
}
17+
},
18+
"dockerImages": {}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"Parameters": {
3+
"BootstrapVersion": {
4+
"Type": "AWS::SSM::Parameter::Value<String>",
5+
"Default": "/cdk-bootstrap/hnb659fds/version",
6+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
7+
}
8+
},
9+
"Rules": {
10+
"CheckBootstrapVersion": {
11+
"Assertions": [
12+
{
13+
"Assert": {
14+
"Fn::Not": [
15+
{
16+
"Fn::Contains": [
17+
[
18+
"1",
19+
"2",
20+
"3",
21+
"4",
22+
"5"
23+
],
24+
{
25+
"Ref": "BootstrapVersion"
26+
}
27+
]
28+
}
29+
]
30+
},
31+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
32+
}
33+
]
34+
}
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "31.0.0",
3+
"testCases": {
4+
"custom-resource-test-node-18-integ/DefaultTest": {
5+
"stacks": [
6+
"custom-resource-test-node-18-stack"
7+
],
8+
"assertionStack": "custom-resource-test-node-18-integ/DefaultTest/DeployAssert",
9+
"assertionStackName": "customresourcetestnode18integDefaultTestDeployAssert9B8E9A20"
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)