Caascad / toolbox

Apache License 2.0
10 stars 10 forks source link

Toolbox Terraform warning #502

Open chorfaX opened 4 months ago

chorfaX commented 4 months ago

DESCRIPTION:

toolbox shows warning messages about Terraform.

trace: terraform_1_0 is deprecated use terraform_1 trace: terraform_1_0_0 is deprecated use terraform_1


POC

abcd1234@EB-L-OR1234567:/sources/toolbox$ toolbox update nix

[toolbox]: Updating toolbox ...
[toolbox]: Running "nix-channel --update toolbox"

unpacking 2 channels...
[toolbox]: Running "nix-env -f '<toolbox>' -u -b"

trace: terraform_1_0 is deprecated use terraform_1
trace: terraform_1_0_0 is deprecated use terraform_1

abcd1234@EB-L-OR1234567:/sources/toolbox$ toolbox list |egrep -i terra

trace: terraform_1_0 is deprecated use terraform_1
trace: terraform_1_0_0 is deprecated use terraform_1
terraform_1               1.7.1      = 1.7.1    Tool for building, changing, and versioning infrastructure
terraform-docs            0.17.0     - ?        A utility to generate documentation from Terraform modules in various output formats
tflint                    0.50.2     - ?        Terraform linter focused on possible errors, best practices, and so on
tflint-ruleset-aws        0.26.0     - ?        TFLint ruleset for terraform-provider-aws

Other messages :

abcd1234@EB-L-OR1234567:/sources/toolbox$ toolbox list-terraform-providers

error:
       … while calling the 'attrNames' builtin
         at «string»:1:27:
            1| with import <toolbox> {}; builtins.attrNames (pkgs.lib.filterAttrs (_: d: pkgs.lib.isDerivation d) pkgs.terraform-providers)
             |                           ^

       … while calling the 'listToAttrs' builtin
         at /nix/store/6pph0f21q7fxgabpydj35p7dkwfqyv4w-nixpkgs-src/lib/attrsets.nix:420:5:
          419|     set:
          420|     listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
             |     ^
          421|

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: the fly terraform provider has been archived by upstream on 2023/10

abcd1234@EB-L-OR1234567:/sources/toolbox$ toolbox doctor

[toolbox]: Running sanity checks:

- Nix installed : OK
warning: 'show-config' is a deprecated alias for 'config show'
- toolbox binary cache : OK
- toolbox channel : OK

All essential tests passed.
[![GitHub Chorfax](https://img.shields.io/github/followers/ChorfaX?label=ChorfaX&style=social)](https://github.com/ChorfaX)
q-b commented 4 months ago

The first error:

trace: terraform_1_0 is deprecated use terraform_1
trace: terraform_1_0_0 is deprecated use terraform_1

is a trace that has been added to catch old calls to terraform in our internal codebase, It can safely be ignored. I agree it should not appears on toolbox update, but I don't know how to handle this in the code base.


The second issue is that list-terraform-providers looks like a hack to get a list of the providers, but upstream changed and has a list of removed providers. This function can probably be fixed.