and went execute terraform init give me this error.
Initializing the backend...
Initializing provider plugins...
- Finding hashicorp/aws versions matching "~> 2.70"...
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/aws:
could not connect to registry.terraform.io: Failed to request discovery
document: Get "https://registry.terraform.io/.well-known/terraform.json":
net/http: request canceled while waiting for connection (Client.Timeout
exceeded while awaiting headers)
Unfortunately it seems like Terraform on your system was unable to connect to the Terraform registry in order to see which versions of hashicorp/aws are available, and so the installation failed. This sort of problem is not easy to diagnose remotely because I can’t see any details about your internet connection, what restrictions might be in place on your local network, etc.
terraform init should then find that file and use the local directory instead of accessing the remote Terraform Registry.
With that said, this manual installation method means you won’t be able to automatically upgrade to later versions of the provider, so I’d still recommend trying to understand what setting on your computer or local network is causing Terraform to be unable to connect to registry.terraform.io. If you do later find a way to make that work, you can remove the ~/.local/share/terraform/plugins directory to restore Terraform’s default behavior of accessing the remote registry for direct installation.