aws-cloudformation / aws-cloudformation/cloudformation-cli
Override `snapshotRequested` Attribute In Contract Tests Request
- Dominant language
- Python
- Stars
- 336
- Forks
- 172
- Avg merge
- 3d 5m
- Merged PRs (30d)
- 3
Description
Hey,
We are implementing [RDS DBInstance resource](https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-rds/tree/master/aws-rds-dbinstance). As per [DBInstance docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html), The default behavior on deletion is snapshot. We check this attribute in handler request [here](https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-rds/blob/master/aws-rds-dbinstance/src/main/java/software/amazon/rds/dbinstance/DeleteHandler.java#L46).
In contract test inputs, We can not override `snapshotRequested` attribute which means every time a contract test's delete handler request invoked will leave a DBInstance snapshot behind. RDS snapshots limited with quota. When snapshots quota is full, Contract tests will fail and block registration of DBInstance type to succeed.
Can you provide a way to override `snapshotRequested` to **false** in contract test request?
```
public class ResourceHandlerRequest {
private String clientRequestToken;
private T desiredResourceState;
private T previousResourceState;
...
private String logicalResourceIdentifier;
private String nextToken;
private Boolean snapshotRequested; <------
private Boolean rollback;
...
}
```
Contributor guide
Assessment
This issue has not been assessed yet.