forked from fediversity/fediversity
centralize TF providers (#586)
Reviewed-on: fediversity/fediversity#586
This commit is contained in:
parent
c3e3c9fde9
commit
ddbd7abbb2
9 changed files with 41 additions and 117 deletions
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
sources,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
|
@ -34,7 +33,6 @@ in
|
|||
|
||||
environment.systemPackages = [
|
||||
deploy
|
||||
(pkgs.callPackage ../../run/tf-single-host/tf.nix { inherit sources; })
|
||||
];
|
||||
|
||||
# needed only when building from deployer
|
||||
|
|
|
|||
35
deployment/run/providers.nix
Normal file
35
deployment/run/providers.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
sources = import ../../npins;
|
||||
mkProvider =
|
||||
args:
|
||||
pkgs.terraform-providers.mkProvider (
|
||||
{ mkProviderFetcher = { repo, ... }: sources.${repo}; } // args
|
||||
);
|
||||
in
|
||||
{
|
||||
netbox = mkProvider {
|
||||
owner = "e-breuninger";
|
||||
repo = "terraform-provider-netbox";
|
||||
rev = "v5.0.0";
|
||||
spdx = "MPL-2.0";
|
||||
# hash = "sha256-iCaCt8ZbkxCk43QEyj3PeHYuKPCPVU2oQ78aumH/l6k=";
|
||||
hash = null;
|
||||
vendorHash = "sha256-Q3H/6mpkWn1Gw0NRMtKtkBRGHjPJZGBFdGwfalyQ4Z0=";
|
||||
homepage = "https://registry.terraform.io/providers/e-breuninger/netbox";
|
||||
provider-source-address = "registry.opentofu.org/e-breuninger/netbox";
|
||||
};
|
||||
proxmox = mkProvider {
|
||||
owner = "bpg";
|
||||
repo = "terraform-provider-proxmox";
|
||||
# 0.82+ need go 1.25
|
||||
rev = "v0.81.0";
|
||||
spdx = "MPL-2.0";
|
||||
hash = null;
|
||||
vendorHash = "sha256-cpei22LkKqohlE76CQcIL5d7p+BjNcD6UQ8dl0WXUOc=";
|
||||
homepage = "https://registry.terraform.io/providers/bpg/proxmox";
|
||||
provider-source-address = "registry.opentofu.org/bpg/proxmox";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,24 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
sources = import ../../../npins;
|
||||
mkProvider =
|
||||
args:
|
||||
pkgs.terraform-providers.mkProvider (
|
||||
{ mkProviderFetcher = { repo, ... }: sources.${repo}; } // args
|
||||
);
|
||||
in
|
||||
(pkgs.callPackage ../../tf.nix { }).withPlugins (_: [
|
||||
(mkProvider {
|
||||
owner = "e-breuninger";
|
||||
repo = "terraform-provider-netbox";
|
||||
rev = "v5.0.0";
|
||||
spdx = "MPL-2.0";
|
||||
# hash = "sha256-iCaCt8ZbkxCk43QEyj3PeHYuKPCPVU2oQ78aumH/l6k=";
|
||||
hash = null;
|
||||
vendorHash = "sha256-Q3H/6mpkWn1Gw0NRMtKtkBRGHjPJZGBFdGwfalyQ4Z0=";
|
||||
homepage = "https://registry.terraform.io/providers/e-breuninger/netbox";
|
||||
provider-source-address = "registry.opentofu.org/e-breuninger/netbox";
|
||||
})
|
||||
(pkgs.callPackage ../providers.nix { }).netbox
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,24 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
sources = import ../../../npins;
|
||||
mkProvider =
|
||||
args:
|
||||
pkgs.terraform-providers.mkProvider (
|
||||
{ mkProviderFetcher = { repo, ... }: sources.${repo}; } // args
|
||||
);
|
||||
in
|
||||
(pkgs.callPackage ../../tf.nix { }).withPlugins (_: [
|
||||
(mkProvider {
|
||||
owner = "e-breuninger";
|
||||
repo = "terraform-provider-netbox";
|
||||
rev = "v5.0.0";
|
||||
spdx = "MPL-2.0";
|
||||
# hash = "sha256-iCaCt8ZbkxCk43QEyj3PeHYuKPCPVU2oQ78aumH/l6k=";
|
||||
hash = null;
|
||||
vendorHash = "sha256-Q3H/6mpkWn1Gw0NRMtKtkBRGHjPJZGBFdGwfalyQ4Z0=";
|
||||
homepage = "https://registry.terraform.io/providers/e-breuninger/netbox";
|
||||
provider-source-address = "registry.opentofu.org/e-breuninger/netbox";
|
||||
})
|
||||
(pkgs.callPackage ../providers.nix { }).netbox
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,24 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
sources = import ../../../npins;
|
||||
mkProvider =
|
||||
args:
|
||||
pkgs.terraform-providers.mkProvider (
|
||||
{ mkProviderFetcher = { repo, ... }: sources.${repo}; } // args
|
||||
);
|
||||
in
|
||||
(pkgs.callPackage ../../tf.nix { }).withPlugins (_: [
|
||||
(mkProvider {
|
||||
owner = "e-breuninger";
|
||||
repo = "terraform-provider-netbox";
|
||||
rev = "v5.0.0";
|
||||
spdx = "MPL-2.0";
|
||||
# hash = "sha256-iCaCt8ZbkxCk43QEyj3PeHYuKPCPVU2oQ78aumH/l6k=";
|
||||
hash = null;
|
||||
vendorHash = "sha256-Q3H/6mpkWn1Gw0NRMtKtkBRGHjPJZGBFdGwfalyQ4Z0=";
|
||||
homepage = "https://registry.terraform.io/providers/e-breuninger/netbox";
|
||||
provider-source-address = "registry.opentofu.org/e-breuninger/netbox";
|
||||
})
|
||||
(pkgs.callPackage ../providers.nix { }).netbox
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,24 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
sources = import ../../../npins;
|
||||
mkProvider =
|
||||
args:
|
||||
pkgs.terraform-providers.mkProvider (
|
||||
{ mkProviderFetcher = { repo, ... }: sources.${repo}; } // args
|
||||
);
|
||||
in
|
||||
(pkgs.callPackage ../../tf.nix { }).withPlugins (_: [
|
||||
(mkProvider {
|
||||
owner = "e-breuninger";
|
||||
repo = "terraform-provider-netbox";
|
||||
rev = "v5.0.0";
|
||||
spdx = "MPL-2.0";
|
||||
# hash = "sha256-iCaCt8ZbkxCk43QEyj3PeHYuKPCPVU2oQ78aumH/l6k=";
|
||||
hash = null;
|
||||
vendorHash = "sha256-Q3H/6mpkWn1Gw0NRMtKtkBRGHjPJZGBFdGwfalyQ4Z0=";
|
||||
homepage = "https://registry.terraform.io/providers/e-breuninger/netbox";
|
||||
provider-source-address = "registry.opentofu.org/e-breuninger/netbox";
|
||||
})
|
||||
(pkgs.callPackage ../providers.nix { }).netbox
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,25 +1,7 @@
|
|||
{
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
sources = import ../../../npins;
|
||||
mkProvider =
|
||||
args:
|
||||
pkgs.terraform-providers.mkProvider (
|
||||
{ mkProviderFetcher = { repo, ... }: sources.${repo}; } // args
|
||||
);
|
||||
in
|
||||
(pkgs.callPackage ../../tf.nix { }).withPlugins (p: [
|
||||
p.external
|
||||
(mkProvider {
|
||||
owner = "bpg";
|
||||
repo = "terraform-provider-proxmox";
|
||||
# 0.82+ need go 1.25
|
||||
rev = "v0.81.0";
|
||||
spdx = "MPL-2.0";
|
||||
hash = null;
|
||||
vendorHash = "sha256-cpei22LkKqohlE76CQcIL5d7p+BjNcD6UQ8dl0WXUOc=";
|
||||
homepage = "https://registry.terraform.io/providers/bpg/proxmox";
|
||||
provider-source-address = "registry.opentofu.org/bpg/proxmox";
|
||||
})
|
||||
(pkgs.callPackage ../providers.nix { }).proxmox
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,26 +1,8 @@
|
|||
{
|
||||
pkgs,
|
||||
}:
|
||||
let
|
||||
sources = import ../../../npins;
|
||||
mkProvider =
|
||||
args:
|
||||
pkgs.terraform-providers.mkProvider (
|
||||
{ mkProviderFetcher = { repo, ... }: sources.${repo}; } // args
|
||||
);
|
||||
in
|
||||
(pkgs.callPackage ../../tf.nix { }).withPlugins (p: [
|
||||
p.external
|
||||
p.null
|
||||
(mkProvider {
|
||||
owner = "bpg";
|
||||
repo = "terraform-provider-proxmox";
|
||||
# 0.82+ need go 1.25
|
||||
rev = "v0.81.0";
|
||||
spdx = "MPL-2.0";
|
||||
hash = null;
|
||||
vendorHash = "sha256-cpei22LkKqohlE76CQcIL5d7p+BjNcD6UQ8dl0WXUOc=";
|
||||
homepage = "https://registry.terraform.io/providers/bpg/proxmox";
|
||||
provider-source-address = "registry.opentofu.org/bpg/proxmox";
|
||||
})
|
||||
(pkgs.callPackage ../providers.nix { }).proxmox
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
(pkgs.callPackage ../../tf.nix { }).withPlugins (p: [ p.external ])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue