Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update support for crowdstrike_s2s posture rule #3216

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading