-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use terraform on Debian #26627
Comments
Hi @kmaikaze, I'm not sure how you ended up with the wrong format binary for the provider.
and
Thanks! |
Hello @jbardin Sure: |
Hi @kmaikaze, The output you saw from the Here's the expected output for that executable:
Unfortunately with this being a relatively large binary file it's not very easy to study to see what's going on, but one way we could look a little closer is to use the $ hexdump -C /tmp/terraform-provider-azurerm_v2.32.0_x5 -n 200
00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
00000010 02 00 3e 00 01 00 00 00 90 4e 46 00 00 00 00 00 |..>......NF.....|
00000020 40 00 00 00 00 00 00 00 c8 01 00 00 00 00 00 00 |@...............|
00000030 00 00 00 00 40 00 38 00 07 00 40 00 0e 00 03 00 |....@.8...@.....|
00000040 06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 |........@.......|
00000050 40 00 40 00 00 00 00 00 40 00 40 00 00 00 00 00 |@.@.....@.@.....|
00000060 88 01 00 00 00 00 00 00 88 01 00 00 00 00 00 00 |................|
00000070 00 10 00 00 00 00 00 00 04 00 00 00 04 00 00 00 |................|
00000080 9c 0f 00 00 00 00 00 00 9c 0f 40 00 00 00 00 00 |..........@.....|
00000090 9c 0f 40 00 00 00 00 00 64 00 00 00 00 00 00 00 |..@.....d.......|
000000a0 64 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 |d...............|
000000b0 01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 |................|
000000c0 00 00 40 00 00 00 00 00 |..@.....|
000000c8 The first four bytes here represent that this is an ELF executable, which is what we expect to see for a Linux build of a Terraform provider. The next 60 (approximately) bytes after that are the ELF header which is what If you could replicate the above on your system using the Thanks! |
Hi @apparentlymart ! I did a workaround by downloading the provider file manually, and replace the file downloaded by terraform:
And after that it looks quite the same as yours.
I've learnt a lot here - thanks for the insights! What bothers me is why this happens while executing |
Hi @kmaikaze , I can't guess why the file was corrupted on your first attempt without some more information: I've not seen this behavior reported before. If you can share a hex dump of the file you had originally then the contents of that for may give a clue as to how it got corrupted. |
The file looks like archived or corrupted:
Anyway, I don't think anyone can figure out what is going on so the issue can be closed. It looks like each time I'm moving the file using VS Code interface or I'm using |
Thanks for sharing that follow-up, @kmaikaze! Indeed, that file content seems weird and not recognizable to me as any particular format. The large sequence of null bytes at the start seems particularly strange. I agree that there probably isn't anything more we can do here without more information, so at your suggestion I'm going to close this and we will wait to see if someone else later encounters a similar situation. I'm the meantime, it might be worth trying to install the providers you use into one of the local directories Terraform searches in preference to the remote registry (see the CLI Configuration docs on Provider Installation) because if that avoids the problem then at least you will only need to do the manual local install once and future |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi there,
I am following tutorial on specially created empty Debian container, I had never any issues with this environment. It looks like azurerm provider is broken
I've followed this walkthrough to install terraform newest version for Linux/Debian distro.
Is there something I'm missing?
Terraform Version
Terraform v0.13.4
Terraform Configuration Files
Debug Output
$ echo $TF_LOG
DEBUG
Crash Output
$ terraform -version
$ az login
$ mkdir learn-terraform-azure && cd $_
$ cat main.tf
$ terraform init
$ terraform plan
$ terraform -version
Expected Behavior
Terraform prints action plan
Actual Behavior
Error: Could not load plugin
Steps to Reproduce
$ az login
$ mkdir learn-terraform-azure && cd $_
create file main.tf with content as specified in https://learn.hashicorp.com/tutorials/terraform/azure-build?in=terraform/azure-get-started#create-your-initial-configuration
$ terraform init
$ terraform plan
Additional Context
Terraform is running in Debian Docker container
References
The text was updated successfully, but these errors were encountered: