terraform-provider-pagerduty icon indicating copy to clipboard operation
terraform-provider-pagerduty copied to clipboard

Error on Azure pipelines: connection reset by peer

Open ancspiir opened this issue 3 years ago • 3 comments

Hi there,

we are getting Get "https://api.pagerduty.com/*": read tcp IP_address->IP_address: read: connection reset by peer error on every second run on Azure pipelines. This issue is not happening locally, only when running in the pipeline.

Pagerduty provider token is passed as pipeline variable: terraform plan -lock-timeout=30m -var PAGERDUTY_TOKEN=*** -out plan -detailed-exitcode

After refreshing many pagerduty states it is failing with connection reset by peer just for some.

##[error]Terraform command 'plan' failed with exit code '1'.
##[error]╷
│ Error: Get "https://api.pagerduty.com/teams/<id>": read tcp IP_address->IP_address: read: connection reset by peer
│ 
│   with module.<module_name>.<resource>.<name>,
│   on ../../../<name>.tf line 7, in resource "<resource>" "<name>":
│    7: resource "<resource>" "<name>" {

Terraform Version

Terraform: 1.0.2 PagerDuty provider: 1.10.0

Affected Resource(s)

Random terraform PagerDuty resources.

Steps to Reproduce

  1. Azure pipeline
  2. Store PAGERDUTY_TOKEN as variable
  3. terraform plan -lock-timeout=30m -var PAGERDUTY_TOKEN=*** -out plan -detailed-exitcode
  4. Run a second time if the first is successful.

ancspiir avatar Nov 01 '21 13:11 ancspiir

These happen a lot!

stephanebruckert avatar Jun 16 '22 12:06 stephanebruckert

Was there any workaround for this? Happens a lot but not all the time and only on Azure Pipelines ( couldn't replicate the issue locally )

mfmbarros avatar Nov 23 '23 09:11 mfmbarros

This is happening frequently on GitHub Actions too. It's weird that this provider works so poorly via CI providers and perfectly fine locally - I assume there's an undocumented IP rate limit.

This is a major issue as when it crashes whilst creating a service Error: Post "https://api.pagerduty.com/services": read tcp 10.1.180.1:38038->35.163.146.4:443: read: connection reset by peer, the service is sometimes created but isn't present in the state, so re-running results in another error

POST API call to https://api.pagerduty.com/services failed 400 Bad Request. Code: 2001, Errors: [Name has already been taken], Message: Invalid Input Provided

simontabor avatar Feb 16 '24 15:02 simontabor