feat(nimbolus): init a http terraform backend #479
No reviewers
Labels
No labels
awaiting
awaiting-author
awaiting
awaiting-reviewer
bot
deployed
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
fcafda6e66
tod756a39e09
d756a39e09
to41fb436140
41fb436140
to720d11b3d2
720d11b3d2
toc05a96efe2
@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
c05a96efe2
to38ab34aaf3
38ab34aaf3
to22454af58a
22454af58a
to7f14a460d2
WIP: feat(nimbolus): init a http terraform backendto feat(nimbolus): init a http terraform backend [DO NOT SIMPLY APPLY]7f14a460d2
to1c4fd38a4d
1c4fd38a4d
to01dc9b142b
feat(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.05
concatMapAttrsStringSep =
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
environmentFile
si 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-tf
C'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.md
avec 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-file
Extrêmement bof, ton
cfg.environment
tu peux l'inherit dans ton unit systemd et pour les secrets il vaut mieux faire unenvironmentFile
Surtout que pour les secrets il existe les variables
KMS_KEY_FILE
etSTORAGE_S3_SECRET_KEY_FILE
01dc9b142b
to5514618d21
5514618d21
to4acbc4104b
@ -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_FILE
et on peut faire le même trick avecLoadCredential
yes
4acbc4104b
to7a9023bed5
7a9023bed5
toa7def32a75