opentofu: patch plugins to use opentofu plugin registry

This commit is contained in:
Kiara Grouwstra 2024-11-23 12:41:17 +01:00
parent 187ef4d65b
commit d99f51ac60

View File

@ -99,11 +99,24 @@ let
in
test;
plugins = removeAttrs terraform-providers [
"override"
"overrideDerivation"
"recurseForDerivations"
];
plugins =
lib.mapAttrs
(
_: provider:
# use opentofu plugin registry over terraform's
provider.override (oldArgs: {
provider-source-address = lib.replaceStrings [ "https://registry.terraform.io/providers" ] [
"registry.opentofu.org"
] oldArgs.homepage;
})
)
(
removeAttrs terraform-providers [
"override"
"overrideDerivation"
"recurseForDerivations"
]
);
withPlugins =
plugins: