Skip to content

Commit

Permalink
Merge pull request #3216 from jlu-cloudflare/master
Browse files Browse the repository at this point in the history
Update support for crowdstrike_s2s posture rule
  • Loading branch information
jacobbednarz authored Mar 26, 2024
2 parents fe8862e + 6f0ba6d commit e7229e0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/3216.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/cloudflare_device_posture_rule: update support for new fields for crowdstrike_s2s posture rule.
```
2 changes: 2 additions & 0 deletions docs/resources/device_posture_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,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 duration of time that the host was last seen from Crowdstrike. Must be in the format `1h` or `30m`. Valid units are `d`, `h` and `m`.
- `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,6 +87,7 @@ 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.
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 duration of time that the host was last seen from Crowdstrike. Must be in the format `1h` or `30m`. Valid units are `d`, `h` and `m`.",
},
"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 e7229e0

Please sign in to comment.