You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
funcdataSourceAzurePeeringConnection() *schema.Resource {
return&schema.Resource{
Description: "The Azure peering connection data source provides information about a peering connection between an HVN and a peer Azure VNet.",
ReadContext: dataSourceAzurePeeringConnectionRead,
Timeouts: &schema.ResourceTimeout{
Read: 35*time.Minute,
},
...
I expect that the Read timeout value is correctly applied to the data source read (35 minutes in the Go code, 1 minute in the HCL example).
Actual Behavior
For all data source reads, the default 20 minutes timeout appears to be applied.
Steps to Reproduce
References
I attempted to dig a bit into the SDK code, and found the ReadDataApplyfunction, which does not set the data.timeouts field before calling read(), unlike similar functions such asRefreshWithoutUpgrade.
If I am reading that correctly, then we are not correctly sourcing the timeouts set on the Resource.Timeouts field into the ResourceData struct?
The text was updated successfully, but these errors were encountered:
Hi @crhino 👋 Thank you for raising this and sorry you ran into trouble here.
While we can likely bake in data source support for the timeouts mechanism at some point, I did want to mention one workaround here that can be applied today, where the data source is setup to use ReadWithoutTimeout instead of ReadContext.
For example:
funcdataSourceAzurePeeringConnection() *schema.Resource {
return&schema.Resource{
Description: "The Azure peering connection data source provides information about a peering connection between an HVN and a peer Azure VNet.",
ReadWithoutTimeout: dataSourceAzurePeeringConnectionRead,
This will remove the automatic 20 minute timeout that the SDK is applying to the operation. You can of course still setup your own 35 minute timeout within the read logic, if necessary.
SDK version
Relevant provider source code
Github link
Terraform Configuration Files
Debug Output
Expected Behavior
I expect that the Read timeout value is correctly applied to the data source read (35 minutes in the Go code, 1 minute in the HCL example).
Actual Behavior
For all data source reads, the default 20 minutes timeout appears to be applied.
Steps to Reproduce
References
I attempted to dig a bit into the SDK code, and found the
ReadDataApply
function, which does not set thedata.timeouts
field before callingread()
, unlike similar functions such asRefreshWithoutUpgrade
.If I am reading that correctly, then we are not correctly sourcing the timeouts set on the
Resource.Timeouts
field into theResourceData
struct?The text was updated successfully, but these errors were encountered: