cloudtools / cloudtools/troposphere
Validation error with CommaDelimitedList parmeters and properties expecting a list
- Dominant language
- Python
- Stars
- 4.9k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
Our team is getting a validation error on properties expecting a list when we pass in a Ref to a Parameter with the CommaDelimitedList format. We’ve traced the error back to a change roughly a month ago for #750 - here’s the current place where it’s failing:
https://github.com/cloudtools/troposphere/blob/3b78644106368c195399477f2e47552f4497bd0d/troposphere/__init__.py#L162
Right now there’s a blanket exception against using a AWSHelperFn when the property’s expected type is a list, however a Ref function referring to a Parameter with the CommaDelimitedList format will itself produce a list and be a valid CloudFormation template.
Would it make sense to add another special case here allowing `Ref` helper functions?
Ideally it could be restricted further as it’s possible the Ref will point to a non-list, but I’m not sure there’s an easy way to figure out what the Ref is pointing to.
I’m be happy to get a PR together or work through other solutions - let me know if this is the right tack to take here.
Contributor guide
Assessment
This issue has not been assessed yet.