Add PAM support (#3438)

* PAM first pass

* Add factory and extend to organization

* Extend to project, add examples

* Add additionalProperties to all objects

* Fix boilerplate

* Expose pam_entitlements to project-factory

* Fix readme

* Move entitlements to second folder/project pass

* extend tests

* Fix readme

* Remove timeouts from inventories
This commit is contained in:
Julio Castillo
2025-10-20 14:50:37 +02:00
committed by GitHub
parent 0759cf5454
commit 48f6b4cd49
36 changed files with 1962 additions and 116 deletions

View File

@@ -18,16 +18,22 @@
locals {
_sa_raw = yamldecode(file("${path.module}/service-agents.yaml"))
service_agents = {
_sa0 = {
for agent in local._sa_raw :
agent.name => {
create_command = (
"gcloud beta services identity create --service=${agent.api} --folder=${local.folder_number}"
)
display_name = agent.display_name
identity = templatestring(agent.identity, {
email = templatestring(agent.identity, {
folder_number = local.folder_number
})
}
}
service_agents = {
for k, v in local._sa0 :
k => merge(v, {
iam_email = "serviceAccount:${v.email}"
})
}
}