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

net/http: TLS handshake timeout when using multiple providers in Terraform0.12 #852

Closed
ghost opened this issue Aug 14, 2019 · 2 comments
Closed

Comments

@ghost
Copy link

ghost commented Aug 14, 2019

This issue was originally opened by @varmax2511 as hashicorp/terraform#22456. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.12.6

Terraform Configuration Files

# providers for all regions

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "us-phoenix-1"
  alias            = "phx"
}

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "us-ashburn-1"
  alias            = "iad"
}

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "eu-frankfurt-1"
  alias            = "fra"
}

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "uk-london-1"
  alias            = "lhr"
}

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "ca-toronto-1"
  alias            = "yyz"
}

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "ap-tokyo-1"
  alias            = "nrt"
}

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "ap-seoul-1"
  alias            = "icn"
}

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "ap-mumbai-1"
  alias            = "bom"
}

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "eu-zurich-1"
  alias            = "zrh"
}

provider "oci" {
  tenancy_ocid     = "${var.tenancy_ocid}"
  user_ocid        = "${var.user_ocid}"
  fingerprint      = "${var.fingerprint}"
  private_key_path = "${var.private_key_path}"
  region           = "sa-saopaulo-1"
  alias            = "gru"
}

# data source for all DRGs

data "oci_core_vcns" "phx_drgs" {
  provider       = "oci.phx"
  compartment_id = "${var.compartment_ocid}"
}

data "oci_core_vcns" "iad_drgs" {
  provider       = "oci.iad"
  compartment_id = "${var.compartment_ocid}"
}

data "oci_core_vcns" "fra_drgs" {
  provider       = "oci.fra"
  compartment_id = "${var.compartment_ocid}"
}

data "oci_core_vcns" "lhr_drgs" {
  provider       = "oci.lhr"
  compartment_id = "${var.compartment_ocid}"
}

data "oci_core_vcns" "yyz_drgs" {
  provider       = "oci.yyz"
  compartment_id = "${var.compartment_ocid}"
}

data "oci_core_vcns" "nrt_drgs" {
  provider       = "oci.nrt"
  compartment_id = "${var.compartment_ocid}"
}

data "oci_core_vcns" "icn_drgs" {
  provider       = "oci.icn"
  compartment_id = "${var.compartment_ocid}"
}

data "oci_core_vcns" "bom_drgs" {
  provider       = "oci.bom"
  compartment_id = "${var.compartment_ocid}"
}

data "oci_core_vcns" "zrh_drgs" {
  provider       = "oci.zrh"
  compartment_id = "${var.compartment_ocid}"
}

data "oci_core_vcns" "gru_drgs" {
  provider       = "oci.gru"
  compartment_id = "${var.compartment_ocid}"
}

Debug Output

2019-08-13T16:12:31.384-0700 [DEBUG] plugin.terraform-provider-oci_v3.37.0_x4: DEBUG 2019/08/13 16:12:31.384344 log.go:168: Get https://.........: net/http: TLS handshake timeout

Expected Behavior

Plan should have succeeded.

Actual Behavior

Plan fails with TLS handshake error consistently when using Terraform0.12.6. The plan succeeds when using Terraform v0.11.11 or when using Terraform 0.12.6 with terraform plan -parallelism=1

Steps to Reproduce

  1. terraform init
  2. terraform plan

Additional Context

The issue is reproduced consistently in the above script which has 10 Terraform OCI provider, for 10 different regions and has 10 data sources, one per provider.
When Terraform plan is executed on this script using Terraform 0.11.11 , the script always executes successfully. However, when the script is executed using Terraform 0.12.6, some of the datasources always return net/http: TLS handshake timeout. The exact datasources change based on execution but the issue is always reproduced.
When setting the -parallelism=1 with Terraform 0.12, the script executes successfully. I tried running the script on different terraform versions since 0.12.4 to 0.12.6 and different OCI provider versions am able to reproduce the issue.

@alexng-canuck
Copy link
Member

This is not an issue with the provider. For some reason, HashiBot thinks this is an OCI provider issue but we explicitly filed this against Terraform repo as the behavior differs between Terraform versions.

@paultyng
Copy link
Contributor

reopened issue on core

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