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

hcp_azure_peering_connection Data Source times out too soon #377

Closed
crhino opened this issue Aug 22, 2022 · 3 comments
Closed

hcp_azure_peering_connection Data Source times out too soon #377

crhino opened this issue Aug 22, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@crhino
Copy link
Contributor

crhino commented Aug 22, 2022

Terraform Version and Provider Version

Terraform version: v1.0.11
HCP provider version: v0.41.0

Affected Resource(s)

  • hcp_azure_peering_connection

Terraform Configuration Files

data "hcp_azure_peering_connection" "peering" {
  hvn_link              = var.hvn.self_link
  peering_id            = hcp_azure_peering_connection.peering.peering_id
  wait_for_active_state = true
}

Steps to Reproduce

  1. terraform apply
  2. Occasionally HCP Azure peering connection takes a long time to get into ACTIVE state

Expected Behavior

I expect the hcp_azure_peering_connection to keep retrying until it reaches the defined timeout, 35 minutes.

Actual Behavior

The hcp_azure_peering_connection always times out after 20 minutes, even if we set a lower bound timeout of 1m explicitly in the Terraform file.

References

I believe the issue might be in the Terraform SDK, and have opened an issue there: hashicorp/terraform-plugin-sdk#1038

I am writing this issue to track it explicitly for the HCP terraform provider.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@crhino crhino added the bug Something isn't working label Aug 22, 2022
@jjti
Copy link
Contributor

jjti commented Aug 23, 2022

print debugging backs up the above. The d.Timeout(schema.TimeoutRead) calls isn't returning 35min:

func dataSourceAwsNetworkPeeringRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
...
	fmt.Printf("timeout: %s, deadline: %s\n", d.Timeout(schema.TimeoutRead), dead)

}

         timeout: 20m0s, deadline: 2022-08-23 15:08:21.316558 +0200 CEST m=+1284.322956001

@bcmdarroch
Copy link
Contributor

Thanks for investigating this! I'll follow up with the plugin SDK team and see if we can get a fix for the upstream bug.

@bcmdarroch
Copy link
Contributor

Resolved by #389 using workaround suggested in hashicorp/terraform-plugin-sdk#1041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants