-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Describe the feature
The point_in_time_recovery field passed to the aws_dynamodb.Table constructor should also permit an IResolvable to be passed.
The underlying CfnTable resource already allows an IResolvable for point_in_time_recovery_enabled. https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_dynamodb/CfnTable.html#aws_cdk.aws_dynamodb.CfnTable.PointInTimeRecoverySpecificationProperty
Use Case
We want to use an Aspect to check that developers either enable point-in-time recovery for our production account, or explicitly disable it for all accounts. Currently, this is not feasible for two reasons:
- We cannot distinguish explicit disable from implicit disable.
- We cannot just hard-code
Truebecause it is contingent upon the account.
Instead, we want to make two implementations of IResolvable. Then the Aspect can simply check that point_in_time_recovery_enabled is set to an instance of once of these two classes.
Proposed Solution
Fix the Table constructor to allow for IResolvable for point_in_time_recovery. If provided, it will generate the corresponding PointInTimeRecoverySpecificationProperty instance.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
1.140.0
Environment details (OS name and version, etc.)
Alpine 3.15