auth-db backups: provision workload-identity UAMI (tofu only) #26
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
queue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/auth!26
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/auth-db-backup-wi-tofu"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First half of the connection-string -> workload-identity migration for auth-db's CNPG backup writes.
This PR is tofu only — adds Azure-side infrastructure. The chart still uses the connection string until the follow-up PR flips
azureCredentials.Resources
auth-db-backup-writersystem:serviceaccount:auth:auth-dbStorage Blob Data Contributorat container scope (not account) so the UAMI only sees the auth-db backup container's blobsAfter apply
The output
auth_db_backup_writer_client_idwill be available. The follow-up chart PR will:k8s/values.yamlbackups.workloadIdentityClientIdto that client IDserviceAccountTemplate.metadata.annotations.azure.workload.identity/client-idto the Cluster specinheritedMetadata.labels.azure.workload.identity/use: "true"on the podsazureCredentials.connectionString→azureCredentials.inheritFromAzureAD: trueTest plan
tofu fmtcleantofu planshows 3 adds: UAMI, federated credential, role assignment. 0 changes, 0 destroysaz identity show --name auth-db-backup-writer -g auth-rgreturns; clientId matches outputkubectl exec -n auth auth-db-1 -c postgres -- /bin/sh -c 'cat /var/run/secrets/azure/tokens/azure-identity-token | head -c 20'after chart cutover returns a JWT prefix (validates the projected token mount)🤖 Generated with Claude Code
OpenTofu Plan
Click to expand plan output