cloudtools / cloudtools/troposphere
Validate objects when initialized
- Dominant language
- Python
- Stars
- 4.9k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
Opening for @MattJaccino based on questions in another issue.
Not specific to WAFv2, but one thing that did strike me as odd was that resource objects can be successfully initialized without all of the required properties being given. I thought I remembered it erroring out in situations like that, or am I missing something. ?
I thought with a property defined as
```python
class SomeProperty(AWSProperty):
props: PropsDictType = {
"Prop1": (TYPE, True),
"Prop2": (TYPE, False),
}
```
if you tried to initialize without defining Prop1, it would throw some kind of exception. It seems like you can initialize resource objects without including all of the required properties, or with none at all.
Was this always the case, or did something change? If not, could that potentially be a feature request?
Contributor guide
Assessment
This issue has not been assessed yet.