Child Site Management Policies

A Child Site Management Policy is a centralized policy defined by a parent site to enforce consistent configurations across child sites. These policies allow parent sites to maintain control over specific aspects of their child sites' functionality and appearance.

Non-default policies apply only to the child sites listed in child_site_ids, and each child site can be explicitly assigned to only one policy.

One policy can be designated as the default policy. It applies to every child site not explicitly assigned to another policy or listed in its skip_child_site_ids, including newly created child sites. Only a default policy can exclude child sites. The value field contains the policy configuration data, with the format varying based on the policy type. When a policy is active, its managed configurations are automatically enforced on applicable child sites, and attribute modifications are not permitted.

Resource Schema

Required

PropertyDescription
policy_type
String
Type of policy. Valid values: settings.
Possible values: settings

Optional

PropertyDescription
name
String
Name for this policy.
description
String
Description for this policy.
value
Dynamic
Policy configuration data. Settings policies accept site settings plus an optional folder_behaviors array for parent-managed root behaviors on child sites. For more information, refer to the Value Hash section of the developer documentation.
skip_child_site_ids
List
IDs of child sites excluded from this default policy.
child_site_ids
List
IDs of child sites explicitly assigned to this non-default policy.
default_policy
Bool
Whether this policy applies to child sites not explicitly assigned to another policy.

Read Only

PropertyDescription
id
Int64
Policy ID.
applied_child_site_ids
List
IDs of child sites that this policy has been applied to. This field is read-only.
created_at
String
When this policy was created.
updated_at
String
When this policy was last updated.

Example Resource

resource "files_child_site_management_policy" "example_child_site_management_policy" {
  value               = {
    color2_left = "#000000"
  }
  skip_child_site_ids = [1, 2]
  child_site_ids      = [1, 2]
  default_policy      = true
  policy_type         = "settings"
  name                = "example"
  description         = "example"
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Child Site Management Policies can be imported by specifying the id.
terraform import files_child_site_management_policy.example_child_site_management_policy 1

Data Source Schema

Required

PropertyDescription
id
Int64
Policy ID.

Read Only

PropertyDescription
policy_type
String
Type of policy. Valid values: settings.
Possible values: settings
name
String
Name for this policy.
description
String
Description for this policy.
value
Dynamic
Policy configuration data. Settings policies accept site settings plus an optional folder_behaviors array for parent-managed root behaviors on child sites. For more information, refer to the Value Hash section of the developer documentation.
applied_child_site_ids
List
IDs of child sites that this policy has been applied to. This field is read-only.
skip_child_site_ids
List
IDs of child sites excluded from this default policy.
child_site_ids
List
IDs of child sites explicitly assigned to this non-default policy.
default_policy
Bool
Whether this policy applies to child sites not explicitly assigned to another policy.
created_at
String
When this policy was created.
updated_at
String
When this policy was last updated.

Example Data Source

data "files_child_site_management_policy" "example_child_site_management_policy" {
  id = 1
}