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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for time_rotating.time1 to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/time" produced an invalid new value for
│ .rotation_rfc3339: was cty.StringVal("0001-01-01T00:00:00Z"), but now cty.StringVal("2022-12-22T12:13:38Z").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Expected Behavior
The actual value of rotation_minutes has not changed, so the resource should not be changed.
The actual value has to be calculated outside of terraform, because terraform's abilities to calculate days between timestamps (or minutes in this minimal example) is limited.
Actual Behavior
The apply produced an inconsistent final plan and will fail with the panic message. The original plan wants to change the time resource to a unix timestamp:
Hi @TobiTh,
Sorry that you are running into this issue here. This issue likely stems from the rotation_minutes attribute being updated with an Unknown value during planning. Unfortunately, due to the nature of this resource, we cannot fix this issue as it would cause preemptive rotations to occur.
In terms of your particular configuration, I would suggest removing the depends_on clause from data.local_file.minutes, normally data sources are read during planning but the depends_on clause causes the value of data.local_file.minutes.content to be Unknown during planning. If you can change the value of the minutes file outside of Terraform, then you can circumvent this error.
Hi @SBGoods, thank you for your suggestion. Sadly the depends_on is necessary as we need to calculate the minutes (via powershell as terraform cannot calculate minutes between dates) and write the result into the file to be consumed via the time_rotating resource.
Community Note
Terraform Version
Terraform v1.3.6
on windows_386
Affected Resource(s)
Terraform Configuration Files
Panic Output
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for time_rotating.time1 to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/time" produced an invalid new value for
│ .rotation_rfc3339: was cty.StringVal("0001-01-01T00:00:00Z"), but now cty.StringVal("2022-12-22T12:13:38Z").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Expected Behavior
The actual value of
rotation_minutes
has not changed, so the resource should not be changed.The actual value has to be calculated outside of terraform, because terraform's abilities to calculate days between timestamps (or minutes in this minimal example) is limited.
Actual Behavior
The apply produced an inconsistent final plan and will fail with the panic message. The original plan wants to change the time resource to a unix timestamp:
Steps to Reproduce
terraform plan --out tf_plan.out
terraform apply .\tf_plan.out
Important Factoids
No. Running everything locally in a local state.
The text was updated successfully, but these errors were encountered: