Closed prubis closed 9 months ago
FYI @SBGoods, added this issue and the PR to the v0.10.0 milestone. The release process for all our providers is now setup to automatically close milestones matching the release names, similar to the terraform-plugin-* projects. 👍
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform CLI and Provider Versions
Terraform v1.5.4 on windows_amd64
Terraform Configuration
Expected Behavior
I would expect both outputs to have the same value.
Actual Behavior
They have different values:
Steps to Reproduce
terraform apply
How much impact is this issue causing?
Low
Logs
No response
Additional Information
The bug is easily worked around by specifying the desired sum offset in terms of the lowest denominator (e.g., I wanted days + hours, so I need to specify the days portion as additional hours), but it's inelegant and certainly undocumented - took me a little while to diagnose!
Suggested fix: Looking at the source, I suggest the issue is that the
setOffsetValues()
function doesn't take into account that it may already be assigning values tooffsetTimestamp
. For example, from lines 396-403:If both
OffsetDays
andOffsetHours
are non-zero, then I think theoffsetTimestamp = timestamp.Add(hours)
step will overwrite the preceedingoffsetTimestamp = timestamp.AddDate(...)
step.Code of Conduct