refactor: read cross-root secrets via terraform_remote_state - #52
Draft
nbrieussel wants to merge 1 commit into
Draft
refactor: read cross-root secrets via terraform_remote_state#52nbrieussel wants to merge 1 commit into
nbrieussel wants to merge 1 commit into
Conversation
approle_role_id/secret_id (05-secrets/openbao/managed), the KMS unseal AWS keypair, and the backup bucket S3 credentials/bucket name (10-cluster/local, 10-cluster/scaleway) were hand-copied once into gitignored *.auto.tfvars from another root's `terraform output` and never re-derived. Read them straight off the owning root's state instead (same data.terraform_remote_state pattern already used for dns_scaleway/backup_scaleway), so they can't drift silently. Also drops the last two bare string literals (bucket name, backup bucket access key) that weren't even variables. Verified live: unseal AWS creds and S3 backup creds both confirmed working after a full scaleway cluster restart (bao status: sealed=false, awskms; openbao-init-restore pulled the snapshot from the backup bucket). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ywVH2Xdgo3QJLSueh2k2B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
approle_role_id/approle_secret_id(05-secrets/openbao/managed), the KMS unseal AWS keypair, and the backup bucket S3 credentials/bucket name (10-cluster/local,10-cluster/scaleway) were hand-copied once into gitignored*.auto.tfvarsfrom another root'sterraform outputand never re-derived.data.terraform_remote_state— same pattern already used fordns_scaleway/backup_scalewayin05-secrets/openbao/managed.bucket = "backup-dev-id",AWS_ACCESS_KEY_ID = "SCW8FGA70P4HY3A120KV") that weren't even variables.argocd_admin_password_hash.Test plan
terraform validatepasses on all three touched rootsdata.terraform_remote_stateblock resolves correctly (plan showed no diff on the data source reads themselves)10-cluster/scalewayrestart:bao statusonopenbao-0showsSealed: false/Seal Type: awskms— confirms the unseal creds sourced from02-encryption/awsstate are validopenbao-init-restorejob logs show a successful snapshot download from the backup bucket — confirms the S3 creds sourced from03-storage/scalewaystate are validSynced/Healthypost-restart🤖 Generated with Claude Code
https://claude.ai/code/session_012ywVH2Xdgo3QJLSueh2k2B