-
Notifications
You must be signed in to change notification settings - Fork 429
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 marked as changed but didn't change, and fails when re-apply it second time #1716
Comments
reviewing the error, seems like TIMESTAMP_OUTPUT_FORMAT is the default terraform-provider-snowflake/pkg/snowflake/resource_monitor.go Lines 261 to 278 in d9f634a
It gets the following timestamp that is different than used in the resource
But the resource doesn't accept other format than "YYYY-MM-DD HH:MM" as input. when trying to change timestamp to the default output format "RM_ETL" = {
quota = 100
frequency = "NEVER"
start_timestamp = "2023-29-03T05:00:00-07:00"
end_timestamp = "2023-11-01T05:00:00-07:00"
notify_triggers = [75, 100]
warehouses = ["ETL"]
} this error happens.
the solution seems to change TIMESTAMP_OUTPUT_FORMAT to the same format than supported in input before the
|
Hello 👋 |
## Changes - Add ValuePresent assert to our custom assertions - Add ToConfigValues function for every model - Update Resource Monitor SDK + unit and integration tests - Update Resource Monitor Resource + acc tests - Handle issues connected to the resource monitor (mostly timestamp format difference causing infinite plan or only trigger updates causing SQL compilation error): - #1500 - #1624 - #1716 - #1754 - #1821 - #1832 - #1990 ## Next pr - Adjust examples and update migration notes - Data source (impl, tests, examples, migration notes) ## References * [CREATE RESOURCE MONITOR](https://docs.snowflake.com/en/sql-reference/sql/create-resource-monitor)
## Changes - Add ValuePresent assert to our custom assertions - Add ToConfigValues function for every model - Update Resource Monitor SDK + unit and integration tests - Update Resource Monitor Resource + acc tests - Handle issues connected to the resource monitor (mostly timestamp format difference causing infinite plan or only trigger updates causing SQL compilation error): - #1500 - #1624 - #1716 - #1754 - #1821 - #1832 - #1990 ## Next pr - Adjust examples and update migration notes - Data source (impl, tests, examples, migration notes) ## References * [CREATE RESOURCE MONITOR](https://docs.snowflake.com/en/sql-reference/sql/create-resource-monitor)
Hey 👋 |
Closing due to long inactivity. Please, create another issue if you think the problem is still not resolved. |
Provider & terraform Version
Describe the bug
Terraform is marking as changed a
snowflake_resource_monitor
resource but it didn't change.Expected behavior
When re-plan without changes it marks resource as changed , when re-apply it fails
Code samples and commands
When executing first
terraform apply
everything seems ok but in snowflake ui the time is not the same than expected form my terraform codeMy Snowflake account is in
switzerland-north.azure
and my timezone isEurope/Madrid
.When re-plan without changes the provider is showing me the resource as changed.
When re-apply ( force it ) it fails
Here there is 3 things to review .
end_timestamp
andstart_timestamp
parameters ?The text was updated successfully, but these errors were encountered: