Changes to timeouts
only should also be detected and result into an apply
#963
Labels
enhancement
New feature or request
terraform-plugin-framework
Resolved in terraform-plugin-framework
SDK version
Use-cases
Deploy following config:
The default timeouts are set:
Adding the
timeouts
forread = "10m"
, and refresh, the stored meta in state is not changed for the read timeout:Also, the
terraform plan
shows no diff.The only way to update the timeout is to change something in the resource to trigger an apply:
This is fine in most cases, as simply updating the timeout for the resource is meaningless, until any operation happens to the resource, i.e. when applying.
However, there is an unfortunate fact that the new timeout only takes effect after the plan stage (
PlanResourceChange
in context of the proto) during apply, but not before, i.e. the read (ReadResource
in context of the proto) during refresh is still using the old read timeout. This causes issues like hashicorp/terraform-provider-azurerm#14213, where users are managing a collection of same typed resources, the default timeout of it is not long enough to finish the read. In that case, changing thetimeout
for read doesn't work for theterraform apply
/terraform plan
as the refresh part will still use the old timeout, results into timeout.The workaround for this is:
-fresh=false
to avoid refreshing)Both solutions seem not ideal, it would be cool if we can detect the diff for
timeouts
and make an apply to update it.The text was updated successfully, but these errors were encountered: