Commit 3a5a373
authored
Fix flowlog crash (#157)
Issue #, if available: [#1931](aws-controllers-k8s/community#1931)
Description of changes:
While creating FlowLog, if logDestnation does not exist then CreateFlowLogsWithContext does not return the error. However, Unsuccessful field in the response is set. FlowLog is not created in aws. Due to this, controller crashes while accessing the flow log id from the response (resp.FlowLogIds[0]).
Fixing the issue by checking if FlowLogIds has valid length before accessing it.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent 0bb6c0e commit 3a5a373
File tree
3 files changed
+3
-3
lines changed- apis/v1alpha1
- pkg/resource/flow_log
- templates/hooks/flow_log
3 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
0 commit comments