Skip to content

Commit

Permalink
feat(core): support nodejs18.x for CustomResourceProviderRuntime. (#2…
Browse files Browse the repository at this point in the history
…5709)

Closes #25665

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Zishanwang1992 committed May 31, 2023
1 parent fa2a2ee commit d99733f
Show file tree
Hide file tree
Showing 13 changed files with 812 additions and 1 deletion.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"31.0.0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "31.0.0",
"files": {
"5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7": {
"source": {
"path": "asset.5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"9e5d3e20624023e8f794f5d686d025da3e98b1b5a8acbe187a994bb8dc26f2c1": {
"source": {
"path": "custom-resource-test-node-18-stack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "9e5d3e20624023e8f794f5d686d025da3e98b1b5a8acbe187a994bb8dc26f2c1.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"Resources": {
"CustomReflectCustomResourceProviderRoleB4B29AEC": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
]
},
"ManagedPolicyArns": [
{
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
]
}
},
"CustomReflectCustomResourceProviderHandler2E189D0B": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "5a80abfca3e7d70957e8c0a553225876c69fb6038b810fe65b581b6b58453bf7.zip"
},
"Timeout": 900,
"MemorySize": 128,
"Handler": "__entrypoint__.handler",
"Role": {
"Fn::GetAtt": [
"CustomReflectCustomResourceProviderRoleB4B29AEC",
"Arn"
]
},
"Runtime": "nodejs18.x",
"Description": "veni vidi vici"
},
"DependsOn": [
"CustomReflectCustomResourceProviderRoleB4B29AEC"
]
},
"MyResource": {
"Type": "Custom::Reflect",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"CustomReflectCustomResourceProviderHandler2E189D0B",
"Arn"
]
},
"physicalResourceId": "MyPhysicalReflectBack",
"attributes": {
"Attribute1": "foo",
"Attribute2": 1234
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"MyLengthyTypeResource": {
"Type": "Custom::Given_Resource_Type_Is_Exactly_Sixty_Characters_Long",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"CustomReflectCustomResourceProviderHandler2E189D0B",
"Arn"
]
},
"physicalResourceId": "MyPhysicalLengthyType"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Outputs": {
"Ref": {
"Value": {
"Ref": "MyResource"
}
},
"GetAttAttribute1": {
"Value": {
"Fn::GetAtt": [
"MyResource",
"Attribute1"
]
}
},
"GetAttAttribute2": {
"Value": {
"Fn::GetAtt": [
"MyResource",
"Attribute2"
]
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "31.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
"path": "customresourcetestnode18integDefaultTestDeployAssert9B8E9A20.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "31.0.0",
"testCases": {
"custom-resource-test-node-18-integ/DefaultTest": {
"stacks": [
"custom-resource-test-node-18-stack"
],
"assertionStack": "custom-resource-test-node-18-integ/DefaultTest/DeployAssert",
"assertionStackName": "customresourcetestnode18integDefaultTestDeployAssert9B8E9A20"
}
}
}

0 comments on commit d99733f

Please sign in to comment.