Skip to content

host_group

This data source provides information about a single host group in Falcon. Use this to look up a host group by name or ID and reference its attributes in other resources.

The following API scopes are required:

  • Host groups: READ
terraform {
required_providers {
crowdstrike = {
source = "registry.terraform.io/crowdstrike/crowdstrike"
}
}
}
provider "crowdstrike" {
cloud = "us-2"
}
# Look up a host group by name
data "crowdstrike_host_group" "fc_alpha" {
name = "FC - Alpha"
}
# Look up a host group by ID
data "crowdstrike_host_group" "by_id" {
id = "dbe9c1fabd024fafaf44adf4df5f0f0f"
}
data "crowdstrike_sensor_update_policy_builds" "all" {}
# Use the host group ID in a sensor update policy
resource "crowdstrike_sensor_update_policy" "mac_latest" {
name = "Mac Sensor Update - Latest"
platform_name = "Mac"
enabled = true
build = data.crowdstrike_sensor_update_policy_builds.all.mac.latest.build
host_groups = [data.crowdstrike_host_group.fc_alpha.id]
schedule = {
enabled = false
}
}
  • id (String) The host group ID. Exactly one of ‘id’ or ‘name’ must be provided.
  • name (String) The host group name. Exactly one of ‘id’ or ‘name’ must be provided.
  • assignment_rule (String) The assignment rule for the host group
  • created_by (String) User who created the host group
  • created_timestamp (String) Timestamp when the host group was created
  • description (String) The host group description
  • modified_by (String) User who last modified the host group
  • modified_timestamp (String) Timestamp when the host group was last modified
  • type (String) The host group type (dynamic, static, staticByID)