-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[Route53]: CrossAccountZoneDelegationRecord should support RemovalPolicy #15211
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-route53Related to Amazon Route 53Related to Amazon Route 53effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1
Description
CrossAccountZoneDelegationRecord currently does not support the application of a RemovalPolicy. When the resource is deleted, it will assume the DelegationRole and issue a ChangeResourceRecordSets call with action DELETE. In our case, we would rather leave the delegation intact (at least in production-like environments) so we don't risk tearing down our endpoints accidentally.
Use Case
We would like to apply a removal policy of RETAIN on the CrossAccountZoneDelegationRecord resource, in order to protect against accidental deletion of the resource.
Proposed Solution
let hostedZone = new HostedZone(this, 'HostedZone', {
zoneName: 'my.cool.zone'
});
let delegation = new CrossAccountZoneDelegationRecord(this, 'CrossAccountDelegation', {
delegatedZone: hostedZone,
parentHostedZoneName: 'cool.zone',
delegationRole: Role.fromRoleArn(this, 'DelegationRole', 'arn:aws:iam::000000000000:role/delegator')
});
// vvv NEW vvv
delegation.applyRemovalPolicy(RemovalPolicy.RETAIN);Other
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-route53Related to Amazon Route 53Related to Amazon Route 53effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1