-
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
[Bug]: Issue creating snowflake alert #3117
Comments
Hey @NaveenAutomate. Thanks for reaching out to us.
|
@sfc-gh-asawicki Regarding the ${var.db_site}, its just chars and upper case |
I will try to reproduce this behavior this week. Just keep in mind, that in case of discovering a problem in the provider logic, the fix will come in the next minor version. We are not providing backward bug fixes for old minor versions because of the experimental state of the project. |
Hey @NaveenAutomate. I tried to reproduce this error multiple ways and I haven't reached such an error. Could you please provide a full minimal working sample with all the attributes filled out (i.e. without vars)? |
This is the plan, just to give an idea on values
|
I still can't reproduce this with 0.96 or 0.92 versions. Please:
One more note: the initial config you pasted have |
Hi @sfc-gh-asawicki , Thanks for the reply!
After adding warehouse parameter it works fine now! |
Great to hear! So we can close the issue? |
not sure if the null needs to be handled, but yea this can be closed! |
- Document two tests for #3117 - Bump acceptance tests build time
- Document two tests for #3117 - Bump acceptance tests build time
## [0.98.0](v0.97.0...v0.98.0) (2024-11-08) Feature scope readiness for V1: [link](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/v1-preparations/ESSENTIAL_GA_OBJECTS.MD) ([Roadmap reference](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#wrap-up-the-functional-scope)). :exclamation: Migration guide: [v0.97.0 -> v0.98.0](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#v0970--v0980) ### 🎉 What's new - New resources: - authentication_policy ([#3098](#3098)), references [#2880](#2880) - external_volume ([#3106](#3106)), partially references [#2980](#2980) - stream_on_directory_table ([#3129](#3129)) - stream_on_view ([#3150](#3150)) - primary_connection, secondary_connection ([#3162](#3162)) - secret_with_basic_authentication, secret_with_generic_string, secret_with_oauth_authorization_code_grant, secret_with_oauth_client_credentials ([#3110](#3110)), ([#3141](#3141)) - New data sources: - connections ([#3155](#3155)), ([#3173](#3173)) - secrets ([#3131](#3131)) - Reworked: - provider configuration hierarchy ([#3166](#3166)), references [#1881](#1881), [#2145](#2145), [#2925](#2925), [#2983](#2983), [#3104](#3104) - provider configuration fields ([#3152](#3152)) streams data source ([#3151](#3151)) - SDK upgrades: - Upgrade tag SDK ([#3126](#3126)) - Recreate streams when they are stale ([#3129](#3129)) ### 🔧 Misc - Add object renaming research summary ([#3172](#3172)) - Test support for object renaming ([#3130](#3130)), ([#3147](#3147)), ([#3154](#3154)) - Add tests to issue [#3117](#3117) ([#3133](#3133)) - New roadmap entry ([#3158](#3158)) - Test more authentication methods ([#3178](#3178)) - Minor fixes ([#3174](#3174)) ### 🐛 Bug fixes - Apply various fixes ([#3176](#3176)), this addresses BCR 2024_08, references [#2717](#2717), [#3005](#3005), [#3125](#3125), [#3127](#3127), [#3153](#3153) - Connection and secret data sources tests ([#3177](#3177)) - Fix grant import docs ([#3183](#3183)), resolves [#3179](https://github.com/Snowflake-Labs/terraform-provider-snowflake/discussions/3179) - Fix user resource import ([#3181](#3181)) - Handle external type changes in stream resources ([#3164](#3164)) - Do not use OR REPLACE on initial creation in resources with copy_grants ([#3129](#3129)) - Address issue [#2201](#2201) by introducing new stream resources Co-authored-by: snowflake-release-please[bot] <105954990+snowflake-release-please[bot]@users.noreply.github.com>
Terraform CLI Version
1.9.5
Terraform Provider Version
0.92.0
Terraform Configuration
Category
category:resource
Object type(s)
resource:alert
Expected Behavior
Alert should be created successfully and apply should not fail
Actual Behavior
Alert is created but terraform failed with
Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.snowflake_alerts.snowflake_alert.slack_alert, provider "provider["registry.terraform.io/snowflake-labs/snowflake"]" produced an unexpected new value:
│ Root object was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Steps to Reproduce
`resource "snowflake_alert" "slack_alert" {
database = var.snowflake_database
name = upper("${var.db_site}SlackEmailNotificationAlert")
schema = var.snowflake_schema
warehouse = var.warehouse
alert_schedule {
interval = 1 #check every minute for new alerts
}
action = "CALL SYSTEM$SEND_EMAIL(integration_name => 'EMAIL_INTEGRATION', recipients => ARRAY_CONSTRUCT(${join(",", formatlist("'%s'", var.email_recipients))}), subject => 'Snowflake Alert Notification', content => 'New alerts have been logged in ${var.alert_table_name} table.');"
condition = "SELECT * FROM ${var.snowflake_database}.${var.snowflake_schema}.${snowflake_table.alert_table.name} WHERE alert_timestamp BETWEEN SNOWFLAKE.ALERT.LAST_SUCCESSFUL_SCHEDULED_TIME() AND SNOWFLAKE.ALERT.SCHEDULED_TIME()"
enabled = true
comment = "Slack Notification alert for new entries in the alert table"
}`
2. terraform apply
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
No response
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: