Secrets... abstractions

This commit is contained in:
kat witch 2021-08-08 19:33:21 +01:00
parent 05696b3aea
commit aecc7fa78d
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
5 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,15 @@
{ config, lib, ... }:
with lib;
{
options.kw = {
secrets = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
};
};
config = mkIf (config.kw.secrets != null) {
deploy.tf.variables = genAttrs config.kw.secrets (n: { externalSecret = true; });
};
}