Manage Asset Groups
Manage Application Security asset groups with Terraform.
The Cortex Cloud Terraform provider supports full CRUD (Create, Read, Update, Delete) operations for Asset Groups. By managing these groups as Infrastructure-as-Code, you can programmatically control your inventory lifecycle to dynamically scope policies, rules, and compliance profiles.
Configuration
Use the cortexcloud_asset_group resource and define the membership_predicate to establish boundaries.
# Create and manage a dynamic asset group for AppSec (Code Repositories)
resource "cortexcloud_asset_group" "appsec_frontend_repos" {
name = "Production Frontend Repositories"
type = "Dynamic"
description = "Groups GitHub repositories containing frontend application code for AppSec scanning."
membership_predicate = {
# Group assets that are GitHub Repositories and contain "frontend" in the name
and = [
{
search_field = "xdm.asset.provider"
search_type = "EQ"
search_value = "GitHub"
},
{
search_field = "xdm.asset.type.class"
search_type = "EQ"
search_value = "Repository"
},
{
search_field = "xdm.asset.name"
search_type = "CONTAINS"
search_value = "frontend"
}
]
}
}Use the resource configuration above to manage Asset Groups.
Last updated
Was this helpful?
