delegated_projects — version 2.1
Source: presets
Purpose
The ready-made delegation pack for projects: the Google projects a delegation's account
works in, and its roles on those projects alone. It stands in the organization's estate,
which creates each project and keeps it in its state; the workload estate, in its own
repository, builds inside it 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 project.
ONE LIST. One entry of delegated_projects,
{ name = "payments" delegation = "payments" }
{ name = "shop-backend" delegation = "shop" }
{ name = "shop-frontend" delegation = "shop" }
is one Google project {customer, shown under its display_name, the
entry's name when left out. Google takes a project display name of 4 to 30 letters, digits,
spaces, hyphens, single and double quotes and exclamation points, so the list's pattern
refuses an entry whose display name is not one — { name = "cat" … } needs a
display_name = "catalog" — before anything is planned. One account works in as many
projects as name its delegation. 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.
WHAT AN ACCOUNT HOLDS ON ITS PROJECT. delegated_projects_roles — the project's IAM and
its services — on that project and nowhere else: it creates no project and reaches none
beside its own. What its estate's resource types need beyond that it grants its own
account in its estate, on the project (google_project_iam_member, which the interface
allows). budgets = true adds the organization's budget role on the project
(presets).
THE PROJECT. Billed to the infrastructure billing account and created in
delegated_projects_folder: the workload folder, google,
unless the estate names another folder it declares or one that already exists. Its apis are
the five below unless the entry states its own list, whole. The team's CALLS are billed
to the delegation's infrastructure project, not to this one: an API a call needs is
asked for in the delegation's entry.
WHAT THE WORKLOAD ESTATE READS. The interface <name>, taken beside the delegation's own:
project_id (an attach point for google_project_iam_member), project_number,
delegated_project_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 project's
interface: an account that works in two
projects is worked in by two estates that run as the same estate account. A project's name is
an interface's name: no folder of presets may carry the same.
MORE IN AN INTERFACE. An interface declared in two files is one interface, so the estate
adds to a project's interface by writing a block of the same name in its own file:
interface "payments" { use interface "network" }.
NO CLAIM. A delegated project is a workload's, not a control: this pack witnesses nothing.
Use it
params {
use_delegated_projects = true
// the pack's own defaults — copy only the lines you change
delegated_projects = []
delegated_projects_folder = "google_folder.workload_folder.name"
delegated_projects_roles = [
"roles/resourcemanager.projectIamAdmin",
"roles/serviceusage.serviceUsageAdmin",
]
}
use "presets/delegated-projects.satz" when use_delegated_projects
use_delegated_projects 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.
Needs from outside the pack:
billing_account_infra— declared byestate_core; use one of them alongside, or declare it in the estate.customer_shortname— declared byestate_core; use one of them alongside, or declare it in the estate.
Params
| param | default |
|---|---|
delegated_projects |
[] |
delegated_projects_folder |
"google |
delegated_projects_roles |
[ "roles |
Questions
What to ask before this pack is configured, and what changing the answer costs.
| asks about | prompt | reversal | blast | recommends |
|---|---|---|---|---|
delegated_projects_folder |
The folder the delegated projects are created in — the workload folder as google, another folder the estate declares as google_folder.<label>.name, or an existing one by its numeric id |
edit | low | — |
delegated_projects_folder — It decides the policies and the grants every project inherits. Changing it afterwards moves every live project between parents.
Contributes
| resource type | labels |
|---|---|
google_project |
one per entry of delegated_projects, by name |
google_project_iam_member |
one per entry of delegated_projects, by name, one per entry of delegated_projects, 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} |
project_id |
"${google |
The project's Google project — attach point for google_project_iam_member |
{each.name} |
project_number |
"${google |
Its number, looked up |
{each.name} |
delegated_project_roles |
delegated_projects_roles |
The roles the delegation's account holds on the project |
{each.name} |
delegated_budgets |
each.budgets |
Whether the account may manage budgets for this project |
{each.name} is written once per entry of delegated_projects, 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_projects |
name |
name matching [a-z][a-z0-9-]*, delegation matching [a-z][a-z0-9-]*, display_name matching [A-Za-z0-9 '"!-]{4,30}, apis, budgets |
A project a delegation's account works in: its name, which is its interface's, the delegation's name, the name the project is shown under, the APIs enabled on it, and whether a budget is delegated for it |
Claims
None — this pack proves no control by itself.
History
| version | date | change |
|---|---|---|
| 2.1 | 2026-11-25 | an entry takes an optional display_name, the project's display name, which is the entry's name when left out; the list's pattern holds it to Google's rule for a project display name — 4 to 30 letters, digits, spaces, hyphens, single and double quotes and exclamation points — so an entry such as { name = "cat" … } is refused by the transpile and by satz add-entry, naming the entry, the field, the value and the pattern, where it failed at tofu validate. Nothing emitted changes for an entry whose name is a valid display name |
| 2.0 | 2026-11-19 | delegated_projects_folder defaults to the workload folder, google, where it was empty, the organization: a project of an estate that did not bind it moves into the workload folder, in place; another parent is still named by binding it. The list is declared with entries where it said request (ADR 0096; BREAKING, see Breaking changes) |
| 1.0 | 2026-11-19 | first version, replacing project_workload: one list, delegated_projects, each entry naming the delegation whose account works in the project; a project has no account, state bucket or group of its own, and the team's calls are billed to the delegation's infrastructure project (ADR 0093) |
The whole library's history: the changelog in presets/CHANGELOG.md.
Notes
No notes yet.