Azurerm_web_application_firewall_policy - attach to app gateway listener

Anyone have the code to attach the waf policy to a app gateway listener? I see in JSON view of a waf policy it references the listeners id, but have not got that implemented in the terraform code