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.
API Scopes
Section titled “API Scopes”The following API scopes are required:
- Host groups: READ
Example Usage
Section titled “Example Usage”terraform { required_providers { crowdstrike = { source = "registry.terraform.io/crowdstrike/crowdstrike" } }}
provider "crowdstrike" { cloud = "us-2"}
# Look up a host group by namedata "crowdstrike_host_group" "fc_alpha" { name = "FC - Alpha"}
# Look up a host group by IDdata "crowdstrike_host_group" "by_id" { id = "dbe9c1fabd024fafaf44adf4df5f0f0f"}
data "crowdstrike_sensor_update_policy_builds" "all" {}
# Use the host group ID in a sensor update policyresource "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 }}Schema
Section titled “Schema”Optional
Section titled “Optional”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.
Read-Only
Section titled “Read-Only”assignment_rule(String) The assignment rule for the host groupcreated_by(String) User who created the host groupcreated_timestamp(String) Timestamp when the host group was createddescription(String) The host group descriptionmodified_by(String) User who last modified the host groupmodified_timestamp(String) Timestamp when the host group was last modifiedtype(String) The host group type (dynamic, static, staticByID)