move to openTofu

This commit is contained in:
Julien Malka 2024-02-12 11:02:51 +01:00
parent 34aac32db1
commit 6223578987
No known key found for this signature in database
GPG Key ID: 6FC74C847011FD83
2 changed files with 7 additions and 5 deletions

View File

@ -47,17 +47,19 @@
pkgs.mkShell { pkgs.mkShell {
packages = packages =
let let
halalify = drv: drv.overrideAttrs (_old: { meta = _old.meta // { license = lib.licenses.free; }; }); convert2Tofu = provider: provider.override (prev: {
homepage = builtins.replaceStrings [ "registry.terraform.io/providers" ] [ "registry.opentofu.org" ] prev.homepage;
});
in in
[ [
pkgs.bashInteractive pkgs.bashInteractive
pkgs.sops pkgs.sops
(halalify (pkgs.terraform.withPlugins (p: [ (pkgs.opentofu.withPlugins (p: builtins.map convert2Tofu [
p.hcloud p.hcloud
p.null p.null
p.external p.external
p.local p.local
]))) ]))
]; ];
}; };

View File

@ -2,6 +2,6 @@
set -euo pipefail set -euo pipefail
rm -f .terraform.lock.hcl rm -f .terraform.lock.hcl
terraform init -backend-config="password=$GITLAB_TOKEN" -backend-config="username=$GITLAB_USER" tofu init -backend-config="password=$GITLAB_TOKEN" -backend-config="username=$GITLAB_USER"
terraform apply tofu apply