feat(nimbolus): init a http terraform backend #479
No reviewers
Labels
No labels
awaiting
awaiting-author
awaiting
awaiting-reviewer
bot
deployed
Silenced alert
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DGNum/infrastructure!479
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nimbolus-tf"
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?
HTTP backend for #145 for simple multiple states managing
fcafda6e66d756a39e09d756a39e0941fb43614041fb436140720d11b3d2720d11b3d2c05a96efe2@thubrecht je veux bien que tu review, surtout pour le module, mais il faut pas apply, j'ai un truc à faire juste avant et juste après l'apply
c05a96efe238ab34aaf338ab34aaf322454af58a22454af58a7f14a460d2WIP: feat(nimbolus): init a http terraform backendto feat(nimbolus): init a http terraform backend [DO NOT SIMPLY APPLY]7f14a460d21c4fd38a4d1c4fd38a4d01dc9b142bfeat(nimbolus): init a http terraform backend [DO NOT SIMPLY APPLY]to feat(nimbolus): init a http terraform backendTant qu'on déploie qu'un seul backend terraform, c'est mieux de faire l'arborescence :
@ -0,0 +25,4 @@# from nixpkgs, commit b1371135b5db3fcf728114d92d5bd0218109598a# FIXME: Should be replaced by nixpkgs lib when going to nixos-25.05concatMapAttrsStringSep =Inutile du coup
@ -0,0 +34,4 @@{options.services.nimbolus-tf = {enable = mkEnableOption "the nimbolus terraform http backend";package = mkOption {mkPackageOption@ -0,0 +48,4 @@Environment variables for nimbolus configuration.'';};secretEnvironment = mkOption {À remplace par
environmentFilesi vraiment nécessaire, mais normalement tu peux juste delete@ -0,0 +57,4 @@};};config = mkIf cfg.enable {systemd.services."nimbolus-tf" = {Pas besoin de quote
nimbolus-tfC'est un truc dont on avais déjà parlé, perso je préfère quote quand c'est la key d'un attrsOf
Je comprends mais du coup ça fait deux standards différents dans le repo, et le service quoté a vachement moins d'occurrences. Je te propose qu'on merge en unquoted et je ferai une PR pour tout passer avec des quotes, plus l'écriture d'un fichier
FORMATTING.mdavec des règles à respecter@ -0,0 +62,4 @@wantedBy = [ "multi-user.target" ];serviceConfig = {EnvironmentFile = "-/run/nimbolus-tf/env-file";ExecStart = "${getExe cfg.package}";Pas besoin d'interpolation
@ -0,0 +71,4 @@${concatMapAttrsStringSep "\n" (key: value: ''echo "${key}=$(cat ${value})" >> /run/nimbolus-tf/env-file'') cfg.secretEnvironment}chmod a+r /run/nimbolus-tf/env-fileExtrêmement bof, ton
cfg.environmenttu peux l'inherit dans ton unit systemd et pour les secrets il vaut mieux faire unenvironmentFileSurtout que pour les secrets il existe les variables
KMS_KEY_FILEetSTORAGE_S3_SECRET_KEY_FILE01dc9b142b5514618d215514618d214acbc4104b@ -0,0 +26,4 @@STORAGE_S3_USE_SSL = "true";STORAGE_S3_BUCKET = "nimbolus-dgnum";STORAGE_S3_ACCESS_KEY = "GKefa111701f349de3988f0010";STORAGE_S3_SECRET_KEY_FILE = config.age.secrets."nimbolus-s3_secret".path;Pour ne pas créer d'user distinct, on peut faire:
Et
@ -0,0 +19,4 @@package = (import sources.kat-pkgs { inherit pkgs; }).nimbolus-tf-backend;settings = {LISTEN_ADDR = "127.0.0.1:${toString port}";KMS_KEY_PATH = config.age.secrets."nimbolus-kms_key".path;C'est
KMS_KEY_FILEet on peut faire le même trick avecLoadCredentialyes
4acbc4104b7a9023bed57a9023bed5a7def32a75