| page_title | duploai_admin_command_policy_mapping Resource - duploai |
|---|---|
| subcategory | |
| description | Manages a DuploCloud AI Helpdesk command policy mapping — binds a command policy to a scope (System, Workspace, or Project), putting the policy's allow/block command rules into effect for tickets in that scope. Only one active mapping may exist per System scope, and per Workspace/Project target. |
Manages a DuploCloud AI Helpdesk command policy mapping — binds a command policy to a scope (System, Workspace, or Project), putting the policy's allow/block command rules into effect for tickets in that scope. Only one active mapping may exist per System scope, and per Workspace/Project target.
# Bind a command policy platform-wide (System level — no target_ids).
# Only one active System-level mapping may exist at a time.
resource "duploai_admin_command_policy_mapping" "system" {
name = "org-default"
policy_id = "<command-policy-id>"
level = "System"
}
# Bind a command policy to specific workspaces (Workspace level).
# target_ids is required for Workspace/Project levels.
resource "duploai_admin_command_policy_mapping" "workspace" {
name = "platform-team-policy"
policy_id = "<command-policy-id>"
level = "Workspace"
target_ids = ["<workspace-id-1>", "<workspace-id-2>"]
}
# Bind a command policy to specific projects (Project level).
resource "duploai_admin_command_policy_mapping" "project" {
name = "sensitive-project-policy"
policy_id = "<command-policy-id>"
level = "Project"
target_ids = ["<project-id>"]
}level(String) Scope level the policy is bound to: System (platform-wide), Workspace, or Project.name(String) Name of the command policy mapping.policy_id(String) ID of the command policy this mapping applies. Must reference an existing, active command policy.
description(String) Human-readable description of the mapping.is_active(Boolean) Whether the mapping is active. Defaults to true. Only active mappings take effect and are checked for scope conflicts.metadata(Map of String) Arbitrary key/value metadata attached to the mapping.target_ids(Set of String) IDs of the targets this mapping applies to: workspace IDs when level is Workspace, project IDs when level is Project. Required for Workspace and Project levels; must be omitted for System level.
created_at(String) Timestamp when the mapping was created (RFC 3339).created_by(String) Identifier of the user who created the mapping.id(String) Composite resource identifier (workspace_id/id).updated_at(String) Timestamp when the mapping was last updated (RFC 3339).updated_by(String) Identifier of the user who last updated the mapping.version(Number) Server-incremented version of the mapping.
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import an existing command policy mapping by its ID.
# - COMMAND_POLICY_MAPPING_ID is the unique identifier of the mapping (e.g. 6a25105705686d697e0da225)
terraform import duploai_admin_command_policy_mapping.mymapping COMMAND_POLICY_MAPPING_ID
# Example:
# terraform import duploai_admin_command_policy_mapping.mymapping 6a25105705686d697e0da225