Skip to content

Commit

Permalink
azurerm_logic_app_workflow: fix crash when access_control is empt…
Browse files Browse the repository at this point in the history
…y block (#22486)
  • Loading branch information
ziyeqf committed Jul 13, 2023
1 parent 97437a7 commit b9345f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/services/logic/logic_app_workflow_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ func expandLogicAppWorkflowWorkflowParameters(input map[string]interface{}) (map
}

func expandLogicAppWorkflowAccessControl(input []interface{}) *workflows.FlowAccessControlConfiguration {
if len(input) == 0 {
if len(input) == 0 || input[0] == nil {
return nil
}
v := input[0].(map[string]interface{})
Expand Down Expand Up @@ -875,6 +875,9 @@ func expandLogicAppWorkflowOpenAuthenticationPolicy(input []interface{}) *map[st
results := make(map[string]workflows.OpenAuthenticationAccessPolicy)

for _, item := range input {
if item == nil {
continue
}
v := item.(map[string]interface{})
policyName := v["name"].(string)

Expand Down

0 comments on commit b9345f0

Please sign in to comment.