Skip to content
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

[BUG] Error while installing hashicorp/azurerm v3.77.0: local error: tls: bad record MAC #507

Open
Racle opened this issue Mar 13, 2024 · 4 comments
Labels
question Further information is requested

Comments

@Racle
Copy link

Racle commented Mar 13, 2024

New to this tool.

After running "Initializing" for little while, it throws error: (4 times same error)

initializing provider for the import directories: 4 errors occurred:
        * task error: error running terraform init: exit status 1

  Error: Failed to install provider

  Error while installing hashicorp/azurerm v3.77.0: local error: tls: bad record MAC

I'm trying to export resource group with aztfexport resource-group my-rg-group-name.
I'm already logged in with az login.
It creates provider.tf .terraform .terraform.lock.hcl terraform.tf files to current folder.

If I run these commands terraform seems to be working just fine

> rm .terraform* -rf
> terraform init

Initializing the backend...

Successfully configured the backend "local"! Terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...
- Finding hashicorp/azurerm versions matching "3.77.0"...
- Installing hashicorp/azurerm v3.77.0...
- Installed hashicorp/azurerm v3.77.0 (signed by HashiCorp)

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

Is there some step I'm missing with this tool, or is this just broken for now?

Pop!_OS 22.04 LTS

Terraform v1.7.4

"azure-cli": "2.58.0",
"azure-cli-core": "2.58.0",
"azure-cli-telemetry": "1.1.0"

aztfexport version dev // installed with go get
@Racle
Copy link
Author

Racle commented Mar 13, 2024

Quick update.

Relogged with az login (even while everything seemed to work)
Ran aztfexport resource-group --provider-name=azapi my-rg-group-name
Now it seems to be importing data with azapi. seems like that default provider failed for some reason.

@magodo
Copy link
Collaborator

magodo commented Mar 14, 2024

@Racle bad record MAC is a very internal error, which usually means network corruption of some sorts (like a proxy changing the contents of the TCP stream), or a severe issue in the TLS stack.\

So would you please double check your network setup, or try to target to a different provider version of azurerm via --provider-version?

@magodo magodo added the question Further information is requested label Mar 14, 2024
@Racle
Copy link
Author

Racle commented Mar 14, 2024

@magodo tried using version 3.95.0, 3.0.0 and 2.99.0, all have same problem.

And like I said earlier, after removing terraform hidden files and running terraform init, it works as intented and it downloads provider correctly without any errors (but doesn't export resource group of course), so I'm wondering why that can download and install provider correctly while this tool seems to fail the same thing.

@magodo
Copy link
Collaborator

magodo commented Mar 15, 2024

@Racle That is weired... As the tool actually is doing nothing special up to the init part:

One thing you can do is to use the --dev-provider option, which will skip the terraform init, but it requires you have manually initialize the provider, or setup the dev provider settings beforehead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants