Closed shadycuz closed 11 months ago
Attention: 2 lines
in your changes are missing coverage. Please review.
Comparison is base (
62aee46
) 76.12% compared to head (59b499e
) 89.66%. Report is 2 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
src/cf2tf/convert.py | 83.33% | 1 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closes #234
A Cloudformation template has several Keys named "Condition" that are treated in special ways. The first being the "Condition" section that contains conditions to be evaluated. The second is the "Condition" key in a resource that is used to determine if the resource should be created or not. The third is the "Condition" intrinsic function that points to a condition in the "Condition" section.
The third is tricky because all the other intrinsic functions being with "Fn::" but the "Condition" intrinsic function is the only one that does not. That means we have to look for the "Condition" key by inspecting every key in the template. This is a problem because the "Condition" key is a valid key for a resource. Like in an IAM Policy. We are attempting to fix this by looking at the value of the "Condition" key. A "Condition" intrinsic function will be a string and a "Condition" element of an IAM Policy will be a dictionary.