oci_vulnerability_scanning_host_scan_target
This resource provides the Host Scan Target resource in Oracle Cloud Infrastructure Vulnerability Scanning service.
Creates a new HostScanTarget. A host scan target is a collection of compute instances that you want routinely scanned for security vulnerabilities.
Example Usage
resource "oci_vulnerability_scanning_host_scan_target" "test_host_scan_target" {
#Required
compartment_id = var.compartment_id
host_scan_recipe_id = oci_vulnerability_scanning_host_scan_recipe.test_host_scan_recipe.id
target_compartment_id = oci_identity_compartment.test_compartment.id
#Optional
defined_tags = {"foo-namespace.bar-key"= "value"}
description = var.host_scan_target_description
display_name = var.host_scan_target_display_name
freeform_tags = {"bar-key"= "value"}
instance_ids = var.host_scan_target_instance_ids
}
Argument Reference
The following arguments are supported:
compartment_id
- (Required) (Updatable) Compartment ID of the object (this).defined_tags
- (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:{"foo-namespace.bar-key": "value"}
description
- (Optional) (Updatable) Target description.display_name
- (Optional) (Updatable) Target identifier, which can be renamed. If not present, it will be auto-generated. Avoid entering confidential information.freeform_tags
- (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:{"bar-key": "value"}
host_scan_recipe_id
- (Required) (Updatable) ID of the host scan recipe this target applies.instance_ids
- (Optional) (Updatable) List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.target_compartment_id
- (Required) (Updatable) Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Attributes Reference
The following attributes are exported:
compartment_id
- Compartment ID of the object (this).defined_tags
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:{"foo-namespace.bar-key": "value"}
description
- Target description.display_name
- Target identifier, which can be renamed.freeform_tags
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:{"bar-key": "value"}
host_scan_recipe_id
- ID of the host scan recipe this target applies.id
- Unique identifier of the config that is immutable on creationinstance_ids
- List of compute instance IDs to target (optional). If empty, targets the entire targetCompartmentId.state
- The current state of the config.system_tags
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:{"orcl-cloud.free-tier-retained": "true"}
target_compartment_id
- Compartment ID to target. If a list of hosts is provided, all hosts must be in this compartment.time_created
- Date and time the target was created, format as described in RFC 3339time_updated
- Date and time the target was last updated, format as described in RFC 3339
Timeouts
The timeouts
block allows you to specify timeouts for certain operations:
* create
- (Defaults to 20 minutes), when creating the Host Scan Target
* update
- (Defaults to 20 minutes), when updating the Host Scan Target
* delete
- (Defaults to 20 minutes), when destroying the Host Scan Target
Import
HostScanTargets can be imported using the id
, e.g.
$ terraform import oci_vulnerability_scanning_host_scan_target.test_host_scan_target "id"