feat(dns): add dnsimple to terraform configuration
This commit is contained in:
parent
94d1881e10
commit
e3b6cb72b4
|
@ -63,6 +63,7 @@
|
|||
modules = [
|
||||
./terraform
|
||||
{
|
||||
bagel.dnsimple.enable = true;
|
||||
bagel.gandi.enable = true;
|
||||
bagel.hydra.enable = true;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./common.nix
|
||||
./gandi.nix
|
||||
./dnsimple.nix
|
||||
./hydra.nix
|
||||
./state.nix
|
||||
];
|
||||
|
|
49
terraform/dnsimple.nix
Normal file
49
terraform/dnsimple.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf tf genList;
|
||||
cfg = config.bagel.dnsimple;
|
||||
in
|
||||
{
|
||||
options.bagel.dnsimple = {
|
||||
enable = mkEnableOption "the DNSimple configuration";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
terraform.required_providers.dnsimple = {
|
||||
version = "~> 1.7.0";
|
||||
source = "dnsimple/dnsimple";
|
||||
};
|
||||
|
||||
resource.secret_resource.dnsimple_token.lifecycle.prevent_destroy = true;
|
||||
resource.secret_resource.dnsimple_account.lifecycle.prevent_destroy = true;
|
||||
|
||||
provider.dnsimple = {
|
||||
token = tf.ref "resource.secret_resource.dnsimple_token.value";
|
||||
account = tf.ref "resource.secret_resource.dnsimple_account.value";
|
||||
};
|
||||
|
||||
resource.dnsimple_zone.forkos_org = {
|
||||
name = "forkos.org";
|
||||
};
|
||||
|
||||
resource.dnsimple_zone.fleurixos_org = {
|
||||
name = "fleurixos.org";
|
||||
};
|
||||
|
||||
resource.dnsimple_zone.floral_systems = {
|
||||
name = "floral.systems";
|
||||
};
|
||||
|
||||
resource.dnsimple_zone.flowery_systems = {
|
||||
name = "flowery.systems";
|
||||
};
|
||||
|
||||
resource.dnsimple_zone.petalpkgs_org = {
|
||||
name = "petalpkgs.org";
|
||||
};
|
||||
|
||||
resource.dnsimple_zone.vzfdfp_de = {
|
||||
name = "vzfdfp.de";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue