Skip to content

Commit

Permalink
chore: remove apiVersion from custom resources (#27021)
Browse files Browse the repository at this point in the history
`apiVersion` no longer is recognized by sdk v3. source: aws/aws-sdk-js-v3#1869

We use it in two custom resources. I confirmed that each `apiVersion` represented the latest version of sdk v2 and was almost certainly hardcoded because it was the recommended practice: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/locking-api-versions.html

Both integ tests succeed deployment. I can confirm that `aws-route53/delete-existing-record-set-handler` works as intended but the integ test for `pipelines/approve-lambda` could never have worked and needs to be rewritten. That should happen in a different PR.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
kaizencc authored and Mike Wrighton committed Sep 14, 2023
1 parent 8721a51 commit 94b31d7
Show file tree
Hide file tree
Showing 42 changed files with 354 additions and 199 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "34.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
"path": "Rooute53DeleteExistingRecordSetIntegDefaultTestDeployAssert62638412.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."
}
]
}
}
}

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"version": "32.0.0",
"version": "34.0.0",
"files": {
"e1555732b4098df87db06daafa8ad81ce14ace955171fc9a72a644543a57ce7e": {
"b3a6a7ffec7a4baf8647b80c08ebb1b91986d1beedfead0945b9de4b5ac368b6": {
"source": {
"path": "asset.e1555732b4098df87db06daafa8ad81ce14ace955171fc9a72a644543a57ce7e",
"path": "asset.b3a6a7ffec7a4baf8647b80c08ebb1b91986d1beedfead0945b9de4b5ac368b6",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "e1555732b4098df87db06daafa8ad81ce14ace955171fc9a72a644543a57ce7e.zip",
"objectKey": "b3a6a7ffec7a4baf8647b80c08ebb1b91986d1beedfead0945b9de4b5ac368b6.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"510d172ff78b0abe3980fbe5fc62a7aa8179434760f5e885dc73465aeea674ca": {
"30e7342ae8e084b153ef62f76086d417df5f1382d2d7738cea15913e165a0f69": {
"source": {
"path": "cdk-route53-integ-delete-existing-record-set.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "510d172ff78b0abe3980fbe5fc62a7aa8179434760f5e885dc73465aeea674ca.json",
"objectKey": "30e7342ae8e084b153ef62f76086d417df5f1382d2d7738cea15913e165a0f69.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 @@ -9,29 +9,29 @@
"ExistingRecord8E2B2167": {
"Type": "AWS::Route53::RecordSet",
"Properties": {
"Name": "integ.cdk.dev.",
"Type": "A",
"HostedZoneId": {
"Ref": "HostedZoneDB99F866"
},
"Name": "integ.cdk.dev.",
"ResourceRecords": [
"1.2.3.4"
],
"TTL": "1800"
"TTL": "1800",
"Type": "A"
}
},
"NewRecordB9E8EE35": {
"Type": "AWS::Route53::RecordSet",
"Properties": {
"Name": "integ.cdk.dev.",
"Type": "A",
"HostedZoneId": {
"Ref": "HostedZoneDB99F866"
},
"Name": "integ.cdk.dev.",
"ResourceRecords": [
"5.6.7.8"
],
"TTL": "7200"
"TTL": "7200",
"Type": "A"
},
"DependsOn": [
"ExistingRecord8E2B2167",
Expand Down Expand Up @@ -151,7 +151,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "e1555732b4098df87db06daafa8ad81ce14ace955171fc9a72a644543a57ce7e.zip"
"S3Key": "b3a6a7ffec7a4baf8647b80c08ebb1b91986d1beedfead0945b9de4b5ac368b6.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"32.0.0"}
{"version":"34.0.0"}
Loading

0 comments on commit 94b31d7

Please sign in to comment.