Skip to content

Commit

Permalink
Merge pull request #25886 from hashicorp/b/crash-webpubsub-25855
Browse files Browse the repository at this point in the history
`webpubsub`: fixing a panic where `networkACL.PublicNetwork.Deny` was nil
  • Loading branch information
tombuildsstuff authored May 8, 2024
2 parents 2b69305 + 1054311 commit bb28b69
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func resourceWebPubsubNetworkACLCreateUpdate(d *pluginsdk.ResourceData, meta int

if defaultAction == webpubsub.ACLActionAllow && networkACL.PublicNetwork.Allow != nil && len(*networkACL.PublicNetwork.Allow) != 0 {
return fmt.Errorf("when `default_action` is `Allow` for `public_network`, `allowed_request_types` cannot be specified")
} else if defaultAction == webpubsub.ACLActionDeny && len(*networkACL.PublicNetwork.Deny) != 0 {
} else if defaultAction == webpubsub.ACLActionDeny && networkACL.PublicNetwork.Deny != nil && len(*networkACL.PublicNetwork.Deny) != 0 {
return fmt.Errorf("when `default_action` is `Deny` for `public_network`, `denied_request_types` cannot be specified")
}

Expand Down

0 comments on commit bb28b69

Please sign in to comment.