aws-cloudformation / aws-cloudformation/cloudformation-cli
contracts using created_resource have readOnlyProperties stripped
- Dominant language
- Python
- Stars
- 336
- Forks
- 172
- Avg merge
- 3d 5m
- Merged PRs (30d)
- 3
Description
The two code links below are removing `readOnlyProperties` from the result of a create. While [this](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-readonlyproperties) describes only having `readOnlyProperties` on read/list I think there are times that a create/update should also be able to return `readOnlyProperties`. Having them stripped out here causes issues with down stream tests like `contract_create_read_success` which will have the `readOnlyProperties` in it but the test will fail because we are comparing to the result of the create without the `readOnlyProperties`.
https://github.com/aws-cloudformation/cloudformation-cli/blob/6e9fd5ceb99750a395885ad69b7d599153538df0/src/rpdk/core/contract/suite/handler_create.py#L34
https://github.com/aws-cloudformation/cloudformation-cli/blob/6e9fd5ceb99750a395885ad69b7d599153538df0/src/rpdk/core/contract/suite/handler_commons.py#L155
Contributor guide
Assessment
This issue has not been assessed yet.