-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_logic_app_workflow
: fix crash when access_control
is empty block
#22486
Conversation
Signed-off-by: ziyeqf <51212351+ziyeqf@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ziyeqf, thanks for getting these crash checks in! One of the checks isn't necessary though and I detailed what we should check in the review
@@ -869,7 +869,7 @@ func expandLogicAppWorkflowIPAddressRanges(input []interface{}) *[]workflows.IPA | |||
} | |||
|
|||
func expandLogicAppWorkflowOpenAuthenticationPolicy(input []interface{}) *map[string]workflows.OpenAuthenticationAccessPolicy { | |||
if len(input) == 0 { | |||
if len(input) == 0 || input[0] == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check isn't needed here as we're going over the range of the slice just a few lines down. Instead we want to check that item isn't nil before we cast to it
Signed-off-by: ziyeqf <51212351+ziyeqf@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for those changes @ziyeqf
azurerm_logic_app_workflow
: fix crash when access_control
is empty blockazurerm_logic_app_workflow
: fix crash when access_control
is empty block
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
fix #22474