-
Notifications
You must be signed in to change notification settings - Fork 420
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 timestamps are always considered to have changed, preventing second terraform apply
#1624
Comments
terraform apply
terraform apply
Any updates on this? Impacted as well. Thank you! |
Another ➕ for this. This makes it really annoying to manage resource monitors with this provider. |
I just hit this exact same issue thinking I had made a mistake. |
Hi I ran into the same issue today, Resource Monitor 'start_timestamp' is always considered 'changed' whenever 'terraform plan' or 'terraform apply'. I can think of two approaches, what do you guys think?
|
Thank you @tekumara! I didn't know Terraform has this 'lifecycle -> ignore_changes' config |
Lifecycle is useful right here and now as a workaround, but long time it's not useful at all, what if we wanted to change the start date of the period i.e. instead of running monthly 1st to 1st now we run 15th to 15th, that wouldn't be possible at the moment without actually recreating the monitors. |
Provider Version 0.66.2 Terraform Version 0.13.6 Is there any news about this problem, I am facing the same problem: Error: error updating resource monitor AIRFLOW_USAGE_MONITOR on airflow_usage_monitor.tf line 6, in resource "snowflake_resource_monitor" "usage_monitor": |
Provider Version 0.68.1 Terraform Version 1.4.6 I am also impacted by this.
|
Same problem here with these providers:
|
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 👋 |
Hi Thanks for getting back to me. Unfortunately, since I opened this issue, the project it was part of was spun out into a separate company, and that company has now gone out of business (not because of this bug don’t worry). So I’m not able to verify I’m afraid. However sounds like a few other people had the same issue so perhaps they can verify. Cheers |
Closing due to long inactivity, they. If anyone thinks the problem is still not resolved, please create another issue. |
Hey, Provider:
terraform plan output:
I think I will need to ignore the changes on this parameter that is not ideal: |
Hey @tamas-paulik |
Provider Version
0.58.2
Terraform Version
1.3.9
Describe the bug
There are actually two issues here, though one is comparatively minor.
The main issue:
Creating a resource monitor with either the start or end timestamp in the format
YYYY-MM-DD HH:mm
works when the monitor is first created, but on subsequent runs ofterraform apply
, those timestamps are picked up as a change fromYYYY-MM-DDTHH:mm-HH:mm
. It appears that the provider is then trying to set the timestamp but not the frequency, triggering the error "Must specify frequency and start time together." The only workaround I've found for this is to taint the resource monitor each time, to force it to be recreated.Setting the extended
YYYY-MM-DDTHH:mm-HH:mm
timestamp for an existing monitor triggers the same error, and that format is not recognised for new monitors either.The second issue, which I discovered by accident, is that the above error is also displayed if creating a monitor with an empty
notify_users
attribute. This is not the end of the world, but is quite confusing.Expected behavior
start_timestamp
notify_users
or the error message returned correctly identifies that the empty set is the problemCode samples and commands
Additional context
N/A
The text was updated successfully, but these errors were encountered: