Open EpicWink opened 7 months ago
Thanks @EpicWink for raising this issue, are you suggesting that the change P0DT0H3M0S
is not being saved to state file, thus terraform detected a diff during the second plan?
@xiaxyi these values are being written to state - however @EpicWink is suggesting that the values PT3M
and P0DT0H3M0S
are semantically the same value (e.g. 3 months
) just written in a different manner - and thus the Provider shouldn't be detecting a difference between the two (e.g. adding a DiffSuppressFunc
to detect this). From memory there's some normalization happening on the API side here, which is likely where this diff is occurring.
@xiaxyi what @tombuildsstuff said is correct. I'll update the issue description to make that more clear
@tombuildsstuff Ah Thanks for the explanation, shall we add the suppressDiff func for that or would you like me to reach out to the api team for more information?
@EpicWink 👍 thanks for confirming
@xiaxyi a DiffSuppressFunc
seems reasonable on our side to handle this, since it'll be useful in a few places
Is there an existing issue for this?
Community Note
Terraform Version
1.7.5
AzureRM Provider Version
3.97.1
Affected Resource(s)/Data Source(s)
azurerm_servicebus_subscription
Terraform Configuration Files
Note: namespace name is globally unique: pick a random name
Debug Output/Panic Output
not important
Expected Behaviour
Actual Behaviour
The before and after values of
lock_duration
are equivalent (see ISO 8601 durations on Wikipedia), and should not result in an attempt to modify.Steps to Reproduce
terraform apply
terraform plan
Important Factoids
No response
References
No response