-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource Monitor start_timestamp string format. #1175
Comments
Hey @abrougher1-rbi did you ever come up with a workaround? |
Hi,
But it throws a Snowflake error:
Workaround is to create the resource monitor WITH the start_time, and after apply, remove the start_time from the tf code. :-/ |
I'm also experiencing this bug. I can create a resource monitor successfully with the following code:
But any subsequent runs of the TF project will report non-matching values:
Which obviously fails. Right now the workaround is to update the TF code to use the value
|
Hi all 👋 |
Hey 👋 |
Provider Version
0.37.1
Terraform Version
v1.1.9
Describe the bug
The resource_monitor start_timestamp never matches forcing TF to replace the resource on each run.
# module.account.snowflake_resource_monitor.ingestion_monitor[0] must be replaced -/+ resource "snowflake_resource_monitor" "ingestion_monitor" { ~ id = "INGESTION_MONITOR" -> (known after apply) name = "INGESTION_MONITOR" ~ start_timestamp = "2022-08-17T00:00:00Z" -> "2022-08-17 00:00" # forces replacement - suspend_immediate_triggers = [] -> null - suspend_triggers = [] -> null # (5 unchanged attributes hidden) }
The issue looks like it might be due to the format of the start_timestamp when read from Snowflake vs the timestamp required to set the value in snowflake.
ResourceMonitor Show is likely returning the format "2022-08-17T00:00:00Z" while we set the string to "2022-08-17 00:00" in the config.
https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/pkg/resources/resource_monitor.go#L189
Expected behavior
The snowflake_resource_monitor resource should be created once and not be replaced on every plan.
Additional context
This issue is similar to a previously fixed resource_monitor type bug.
#145
The text was updated successfully, but these errors were encountered: