---
layout: "fastly"
page_title: "Fastly: ngwaf_virtual_patches"
sidebar_current: "docs-fastly-resource-ngwaf-virtual-patches"
description: |-
  Provides a Fastly Next-Gen WAF Virtual Patches
---

# fastly_ngwaf_virtual_patches

Provides a Fastly Next-Gen WAF Virtual Patch.  Virtual patching 
rules block or log requests matching specific vulnerabilities.

## Example Usage

Basic usage:

```terraform
resource "fastly_ngwaf_virtual_patches" "demo" {
  action            = "block"
  enabled           = true
  virtual_patch_id    = "CVE-2017-5638"
  workspace_id       = fastly_ngwaf_workspace.demo.id
}
```

## Import

Fastly Next-Gen WAF Virtual Patches can be imported using their workspace and Virtual Patch ID, e.g.

```sh
$ terraform import fastly_ngwaf_virtual_patches.demo  <workspace_id>/<virtual_patch_id>
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `action` (String) Action to take when a signal for virtual patch is detected. Accepted values are `log` and `block`.
- `enabled` (Boolean) Control for enabling and disabling a virtual patch.
- `virtual_patch_id` (String) The ID of the virtual patch.
- `workspace_id` (String) The ID of the workspace.

### Read-Only

- `id` (String) The ID of this resource.
