Skip to content

Commit

Permalink
chore(route53): migrate existing record set handler (#28053)
Browse files Browse the repository at this point in the history
This PR moves the delete existing record set handler from aws-cdk-lib to our new centralized location for custom resource handlers in the [@aws-cdk](https://github.com/aws-cdk) package.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
colifran authored Nov 20, 2023
1 parent 2c21ea0 commit 8fcc210
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 66 deletions.

This file was deleted.

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

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
Expand Up @@ -151,7 +151,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "482643dcf7106ecdc7f4ff9aefba13d1e5c7265377e6c6b9c77245f2bc55f6ef.zip"
"S3Key": "a4d4a9308995dd99b8a8a3089e4f2087a577a6d3f8a3fc902354155a2b0b00c5.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down

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

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
@@ -1,4 +1,4 @@
import { handler } from '../lib/delete-existing-record-set-handler';
import { handler } from '../../lib/aws-route53/delete-existing-record-set-handler';

const mockListResourceRecordSetsResponse = jest.fn();
const mockChangeResourceRecordSetsResponse = jest.fn();
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-route53/lib/record-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export class RecordSet extends Resource implements IRecordSet {
if (props.deleteExisting) {
// Delete existing record before creating the new one
const provider = CustomResourceProvider.getOrCreateProvider(this, DELETE_EXISTING_RECORD_SET_RESOURCE_TYPE, {
codeDirectory: path.join(__dirname, 'delete-existing-record-set-handler'),
codeDirectory: path.join(__dirname, '..', '..', 'custom-resource-handlers', 'dist', 'aws-route53', 'delete-existing-record-set-handler'),
runtime: CustomResourceProviderRuntime.NODEJS_18_X,
policyStatements: [{ // IAM permissions for all providers
Effect: 'Allow',
Expand Down

0 comments on commit 8fcc210

Please sign in to comment.