|
| 1 | +--- |
| 2 | +subcategory: "Host Security Service (HSS)" |
| 3 | +layout: "huaweicloud" |
| 4 | +page_title: "HuaweiCloud: huaweicloud_hss_vulnerability_scan_task" |
| 5 | +description: |- |
| 6 | + Manages a vulnerability scan task resource within HuaweiCloud. |
| 7 | +--- |
| 8 | + |
| 9 | +# huaweicloud_hss_vulnerability_scan_task |
| 10 | + |
| 11 | +Manages a vulnerability scan task resource within HuaweiCloud. |
| 12 | + |
| 13 | +-> This resource is a one-time action resource. Deleting this resource will not clear the corresponding request record, |
| 14 | + but will only remove the resource information from the tf state file. |
| 15 | + |
| 16 | +## Example Usage |
| 17 | + |
| 18 | +```hcl |
| 19 | +variable "manual_scan_type" { |
| 20 | + type = list(string) |
| 21 | +} |
| 22 | +
|
| 23 | +resource "huaweicloud_hss_vulnerability_scan_task" "test" { |
| 24 | + manual_scan_type = var.manual_scan_type |
| 25 | + batch_flag = true |
| 26 | + range_type = "all_host" |
| 27 | +} |
| 28 | +``` |
| 29 | + |
| 30 | +## Argument Reference |
| 31 | + |
| 32 | +The following arguments are supported: |
| 33 | + |
| 34 | +* `region` - (Optional, String, ForceNew) Specifies the region in which to create the resource. |
| 35 | + If omitted, the provider-level region will be used. |
| 36 | + Changing this parameter will create a new resource. |
| 37 | + |
| 38 | +* `manual_scan_type` - (Required, List, NonUpdatable) Specifies the operation type. |
| 39 | + The valid values are as follows: |
| 40 | + + **linux_vul**: Linux vulnerability. |
| 41 | + + **windows_vul**: Windows vulnerability. |
| 42 | + + **web_cms**: Web-CMS vulnerability. |
| 43 | + + **app_vul**: Application vulnerability. |
| 44 | + + **urgent_vul**: Emergency vulnerability. |
| 45 | + |
| 46 | +* `batch_flag` - (Required, Bool, NonUpdatable) Specifies Whether the operation is performed in batches. |
| 47 | + If the value is true, all supported servers are scanned. |
| 48 | + The valid values are as follows: |
| 49 | + + **true** |
| 50 | + + **false** |
| 51 | + |
| 52 | +* `range_type` - (Required, String, NonUpdatable) Specifies the range of servers to be scanned. |
| 53 | + The valid values are as follows: |
| 54 | + + **all_host** |
| 55 | + + **specific_host** |
| 56 | + |
| 57 | +* `agent_id_list` - (Optional, List, NonUpdatable) Specifies the ID list of the server agent. |
| 58 | + |
| 59 | + -> This parameter is valid and required when the `range_type` is set to **specific_host**. |
| 60 | + |
| 61 | +* `urgent_vul_id_list` - (Optional, List, NonUpdatable) Specifies the scan all ID list of emergency vulnerabilities. |
| 62 | + If this parameter is left blank, all emergency vulnerabilities are scanned. |
| 63 | + The valid values are as follows: |
| 64 | + + **URGENT-CVE-2023-46604** |
| 65 | + + **URGENT-HSSVD-2020-1109** |
| 66 | + + **URGENT-CVE-2022-26134** |
| 67 | + + **URGENT-CVE-2023-22515** |
| 68 | + + **URGENT-CVE-2023-22518** |
| 69 | + + **URGENT-CVE-2023-28432** |
| 70 | + + **URGENT-CVE-2023-37582** |
| 71 | + + **URGENT-CVE-2023-33246** |
| 72 | + + **URGENT-CNVD-2023-02709** |
| 73 | + + **URGENT-CVE-2022-36804** |
| 74 | + + **URGENT-CVE-2022-22965** |
| 75 | + + **URGENT-CVE-2022-25845** |
| 76 | + + **URGENT-CVE-2019-14439** |
| 77 | + + **URGENT-CVE-2020-13933** |
| 78 | + + **URGENT-CVE-2020-26217** |
| 79 | + + **URGENT-CVE-2021-4034** |
| 80 | + + **URGENT-CVE-2021-44228** |
| 81 | + + **URGENT-CVE-2022-0847** |
| 82 | + |
| 83 | + -> For more details, please refer to [document](https://support.huaweicloud.com/intl/en-us/api-hss2.0/CreateVulnerabilityScanTask_0.html). |
| 84 | + |
| 85 | +* `enterprise_project_id` - (Optional, String, NonUpdatable) Specifies the enterprise project ID. |
| 86 | + This parameter is valid only when the enterprise project is enabled. |
| 87 | + The default value is **0**, indicating the default enterprise project. |
| 88 | + If it is necessary to operate the hosts under all enterprise projects, the value is **all_granted_eps**. |
| 89 | + If you only have permissions for a specific enterprise project, you need set the enterprise project ID. Otherwise, |
| 90 | + the operation may fail due to insufficient permissions. |
| 91 | + |
| 92 | +## Attribute Reference |
| 93 | + |
| 94 | +In addition to all arguments above, the following attributes are exported: |
| 95 | + |
| 96 | +* `id` - The resource ID. |
| 97 | + |
| 98 | +* `scan_type` - The scan task type. |
| 99 | + |
| 100 | +* `start_time` - The scan task start time. |
| 101 | + |
| 102 | +* `end_time` - The scan task end time. |
| 103 | + |
| 104 | +* `scan_vul_types` - The list of vulnerability types scanned by the task. |
| 105 | + |
| 106 | +* `status` - The scan task status. |
| 107 | + The valid values are as follows: |
| 108 | + + **running** |
| 109 | + + **finished** |
| 110 | + |
| 111 | +* `scanning_host_num` - The number of hosts are being scanned. |
| 112 | + |
| 113 | +* `success_host_num` - The number of hosts have been successfully scanned. |
| 114 | + |
| 115 | +* `failed_host_num` - The number of hosts fail to be scanned. |
| 116 | + |
| 117 | +* `estimated_time` - The expected completion time. |
0 commit comments