Begin adding support for using opentofu through openbao secrets

This commit is contained in:
Kaare Hoff Skovgaard 2025-07-07 23:10:53 +02:00
parent 8e31f30762
commit e61b3b06f3
Signed by: khs
GPG key ID: C7D890804F01E9F0
12 changed files with 551 additions and 39 deletions

View file

@ -229,12 +229,10 @@ in
khscodes.provisioning.pre = {
modules = modules;
secretsSource = cfg.secretsSource;
variablesNeeded = [
"TF_VAR_cloudflare_token"
"TF_VAR_cloudflare_email"
"AWS_ACCESS_KEY_ID"
"AWS_SECRET_ACCESS_KEY"
"TF_VAR_hcloud_api_token"
endspoints = [
"aws"
"cloudflare"
"hcloud"
];
};
}

View file

@ -21,9 +21,17 @@ let
description = "Where to get the secrets for the provisioning from";
default = "vault";
};
variablesNeeded = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "Needed environment variables for the provisioning";
endspoints = lib.mkOption {
type = lib.types.listOf (
lib.types.enum [
"openstack"
"aws"
"unifi"
"hcloud"
"cloudflare"
]
);
description = "Needed endpoints to be used during provisioning";
default = [ ];
};
};