prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Check Azure Front Door WAF enabled fails even when a WAF is correctly assigned
  **Describe the issue**
  [`CKV_AZURE_121`](https://github.com/bridgecrewio/checkov/blob/master/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py) fails despite a Web Application Firewall policy being correctly applied. 
  
  WAF policies are applied by specifying a value for `web_application_firewall_policy_link_id` inside a `frontend_endpoint` block within the `azurerm_frontdoor` resource itself.
  
  The [documentation](https://docs.bridgecrew.io/docs/ensure-that-azure-front-door-enables-waf) seems to expect that the `web_application_firewall_policy_link_id` attribute is defined in the resource block itself, rather than in a sub-block (`frontend_endpoint`).
  
  - [`azurerm_frontdoor` resource documentation reference](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/frontdoor#web_application_firewall_policy_link_id)
  
  **Examples**
  ```terraform
  resource "azurerm_frontdoor" "test" {
    name                                         = "test-front-door"
    resource_group_name                          = var.resource_group_name
    enforce_backend_pools_certificate_name_check = false
    tags                                         = var.tags
  
    frontend_endpoint {
      name                                    = "DefaultFrontend"
      host_name                               = "test-front-door.azurefd.net"
      web_application_firewall_policy_link_id = azurerm_frontdoor_firewall_policy.test.id
    }
  
    # ... 
  ```
  
  **Version (please complete the following information):**
   - Checkov Version: 2.0.930
  
  **Additional context**
  
  
  </issue>
  <code>
  [start of checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py]
  1 from checkov.common.models.consts import ANY_VALUE
  2 from checkov.common.models.enums import CheckCategories
  3 from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
  4 
  5 
  6 class AzureFrontDoorEnablesWAF(BaseResourceValueCheck):
  7     def __init__(self):
  8         name = "Ensure that Azure Front Door enables WAF"
  9         id = "CKV_AZURE_121"
  10         supported_resources = ['azurerm_frontdoor']
  11         categories = [CheckCategories.NETWORKING]
  12         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  13 
  14     def get_inspected_key(self):
  15         return "web_application_firewall_policy_link_id"
  16 
  17     def get_expected_value(self):
  18         return ANY_VALUE
  19 
  20 
  21 check = AzureFrontDoorEnablesWAF()
  22
  [end of checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py
  --- a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py
  +++ b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py
  @@ -12,7 +12,7 @@
           super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
   
       def get_inspected_key(self):
  -        return "web_application_firewall_policy_link_id"
  +        return "frontend_endpoint/[0]/web_application_firewall_policy_link_id"
   
       def get_expected_value(self):
           return ANY_VALUE
  
verification_info: {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py\n--- a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py\n+++ b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py\n@@ -12,7 +12,7 @@\n         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n \n     def get_inspected_key(self):\n-        return \"web_application_firewall_policy_link_id\"\n+        return \"frontend_endpoint/[0]/web_application_firewall_policy_link_id\"\n \n     def get_expected_value(self):\n         return ANY_VALUE\n", "issue": "Check Azure Front Door WAF enabled fails even when a WAF is correctly assigned\n**Describe the issue**\r\n[`CKV_AZURE_121`](https://github.com/bridgecrewio/checkov/blob/master/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py) fails despite a Web Application Firewall policy being correctly applied. \r\n\r\nWAF policies are applied by specifying a value for `web_application_firewall_policy_link_id` inside a `frontend_endpoint` block within the `azurerm_frontdoor` resource itself.\r\n\r\nThe [documentation](https://docs.bridgecrew.io/docs/ensure-that-azure-front-door-enables-waf) seems to expect that the `web_application_firewall_policy_link_id` attribute is defined in the resource block itself, rather than in a sub-block (`frontend_endpoint`).\r\n\r\n- [`azurerm_frontdoor` resource documentation reference](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/frontdoor#web_application_firewall_policy_link_id)\r\n\r\n**Examples**\r\n```terraform\r\nresource \"azurerm_frontdoor\" \"test\" {\r\n  name                                         = \"test-front-door\"\r\n  resource_group_name                          = var.resource_group_name\r\n  enforce_backend_pools_certificate_name_check = false\r\n  tags                                         = var.tags\r\n\r\n  frontend_endpoint {\r\n    name                                    = \"DefaultFrontend\"\r\n    host_name                               = \"test-front-door.azurefd.net\"\r\n    web_application_firewall_policy_link_id = azurerm_frontdoor_firewall_policy.test.id\r\n  }\r\n\r\n  # ... \r\n```\r\n\r\n**Version (please complete the following information):**\r\n - Checkov Version: 2.0.930\r\n\r\n**Additional context**\r\n\n", "before_files": [{"content": "from checkov.common.models.consts import ANY_VALUE\nfrom checkov.common.models.enums import CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n\n\nclass AzureFrontDoorEnablesWAF(BaseResourceValueCheck):\n    def __init__(self):\n        name = \"Ensure that Azure Front Door enables WAF\"\n        id = \"CKV_AZURE_121\"\n        supported_resources = ['azurerm_frontdoor']\n        categories = [CheckCategories.NETWORKING]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def get_inspected_key(self):\n        return \"web_application_firewall_policy_link_id\"\n\n    def get_expected_value(self):\n        return ANY_VALUE\n\n\ncheck = AzureFrontDoorEnablesWAF()\n", "path": "checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py"}]}