From cd31cb6fa17bd04e4f01074ba547ca1aef0498e9 Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Mon, 7 Sep 2026 23:49:48 +1000 Subject: [PATCH] Import the artifactapi access binding stranded outside state The apply that created authentik_policy_binding.app_access["akP-artifactapi-admin"] read it back off the Authentik Postgres read replica before the row had replicated, got a 404, and dropped it, leaving main red. Import the existing binding c9f22628-d48c-477b-b9ac-a952c7d081ce into state. --- modules/authentik/main.tf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/authentik/main.tf b/modules/authentik/main.tf index c5864bd..d928702 100644 --- a/modules/authentik/main.tf +++ b/modules/authentik/main.tf @@ -284,6 +284,13 @@ resource "authentik_policy_binding" "app_access" { order = 0 } +# Created server-side, but its post-create read-back hit the Authentik Postgres +# read replica before the row replicated and 404'd, so it never reached state. +import { + to = authentik_policy_binding.app_access["akP-artifactapi-admin"] + id = "c9f22628-d48c-477b-b9ac-a952c7d081ce" +} + # Service accounts: non-human identities for automation. Kept out of the group # hierarchy above (which models human app access) and given capabilities through # RBAC roles instead.