prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  CKV_AZURE_12: Retention policy of 0 is not supported
  **Describe the bug**
  When setting the `retention_period.days` value on `azurerm_network_watcher_flow_log` to `0`, `CKV_AZURE_12` still fails. `0` is the value to signify indefinite/forever retention.
  
  **To Reproduce**
  Steps to reproduce the behavior:
  1. Create an `azurerm_network_watcher_flow_log` resource
  2. Set
  ```
    retention_policy {
      enabled = true
      days    = 0
    }
  ```
  3. Run `checkov`
  4. Receive failure for `CKV_AZURE_12`
  
  **Expected behavior**
  `0` is an accepted value as documented at https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-nsg-flow-logging-overview#how-logging-works
  
  **Desktop (please complete the following information):**
   - OS: Linux
   - Checkov Version: 2.0.26
  
  
  **Additional context**
  At https://github.com/bridgecrewio/checkov/blob/master/checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py#L17 likely need to adjust the innermost `if` statement to something like:
  
  ```python
  if retention_in_days is not None and (retention_days == 0 or retention_days >= 90):
  ```
  
  Happy to open a pull request if this is an acceptable solution.
  
  </issue>
  <code>
  [start of checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py]
  1 from checkov.common.models.enums import CheckResult, CheckCategories
  2 from checkov.common.util.type_forcers import force_int
  3 from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceCheck
  4 
  5 
  6 class NetworkWatcherFlowLogPeriod(BaseResourceCheck):
  7     def __init__(self):
  8         name = "Ensure that Network Security Group Flow Log retention period is 'greater than 90 days'"
  9         id = "CKV_AZURE_12"
  10         supported_resources = ['azurerm_network_watcher_flow_log']
  11         categories = [CheckCategories.LOGGING]
  12         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  13 
  14     def scan_resource_conf(self, conf):
  15         if 'enabled' in conf and conf['enabled'][0]:
  16             retention_block = conf['retention_policy'][0]
  17             if retention_block['enabled'][0]:
  18                 retention_in_days = force_int(retention_block['days'][0])
  19                 if retention_in_days and retention_in_days >= 90:
  20                     return CheckResult.PASSED
  21         return CheckResult.FAILED
  22 
  23 
  24 check = NetworkWatcherFlowLogPeriod()
  25
  [end of checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.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/NetworkWatcherFlowLogPeriod.py b/checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py
  --- a/checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py
  +++ b/checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py
  @@ -16,7 +16,7 @@
               retention_block = conf['retention_policy'][0]
               if retention_block['enabled'][0]:
                   retention_in_days = force_int(retention_block['days'][0])
  -                if retention_in_days and retention_in_days >= 90:
  +                if retention_in_days is not None and (retention_in_days == 0 or retention_in_days >= 90):
                       return CheckResult.PASSED
           return CheckResult.FAILED
  
verification_info: {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py b/checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py\n--- a/checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py\n+++ b/checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py\n@@ -16,7 +16,7 @@\n             retention_block = conf['retention_policy'][0]\n             if retention_block['enabled'][0]:\n                 retention_in_days = force_int(retention_block['days'][0])\n-                if retention_in_days and retention_in_days >= 90:\n+                if retention_in_days is not None and (retention_in_days == 0 or retention_in_days >= 90):\n                     return CheckResult.PASSED\n         return CheckResult.FAILED\n", "issue": "CKV_AZURE_12: Retention policy of 0 is not supported\n**Describe the bug**\r\nWhen setting the `retention_period.days` value on `azurerm_network_watcher_flow_log` to `0`, `CKV_AZURE_12` still fails. `0` is the value to signify indefinite/forever retention.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Create an `azurerm_network_watcher_flow_log` resource\r\n2. Set\r\n```\r\n  retention_policy {\r\n    enabled = true\r\n    days    = 0\r\n  }\r\n```\r\n3. Run `checkov`\r\n4. Receive failure for `CKV_AZURE_12`\r\n\r\n**Expected behavior**\r\n`0` is an accepted value as documented at https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-nsg-flow-logging-overview#how-logging-works\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: Linux\r\n - Checkov Version: 2.0.26\r\n\r\n\r\n**Additional context**\r\nAt https://github.com/bridgecrewio/checkov/blob/master/checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py#L17 likely need to adjust the innermost `if` statement to something like:\r\n\r\n```python\r\nif retention_in_days is not None and (retention_days == 0 or retention_days >= 90):\r\n```\r\n\r\nHappy to open a pull request if this is an acceptable solution.\n", "before_files": [{"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.common.util.type_forcers import force_int\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceCheck\n\n\nclass NetworkWatcherFlowLogPeriod(BaseResourceCheck):\n    def __init__(self):\n        name = \"Ensure that Network Security Group Flow Log retention period is 'greater than 90 days'\"\n        id = \"CKV_AZURE_12\"\n        supported_resources = ['azurerm_network_watcher_flow_log']\n        categories = [CheckCategories.LOGGING]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf):\n        if 'enabled' in conf and conf['enabled'][0]:\n            retention_block = conf['retention_policy'][0]\n            if retention_block['enabled'][0]:\n                retention_in_days = force_int(retention_block['days'][0])\n                if retention_in_days and retention_in_days >= 90:\n                    return CheckResult.PASSED\n        return CheckResult.FAILED\n\n\ncheck = NetworkWatcherFlowLogPeriod()\n", "path": "checkov/terraform/checks/resource/azure/NetworkWatcherFlowLogPeriod.py"}]}