Skip to content

Commit

Permalink
Update support for crowdstrike_s2s posture rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jlu-cloudflare committed Mar 1, 2024
1 parent 737a974 commit e1ee699
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/3155.txt
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/cloudflare_device_posture_rule: update support for new fields for crowdstrike_s2s posture rule.
```
7 changes: 6 additions & 1 deletion docs/resources/device_posture_rule.md
Expand Up @@ -33,7 +33,9 @@ resource "cloudflare_device_posture_rule" "eaxmple" {
}
}
```

<!-- schema generated by tfplugindocs -->

## Schema

### Required
Expand All @@ -55,6 +57,7 @@ resource "cloudflare_device_posture_rule" "eaxmple" {
- `id` (String) The ID of this resource.

<a id="nestedblock--input"></a>

### Nested Schema for `input`

Optional:
Expand All @@ -74,6 +77,7 @@ Optional:
- `infected` (Boolean) True if SentinelOne device is infected.
- `is_active` (Boolean) True if SentinelOne device is active.
- `issue_count` (String) The number of issues for kolide.
- `last_seen` (String) The UTC date and time that the host was last seen from Crowdstrike.
- `network_status` (String) The network status from SentinelOne. Available values: `connected`, `disconnected`, `disconnecting`, `connecting`.
- `operator` (String) The version comparison operator. Available values: `>`, `>=`, `<`, `<=`, `==`.
- `os` (String) OS signal score from Crowdstrike. Value must be between 1 and 100.
Expand All @@ -86,13 +90,14 @@ Optional:
- `running` (Boolean) Checks if the application should be running.
- `sensor_config` (String) Sensor signal score from Crowdstrike. Value must be between 1 and 100.
- `sha256` (String) The sha256 hash of the file.
- `state` (String) The host’s current online status from Crowdstrike. Available values: `online`, `offline`, `unknown`.
- `thumbprint` (String) The thumbprint of the file certificate.
- `total_score` (Number) The total score from Tanium.
- `version` (String) The operating system semantic version.
- `version_operator` (String) The version comparison operator for crowdstrike. Available values: `>`, `>=`, `<`, `<=`, `==`.


<a id="nestedblock--match"></a>

### Nested Schema for `match`

Optional:
Expand Down
Expand Up @@ -222,6 +222,12 @@ func setDevicePostureRuleInput(rule *cloudflare.DevicePostureRule, d *schema.Res
if versionOperator, ok := d.GetOk("input.0.version_operator"); ok {
input.VersionOperator = versionOperator.(string)
}
if state, ok := d.GetOk("input.0.state"); ok {
input.State = state.(string)
}
if last_seen, ok := d.GetOk("input.0.last_seen"); ok {
input.LastSeen = last_seen.(string)
}
if countOperator, ok := d.GetOk("input.0.count_operator"); ok {
input.CountOperator = countOperator.(string)
}
Expand Down
11 changes: 11 additions & 0 deletions internal/sdkv2provider/schema_cloudflare_device_posture_rule.go
Expand Up @@ -175,6 +175,17 @@ func resourceCloudflareDevicePostureRuleSchema() map[string]*schema.Schema {
ValidateFunc: validation.StringInSlice([]string{">", ">=", "<", "<=", "=="}, true),
Description: fmt.Sprintf("The version comparison operator for crowdstrike. %s", renderAvailableDocumentationValuesStringSlice([]string{">", ">=", "<", "<=", "=="})),
},
"last_seen": {
Type: schema.TypeString,
Optional: true,
Description: "The UTC date and time that the host was last seen from Crowdstrike.",
},
"state": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"online", "offline", "unknown"}, true),
Description: fmt.Sprintf("The host’s current online status from Crowdstrike. %s", renderAvailableDocumentationValuesStringSlice([]string{"online", "offline", "unknown"})),
},
"count_operator": {
Type: schema.TypeString,
Optional: true,
Expand Down

0 comments on commit e1ee699

Please sign in to comment.