Skip to content

Commit

Permalink
fix: dns-validated-cert cr doesn't use node16 (#25348)
Browse files Browse the repository at this point in the history
Changes the custom resource runtime to use the default based on the region it is deployed in. This will be Node16 in most cases except in isolated regions where it is Node14.

Fix: #25335

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
MrArnoldPalmer committed Apr 28, 2023
1 parent c46b013 commit ad71026
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"21.0.0"}
{"version":"31.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "31.0.0",
"files": {
"ef671dfd26b6dde1f73a4325587504813605a928622ebc466f4d0de6a0f3b672": {
"source": {
Expand All @@ -14,15 +14,15 @@
}
}
},
"40e0cba7b935f2255366302a1ad6c08cc6de0553b650a7d39efff6cfe3c5a251": {
"1827f8b3dae882f9c01e1f56ed8c5cecc88fee8a12a8fd410bc83dd7835622bd": {
"source": {
"path": "integ-dns-validated-certificate.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "40e0cba7b935f2255366302a1ad6c08cc6de0553b650a7d39efff6cfe3c5a251.json",
"objectKey": "1827f8b3dae882f9c01e1f56ed8c5cecc88fee8a12a8fd410bc83dd7835622bd.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,15 @@
]
},
"Handler": "index.certificateRequestHandler",
"Runtime": "nodejs14.x",
"Runtime": {
"Fn::FindInMap": [
"DefaultCrNodeVersionMap",
{
"Ref": "AWS::Region"
},
"value"
]
},
"Timeout": 900
},
"DependsOn": [
Expand All @@ -130,6 +138,109 @@
"DeletionPolicy": "Delete"
}
},
"Mappings": {
"DefaultCrNodeVersionMap": {
"af-south-1": {
"value": "nodejs16.x"
},
"ap-east-1": {
"value": "nodejs16.x"
},
"ap-northeast-1": {
"value": "nodejs16.x"
},
"ap-northeast-2": {
"value": "nodejs16.x"
},
"ap-northeast-3": {
"value": "nodejs16.x"
},
"ap-south-1": {
"value": "nodejs16.x"
},
"ap-south-2": {
"value": "nodejs16.x"
},
"ap-southeast-1": {
"value": "nodejs16.x"
},
"ap-southeast-2": {
"value": "nodejs16.x"
},
"ap-southeast-3": {
"value": "nodejs16.x"
},
"ca-central-1": {
"value": "nodejs16.x"
},
"cn-north-1": {
"value": "nodejs16.x"
},
"cn-northwest-1": {
"value": "nodejs16.x"
},
"eu-central-1": {
"value": "nodejs16.x"
},
"eu-central-2": {
"value": "nodejs16.x"
},
"eu-north-1": {
"value": "nodejs16.x"
},
"eu-south-1": {
"value": "nodejs16.x"
},
"eu-south-2": {
"value": "nodejs16.x"
},
"eu-west-1": {
"value": "nodejs16.x"
},
"eu-west-2": {
"value": "nodejs16.x"
},
"eu-west-3": {
"value": "nodejs16.x"
},
"me-central-1": {
"value": "nodejs16.x"
},
"me-south-1": {
"value": "nodejs16.x"
},
"sa-east-1": {
"value": "nodejs16.x"
},
"us-east-1": {
"value": "nodejs16.x"
},
"us-east-2": {
"value": "nodejs16.x"
},
"us-gov-east-1": {
"value": "nodejs16.x"
},
"us-gov-west-1": {
"value": "nodejs16.x"
},
"us-iso-east-1": {
"value": "nodejs14.x"
},
"us-iso-west-1": {
"value": "nodejs14.x"
},
"us-isob-east-1": {
"value": "nodejs14.x"
},
"us-west-1": {
"value": "nodejs16.x"
},
"us-west-2": {
"value": "nodejs16.x"
}
}
},
"Outputs": {
"CertificateArn": {
"Value": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableLookups": true,
"version": "21.0.0",
"version": "31.0.0",
"testCases": {
"integ-test/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "31.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"version": "21.0.0",
"version": "31.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
},
"integ-dns-validated-certificate.assets": {
"type": "cdk:asset-manifest",
"properties": {
Expand All @@ -23,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/40e0cba7b935f2255366302a1ad6c08cc6de0553b650a7d39efff6cfe3c5a251.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1827f8b3dae882f9c01e1f56ed8c5cecc88fee8a12a8fd410bc83dd7835622bd.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down Expand Up @@ -63,6 +57,12 @@
"data": "CertificateCertificateRequestorResource2890C6B7"
}
],
"/integ-dns-validated-certificate/DefaultCrNodeVersionMap": [
{
"type": "aws:cdk:logicalId",
"data": "DefaultCrNodeVersionMap"
}
],
"/integ-dns-validated-certificate/CertificateArn": [
{
"type": "aws:cdk:logicalId",
Expand Down Expand Up @@ -130,6 +130,12 @@
]
},
"displayName": "integ-test/DefaultTest/DeployAssert"
},
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
}
}
}
Loading

0 comments on commit ad71026

Please sign in to comment.