From c946a8861adfd6dee13f16b687e768d9091f23fb Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 10 Aug 2021 11:43:24 -0700 Subject: [PATCH] terraform.providers: use allowAliases for exposing deprecated providers --- .../networking/cluster/terraform-providers/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/default.nix b/pkgs/applications/networking/cluster/terraform-providers/default.nix index 3091c957490c..48923330afee 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/default.nix +++ b/pkgs/applications/networking/cluster/terraform-providers/default.nix @@ -3,6 +3,7 @@ , buildGoPackage , fetchFromGitHub , callPackage +, config }: let list = lib.importJSON ./providers.json; @@ -50,12 +51,13 @@ let cloudfoundry = callPackage ./cloudfoundry {}; gandi = callPackage ./gandi {}; hcloud = callPackage ./hcloud {}; - kubernetes-alpha = throw "This has been merged as beta into the kubernetes provider. See https://www.hashicorp.com/blog/beta-support-for-crds-in-the-terraform-provider-for-kubernetes for details"; libvirt = callPackage ./libvirt {}; linuxbox = callPackage ./linuxbox {}; lxd = callPackage ./lxd {}; vpsadmin = callPackage ./vpsadmin {}; vercel = callPackage ./vercel {}; - }; + } // (lib.optionalAttrs (config.allowAliases or false) { + kubernetes-alpha = throw "This has been merged as beta into the kubernetes provider. See https://www.hashicorp.com/blog/beta-support-for-crds-in-the-terraform-provider-for-kubernetes for details"; + }); in automated-providers // special-providers