terraform-provider-time
terraform-provider-time copied to clipboard
time_static attributes should be determinable on plan
Terraform CLI and Provider Versions
terraform_version: 1.1.4
Use Cases or Problem Statement
I have a use-case for the time module as I want to determine the time in seconds since epoch. This is used as an input in other resources that we create. Thus we created our resource called "example_time_resource"
resource "time_static" "example_time_resource" {
rfc3339 = "2023-07-01T00:00:00Z"
}
However, our tf plan doesn't comprehensively describe changes to a resource if we use the following resource example. On tf plan, this is what is displayed.
resource "time_static" "example_time_resource" {
+ day = (known after apply)
+ hour = (known after apply)
+ id = (known after apply)
+ minute = (known after apply)
+ month = (known after apply)
+ rfc3339 = "2023-07-01T00:00:00Z"
+ second = (known after apply)
+ unix = (known after apply)
+ year = (known after apply)
}
And thus anything that uses time_static.example_time_resource.unix
for example comes out as (known after apply)
Proposal
In the plan, we can ideally identify these attributes in advance in the plan: On tf plan
resource "time_static" "example_time_resource" {
+ day = 1
+ hour = 0
+ id = "2023-07-01T00:00:00Z"
+ minute = 0
+ month = 7
+ rfc3339 = "2023-07-01T00:00:00Z"
+ second = 0
+ unix = 1698364800
+ year = 2023
}
This would allow us to have more descriptive plans if we use the time_static
resource.
How much impact is this issue causing?
Low
Additional Information
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct