Skip to content

GCP Cloud Registration

This Terraform module provides automated registration and configuration of Google Cloud Platform (GCP) organizations, folders, and projects with CrowdStrike’s Cloud Security Posture Management (CSPM) platform. The module enables keyless authentication through GCP’s Workload Identity Federation and provides security monitoring capabilities including asset inventory and optional real-time log ingestion for threat detection.

View on GitHub
  • Multi-Scope Registration: Support for organization, folder, and project-level registrations
  • Workload Identity Federation: Secure, keyless authentication using GCP’s identity federation
  • Asset Inventory: Monitoring of GCP resources for security posture assessment
  • Real Time Visibility & Detection (Optional): Real-time log streaming for threat detection

The module creates the following GCP resources:

  • Workload Identity Pool and Provider for authentication
  • IAM role bindings for CrowdStrike service principals across target scopes
  • Pub/Sub topics and subscriptions for log ingestion (when RTV&D is enabled)
  • Log sinks for audit log streaming (when RTV&D is enabled)

Before using this module, ensure you have:

  1. CrowdStrike Requirements:

    • Falcon Console access with CSPM enabled
    • API credentials with CSPM registration (Read & Write) and Cloud Security Google Cloud Registration (Read & Write) scopes
  2. GCP Requirements:

    • GCP project for CrowdStrike infrastructure resources
    • Appropriate IAM permissions for the deployment service account
    • Required GCP APIs enabled
terraform {
required_version = ">= 1.5.0"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.22"
}
}
}
provider "google" {
project = "your-csmp-infrastructure-project"
}
module "crowdstrike_gcp_registration" {
source = "CrowdStrike/terraform-google-cloud-registration"
falcon_client_id = "<Falcon API client ID>"
falcon_client_secret = "<Falcon API client secret>"
# GCP Infrastructure Project
infra_project_id = "your-csmp-infrastructure-project"
# Registration Scope - Organization Level
registration_type = "organization"
organization_id = "123456789012"
# CrowdStrike Role ARN
role_arn = "arn:aws:sts::111111111111:assumed-role/CrowdStrikeConnectorRoleName"
# Optional: Enable Real Time Visibility & Detection
enable_realtime_visibility = true
# Optional: Log Ingestion Configuration
log_ingestion_settings = {
message_retention_duration = "1209600s" # 14 days
ack_deadline_seconds = 300 # 5 minutes
topic_message_retention_duration = "2592000s" # 30 days
audit_log_types = ["activity", "system_event", "policy"]
exclusion_filters = [
"resource.labels.environment=\"test\"",
"resource.labels.temporary=\"true\""
]
}
# Optional: Resource Naming
resource_prefix = "cs-"
resource_suffix = "-prod"
# Optional: Resource Labels
labels = {
environment = "production"
project = "crowdstrike-integration"
cstagvendor = "crowdstrike"
}
}
NameVersion
crowdstrike>= 0.0.55
google>= 6.22
NameType
crowdstrike_cloud_google_registration.mainresource
crowdstrike_cloud_google_registration_settings.mainresource
google_project.wif_projectdata source
NameDescriptionTypeDefaultRequired
deployment_methodDeployment method for the CrowdStrike GCP registrationstring"terraform-native"no
enable_realtime_visibilityEnable Real Time Visibility and Detection (RTV&D) features via log ingestionboolfalseno
excluded_project_patternsList of shell-style patterns to exclude specific projects from CSPM registration. Supports wildcards (* and ?). Projects matching these patterns will be excluded from asset inventory and log ingestion. Examples: ‘sys-*’, ‘dev-?’.list(string)[]no
folder_idsList of Google Cloud folders being registeredlist(string)[]no
infra_project_idGoogle Cloud Project ID where CrowdStrike infrastructure resources will be deployedstringn/ayes
infrastructure_manager_regionThe Google Cloud region for Infrastructure Manager. Required when deployment_method is infrastructure-managerstringnullno
labelsMap of labels to be applied to all resources created by this modulemap(string){}no
log_ingestion_settingsConfiguration settings for log ingestion. Controls Pub/Sub topic and subscription settings, audit log types, schema validation, and allows using existing resources.
object({
message_retention_duration = optional(string, “604800s”)
ack_deadline_seconds = optional(number, 600)
topic_message_retention_duration = optional(string, “604800s”)
audit_log_types = optional(list(string), [“activity”, “system_event”, “policy”])
topic_storage_regions = optional(list(string), [])
enable_schema_validation = optional(bool, false)
schema_type = optional(string, “AVRO”)
schema_definition = optional(string)
existing_topic_name = optional(string)
existing_subscription_name = optional(string)
exclusion_filters = optional(list(string), [])
})
{}no
organization_idGCP Organization ID for organization-level registrationstringnullno
project_idsList of Google Cloud projects being registeredlist(string)[]no
registration_nameName for the CrowdStrike GCP registrationstringn/ayes
registration_typeType of registration: organization, folder, or projectstringn/ayes
resource_prefixPrefix to be added to all created resource names for identificationstringnullno
resource_suffixSuffix to be added to all created resource names for identificationstringnullno
role_arnAWS Role ARN used by CrowdStrike for authenticationstringn/ayes
wif_project_idGoogle Cloud Project ID where the CrowdStrike workload identity federation pool resources are deployed. Defaults to infra_project_id if not specifiedstringnullno
NameDescription
log_sink_namesNames of the created log sinks (if RTV&D enabled)
log_subscription_idThe ID of the Pub/Sub subscription for log ingestion (if RTV&D enabled)
log_topic_idThe ID of the Pub/Sub topic for log ingestion (if RTV&D enabled)
registration_idThe unique CrowdStrike registration ID for this GCP setup
wif_iam_principalThe IAM principal that CrowdStrike uses to access GCP resources
wif_pool_idThe ID of the created Workload Identity Pool
wif_pool_provider_idThe ID of the created Workload Identity Pool Provider
wif_project_idThe GCP Project ID where Workload Identity resources were created
wif_project_numberThe GCP Project Number for the Workload Identity project