Hello I just wonder if anyone can direct me to why this happens, it was working just fine but last couple of days it switched and now I need to do a sudo terraform init in order to get the provider pkg. here is what I see with the TRACE. Any feedback is greatly appreciated.
TF_LOG=TRACE terraform init
2020/08/25 10:00:56 [INFO] Terraform version: 0.13.0
2020/08/25 10:00:56 [INFO] Go runtime version: go1.14.7
2020/08/25 10:00:56 [INFO] CLI args: []string{"/usr/local/bin/terraform", "init"}
2020/08/25 10:00:56 [DEBUG] Attempting to open CLI config file: /Users/remo/.terraformrc
2020/08/25 10:00:56 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/08/25 10:00:56 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/08/25 10:00:56 [DEBUG] ignoring non-existing provider search directory /Users/remo/.terraform.d/plugins
2020/08/25 10:00:56 [DEBUG] ignoring non-existing provider search directory /Users/remo/Library/Application Support/io.terraform/plugins
2020/08/25 10:00:56 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2020/08/25 10:00:56 [INFO] CLI command args: []string{"init"}
Initializing the backend...
2020/08/25 10:00:56 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/08/25 10:00:56 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/08/25 10:00:56 [DEBUG] New state was assigned lineage "7551f3a2-c323-edb5-8a8a-c8449ab3255b"
2020/08/25 10:00:56 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2020/08/25 10:00:56 [TRACE] Meta.Backend: instantiated backend of type <nil>
2020/08/25 10:00:56 [DEBUG] checking for provisioner in "."
2020/08/25 10:00:56 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/08/25 10:00:56 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory
2020/08/25 10:00:56 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2020/08/25 10:00:56 [TRACE] backend/local: state manager for workspace "default" will:
- read initial snapshot from terraform.tfstate
- write new snapshots to terraform.tfstate
- create any backup at terraform.tfstate.backup
2020/08/25 10:00:56 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2020/08/25 10:00:56 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2020/08/25 10:00:56 [TRACE] statemgr.Filesystem: read nil snapshot
2020/08/25 10:00:56 [TRACE] providercache.fillMetaCache: scanning directory .terraform/plugins
Initializing provider plugins...
2020/08/25 10:00:56 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
- Finding latest version of hashicorp/local...
2020/08/25 10:00:56 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json
2020/08/25 10:01:06 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2020/08/25 10:01:06 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json
- Finding latest version of hashicorp/random...
- Finding latest version of hashicorp/template...
2020/08/25 10:01:16 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2020/08/25 10:01:16 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json
- Finding hashicorp/azurerm versions matching "~> 2.0"...
2020/08/25 10:01:26 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2020/08/25 10:01:26 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/local: could not connect to registry.terraform.io: Failed to request
discovery document: Get
"https://registry.terraform.io/.well-known/terraform.json": net/http: TLS
handshake timeout
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/random: could not connect to registry.terraform.io: Failed to
request discovery document: Get
"https://registry.terraform.io/.well-known/terraform.json": net/http: TLS
handshake timeout
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/template: could not connect to registry.terraform.io: Failed to
request discovery document: Get
"https://registry.terraform.io/.well-known/terraform.json": net/http: TLS
handshake timeout
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/azurerm: could not connect to registry.terraform.io: Failed to
request discovery document: Get
"https://registry.terraform.io/.well-known/terraform.json": net/http: TLS
handshake timeout
> ls -l ~/.terraform.d
total 16
-rw-r--r-- 1 remo staff 316 Aug 25 09:25 checkpoint_cache
-rw-r--r-- 1 remo staff 394 Aug 20 18:50 checkpoint_signature
> curl https://registry.terraform.io/.well-known/terraform.json
{"modules.v1":"/v1/modules/","providers.v1":"/v1/providers/"}