Azure / Azure/terraform-provider-azapi
Persistent `504 Gateway Timeout` on `Microsoft.Security/serverVulnerabilityAssessmentsSettings/AzureServersSetting`
- Dominant language
- Go
- Stars
- 244
- Forks
- 97
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 9
Description
Hello,
I'm running v1.9.0 of this provider. I keep facing a 504 Gateway Timeout error, and despite me adding an explicit timeout to this resource:
```terraform
resource "azapi_resource" "DfSMDVMSettings" {
...
timeouts {
read = "15m"
}
}
```
It keeps timing out after about 3 minutes or so. These are the provider debug logs:
```
2025-05-09T15:00:14.362+0200 [DEBUG] provider.terraform-provider-azapi_v1.9.0: May 9 15:00:14.362646 Response: ==> REQUEST/RESPONSE (Try=1/45.128103714s, OpTime=45.12814847s) -- RESPONSE RECEIVED
GET https://management.azure.com/subscriptions/e58b76d5-c5ae-4aee-971a-3d93f34386ce/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/AzureServersSetting?api-version=2023-05-01
Accept: application/json
Authorization: REDACTED
User-Agent: HashiCorp Terraform/1.11.2 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azapi/v1.9.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
X-Ms-Correlation-Request-Id: 46ecbd77-eed6-5642-c82c-f9da8d12eb6a
--------------------------------------------------------------------------------
RESPONSE Status: 504 Gateway Timeout
Cache-Control: no-cache
Content-Length: 146
Content-Type: application/json; charset=utf-8
Date: Fri, 09 May 2025 13:00:14 GMT
Expires: -1
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Cache: REDACTED
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 46ecbd77-eed6-5642-c82c-f9da8d12eb6a
X-Ms-Failure-Cause: service
X-Ms-Request-Id: 8c3fc3b1-ee8b-4f60-8114-834f95acdd2a
X-Ms-Routing-Request-Id: WESTEUROPE:20250509T130014Z:8c3fc3b1-ee8b-4f60-8114-834f95acdd2a
X-Msedge-Ref: REDACTED
--------------------------------------------------------------------------------
{"error":{"code":"GatewayTimeout","message":"The gateway did not receive a response from 'Microsoft.Security' within the specified time period."}}
```
Could this be an issue in this provider, or upstream on Azure's side?
Contributor guide
Research direction
Start with the reported Microsoft.Security/serverVulnerabilityAssessmentsSettings/AzureServersSetting GET request, the Terraform timeouts block, and the provider debug logs. Compare the provider's handling with Azure's 504 response and determine whether the failure is reproducible in the provider or occurs upstream; done means documenting the responsible component and a confirmed reproduction or resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go, terraform
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100