delegated_folders — version 1.2

Source: presets/delegated-folders.satz

Purpose

The ready-made delegation pack for folders: the folders a delegation's account works in, and its roles on those folders alone. It stands in the organization's estate, which creates the folders and keeps them in its state; a workload estate builds inside them as that account, with a workload pack of its own. The account is the base's (presets/delegation.satz): each entry here names the delegation whose account works in the folder.

ONE LIST. One entry of delegated_folders is one folder the pack creates: { name = "shop-frontend" delegation = "shop" } { name = "shop-data" delegation = "shop" parent = "google_folder.data.name" } A delegation works in as many folders as name it, and they need no common root: parent is google_folder.workload_folder.name unless the entry names another folder the estate declares (google_folder.<label>.name) or one that already exists (folders/<id>). The grant names the account by reference, so an entry that names a delegation no entry of delegations declares is refused by the transpile, which lists the accounts that exist. Entries are bound in the estate, added with satz add-entry, or requested by the team as contributes_delegated_folders.

PER FOLDER. The folder <name>, shown under its display_name, the entry's name when left out. Google takes a folder display name of at most 30 letters, digits, spaces, hyphens and underscores that starts and ends with a letter or digit, so the list's pattern refuses an entry whose display name is not one before anything is planned. On the folder, delegated_folders_roles for the delegation's account: create and manage folders and Google projects under it, set the IAM of its projects and enable their APIs. NOT granted: access control on a folder, organization policies, tags, billing administration — so an account cannot grant itself anything on a folder, its own included, and reaches nothing beside the folders it was given. A folder that already exists is declared as an entry and taken over once with satz adopt, which finds it by its display name under its parent. budgets = true adds the organization's budget role on the folder (presets/delegated-budget-role.satz).

WHAT THE WORKLOAD ESTATE READS. The interface <name>, taken beside the delegation's own: delegated_folder, the parent of everything the estate creates, delegated_folder_roles and delegated_budgets, which tell the workload's team what the account holds — satz checks no role in a workload estate. One estate reads one folder's interface: a delegation with two folders is worked in by two estates that run as the same estate account. A folder's name is an interface's name: no project of presets/delegated-projects.satz may carry the same.

NO CLAIM. A delegated folder is a workload's, not a control: this pack witnesses nothing.

Use it

params {
  use_delegated_folders = true

  // the pack's own defaults — copy only the lines you change
  delegated_folders = []
  delegated_folders_roles = [
    "roles/resourcemanager.folderCreator",
    "roles/resourcemanager.folderEditor",
    "roles/resourcemanager.projectCreator",
    "roles/resourcemanager.projectDeleter",
    "roles/resourcemanager.projectIamAdmin",
    "roles/serviceusage.serviceUsageAdmin",
  ]
}

use "presets/delegated-folders.satz" when use_delegated_folders

use_delegated_folders is the gate: while it is falsy the pack contributes nothing — no resources, no params, no claims. It is declared by estate_map, and the estate's own binding wins.

Params

param default
delegated_folders []
delegated_folders_roles [ "roles/resourcemanager.folderCreator", "roles/resourcemanager.folderEditor", "roles/resourcemanager.projectCreator", "roles/resourcemanager.projectDeleter", "roles/resourcemanager.projectIamAdmin", "roles/serviceusage.serviceUsageAdmin" ]

Contributes

resource type labels
google_folder one per entry of delegated_folders, by name
google_folder_iam_member one per entry of delegated_folders, by name, one per entry of delegated_folders, by name

Exports

Outputs of the HCL code and values of the interfaces under interfaces/outgoing/ in every estate that uses this pack: a core export is carried by every interface, another one by its own interface and every interface that uses it. An interface a pack declares is common: every project's folder carries it.

interface output value description
{each.name} delegated_folder "${google_folder.{each.name}.name}" The folder the delegation's account works in: the parent of what its estate creates
{each.name} delegated_folder_roles delegated_folders_roles The roles the account holds on this folder
{each.name} delegated_budgets each.budgets Whether the account may manage budgets for the projects in this folder

{each.name} is written once per entry of delegated_folders, named by the entry's name, and each is one project's own interface, not a common one.

List params

What a project may add to this pack's lists, through contributes_<param> in a file the estate uses after a reviewed pull request; satz check-request checks such a file.

list key fields description
delegated_folders name name matching [a-z][a-z0-9-]*, delegation matching [a-z][a-z0-9-]*, display_name matching [\pL\pN]([\pL\pN_ -]{0,28}[\pL\pN])?, parent, budgets A folder a delegation's account works in: the folder's name, the delegation's name, the name the folder is shown under, its parent, and whether budgets are delegated for it

Claims

None — this pack proves no control by itself.

History

version date change
1.2 2026-11-25 display_name is the entry's name when left out, through the list's defaults, so one google_folder body serves both; the list's pattern holds it to Google's rule for a folder display name — at most 30 letters, digits, spaces, hyphens and underscores, starting and ending with a letter or digit — so an entry whose display name breaks it is refused by the transpile and by satz add-entry, where it failed at apply. terraform.tfvars carries the filled display_name of every entry; nothing a plan shows changes
1.1 2026-11-19 the list is declared with entries where it said request; nothing emitted changes (ADR 0096)
1.0 2026-11-19 first version, the folder half of folder_workload: delegated_folders entries name their delegation where they named a workload; the folder's interface also publishes delegated_folder_roles (ADR 0093)

The whole library's history: the changelog in presets/CHANGELOG.md.

Notes

No notes yet.