Prisma Cloud: Terraform Error - Context Deadline Exceeded (Client.Timeout exceeded while awaiting headers)

Prisma Cloud: Terraform Error - Context Deadline Exceeded (Client.Timeout exceeded while awaiting headers)

23643
Created On 07/14/23 16:51 PM - Last Modified 04/30/24 08:57 AM


Symptom


A user faces a Context Deadline Exceeded (Client.Timeout exceeded while awaiting headers) error when running a resource block using the Prisma Cloud Terraform provider.

Each provider adds a set of resource types and/or data sources that Terraform can manage.

Every resource type is implemented by a provider; without providers, Terraform can't manage any kind of infrastructure.



Environment


  • Prisma Cloud
  • Terraform


Cause


The cause for this issue is because the client times out before the API endpoint times out. This happens because the default timeout for the Prisma Cloud Terraform provider is set to 90 seconds by default whereas the default timeout for Prisma Cloud CSPM API endpoints is 180 seconds.



Resolution


Changing the timeout to 180 seconds to match the time for Prisma Cloud CSPM APIs resolves this issue. To do this, all you have to do is add the timeout parameter to your provider block in your Terraform script and set it to 180.

Screenshot 2023-07-26 at 3.28.35 PM.png


Additional Information


Prisma Cloud Terraform Provider Documentation

Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000bqQaCAI&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language