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

Error access remote module registry - TLS handshake timeout #94

Open
pezhore opened this issue Feb 11, 2022 · 1 comment
Open

Error access remote module registry - TLS handshake timeout #94

pezhore opened this issue Feb 11, 2022 · 1 comment

Comments

@pezhore
Copy link

pezhore commented Feb 11, 2022

I'm running into an issue when trying to parse Terraform code with modules from the registry.

main.tf

# Linux VM module here
module "linuxvms" {
  vm_depends_on = [vsphere_folder.projectFolder]
  for_each     = local.config.linux
  source       = "Terraform-VMWare-Modules/vm/vsphere"
  version      = "3.4.1"
  vmtemp       = data.vsphere_virtual_machine.tmpl_ubuntu_20_04_desktop.name
  instances    = 1
  staticvmname = each.key
  vmrp         = "${data.vsphere_compute_cluster.cluster.name}/Resources"
  vmfolder     = "Infra/pezhore/terratest"
  
  disk_size_gb = [local.config.linux[each.key].disk]

  network = {
    (data.vsphere_network.network.name) = [""] # To use DHCP create Empty list ["",""]; You can also use a CIDR annotation;
  }
  
  dns_server_list  = local.config.networks.main.dns_server_list
  dns_suffix_list  = local.config.networks.main.dns_suffix_list
  vmgateway        = local.config.networks.main.ipv4gateway
  dc               = data.vsphere_datacenter.dc.name
  datastore        = data.vsphere_datastore.datastore.name
}

I would assume the expected behavior is to pull the 3.4.1 module from the Terraform Registry, but instead I'm getting this output:

~/terratest/ > docker run --rm -it -p 9000:9000 -v $(pwd):/src im2nguyen/rover -standalone true -planPath tfplan.binary      
2022/02/11 16:54:44 Starting Rover...
2022/02/11 16:54:44 Initializing Terraform...
2022/02/11 16:55:07 Unable to parse Plan: Unable to initialize Terraform Plan: exit status 1

Error: Error accessing remote module registry

Failed to retrieve available versions for module "linuxvms" (main.tf:1) from
registry.terraform.io: Failed to request discovery document: Get
"https://registry.terraform.io/.well-known/terraform.json": net/http: TLS
handshake timeout.

The behavior is the same when I do not provide the -planPath flag.

We're not doing anything funky with SSL cert/MITM inspection (e.g. Bluecoat), any ideas on what else to try?

EDIT:

I tried a non-module project, and it's failing with the same TLS handshake timeout while querying for providers:

docker run --rm -it -p 9000:9000 -v $(pwd):/src im2nguyen/rover -standalone true --env-file ./.env
2022/02/11 17:58:32 Starting Rover...
2022/02/11 17:58:32 Initializing Terraform...
2022/02/11 17:58:55 Unable to parse Plan: Unable to initialize Terraform Plan: exit status 1

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider vmware/nsxt:
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/vsphere: 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
@pezhore pezhore changed the title Error access remote module registry Error access remote module registry - TLS handshake timeout Feb 11, 2022
@JLUTHE10-ford
Copy link

I'm attempting to use Rover but am experiencing a similar issue. Were you able to resolve this issue?

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

No branches or pull requests

2 participants