Merge pull request 'Switch to Tofu' (#144) from joerg-ci into main
All checks were successful
checks / test (push) Successful in 31s

Reviewed-on: #144
This commit is contained in:
Mic92 2024-03-12 10:34:43 +00:00
commit 70f74eab20
3 changed files with 17 additions and 13 deletions

View File

@ -4,7 +4,13 @@
, pkgs , pkgs
, lib , lib
, ... , ...
}: { }:
let
convert2Tofu = provider: provider.override (prev: {
homepage = builtins.replaceStrings [ "registry.terraform.io/providers" ] [ "registry.opentofu.org" ] prev.homepage;
});
in
{
devShells.default = pkgs.mkShellNoCC { devShells.default = pkgs.mkShellNoCC {
packages = [ packages = [
pkgs.bashInteractive pkgs.bashInteractive
@ -12,15 +18,13 @@
inputs'.clan-core.packages.clan-cli inputs'.clan-core.packages.clan-cli
((pkgs.terraform.withPlugins (p: [ (pkgs.opentofu.withPlugins (p: builtins.map convert2Tofu [
p.hetznerdns p.hetznerdns
p.hcloud p.hcloud
p.null p.null
p.external p.external
p.local p.local
])).overrideAttrs (old: { ]))
meta = old.meta // { license = lib.licenses.free; };
}))
]; ];
inputsFrom = [ inputsFrom = [
inputs'.clan-core.devShells.default inputs'.clan-core.devShells.default

View File

@ -14,5 +14,5 @@ cleanup() {
} }
trap "cleanup" EXIT trap "cleanup" EXIT
terraform init tofu init
terraform "$@" tofu "$@"

File diff suppressed because one or more lines are too long