terraform-provider-snowflake
terraform-provider-snowflake copied to clipboard
snowflake_resource_monitor is missing the notify_users attribute
Provider Version
$ terraform --version
Terraform v1.2.0
on darwin_arm64
+ provider registry.terraform.io/aidanmelen/snowsql v0.3.0
+ provider registry.terraform.io/chanzuckerberg/snowflake v0.25.36
Describe the bug
snowflake_resource_monitor is missing the notify_users attribute.
https://docs.snowflake.com/en/sql-reference/sql/create-resource-monitor.html#optional-parameters
Expected behavior
snowflake_resource_monitor has the the notify_users attribute.
Code samples and commands
I would expect the schema to support something like this:
resource "snowflake_resource_monitor" "monitor" {
notify_users = [
snowflake_user.foo.name,
]
...
}
The feature-request tag might be more appropriate, but this is also something that we would like to use.
@preynacc and @jrobison-sb - We would also like to use it so Can you Please provide update.
I can put a PR in for this in the near future (assuming there is enough interest)
@nafarlee thanks for adding this feature.
I get NOTIFY_USERS fields of account-level resource monitors must be null. when try to use notify_users for an account level resource monitor which can be done via Snow SQL.
Hmm, I get the same thing in my testing environment, though the Snowflake documentation seems to imply it should work, and the SQL queries being generated are consistent with their recommendations:
CREATE RESOURCE MONITOR "PMFDSRXHCF" NOTIFY_USERS=('A', 'B');
ALTER ACCOUNT SET RESOURCE_MONITOR = "PMFDSRXHCF"; -- NOTIFY_USERS fields of account-level resource monitors must be null.
As I mentioned in that PR, I am far from a Snowflake expert, so I am not sure why this is causing an error (and I especially do not know why it works in Snow SQL). I hope someone else can shed light on this situation. It still works correctly when setting Resource Monitors at the Warehouse level.
On second thought @miditha, it might be better to open a separate bug report, as the scope of this issue was the initial introduction of the feature and should likely be closed.
I am able to use the notify_users meta-argument. I am referring to 0.66.0.
We are closing this issue as part of a cleanup described in announcement. If you believe that the issue is still valid in v0.89.0, please open a new ticket.