terraform-provider-snowflake icon indicating copy to clipboard operation
terraform-provider-snowflake copied to clipboard

[Feature]: Support Notification Integrations in snowflake_failover_group

Open brandocomando opened this issue 8 months ago • 1 comments

Company Name

No response

Use Cases or Problem Statement

I'd like to enable notifications on my failover groups to be notified if replication fails. https://docs.snowflake.com/en/user-guide/account-replication-error-notifications#add-an-error-notification-for-a-replication-or-failover-group

Category

category:resource

Object type(s)

No response

Proposal

resource snowflake_failover_group should allow an error_integration input which attaches the notification integration to the failover group if set

How much impact is this issue causing?

Low

Additional Information

No response

Would you like to implement a fix?

  • [ ] Yeah, I'll take it 😎

brandocomando avatar Mar 14 '25 15:03 brandocomando

Hey @brandocomando 👋 Thanks for the request. Currently, we are focusing on providing GA features and minimizing feature gap will be something we would like to do after GA (most likely there will be another entry on the roadmap). For now, I added this feature to our task to update missing features in failover group. If you would like to, we are open for contributions and could give you guidance on what needs to be implemented and how it should be tested.

sfc-gh-jcieslak avatar Mar 17 '25 08:03 sfc-gh-jcieslak

@sfc-gh-jcieslak this is a reasonable take and I understand it.
In the interim is there maybe a way we can update the documentation on this to not note notification integrations as a supported feature if it's not yet going to be supported? The below page suggests that the provider does support it and yet on v2.2.0 it still generates errors when this is set.

https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/failover_group#allowed_integration_types-1

gdelia-pm avatar Jun 26 '25 15:06 gdelia-pm

Hey @gdelia-pm.

Please take a look at the syntax explanation for failover groups: https://docs.snowflake.com/en/sql-reference/sql/create-failover-group#parameters. ALLOWED_INTEGRATION_TYPES is something different from ERROR_INTEGRATION this thread is about.

sfc-gh-asawicki avatar Jun 27 '25 11:06 sfc-gh-asawicki

Hey @gdelia-pm.

Please take a look at the syntax explanation for failover groups: https://docs.snowflake.com/en/sql-reference/sql/create-failover-group#parameters. ALLOWED_INTEGRATION_TYPES is something different from ERROR_INTEGRATION this thread is about.

You're totally correct, I read the issue incorrectly.

Still think the doc's on the terraform side should be updated, because they explicitly note that Notification Integrations are supported, but I don't see it accepting that parameter at all. I do understand that on the snowflake side, there's only partial support for notification integrations, but it seems quite odd for the terraform provider documentation say they are supported when you can't set notification integrations at all.

gdelia-pm avatar Jun 27 '25 19:06 gdelia-pm

@gdelia-pm they are listed because they are supported as part of ALLOWED_INTEGRATION_TYPES. From the docs I linked last time: Type(s) of integrations for which you are enabling replication and failover from the source account to the target account.. You can set these using the provider. What you can't set, and this is not listed in the provider docs, is the ERROR_INTEGRATION; again, from the docs: Specifies the name of the notification integration to use to send notifications when refresh errors occur for the failover group.

sfc-gh-asawicki avatar Jun 30 '25 09:06 sfc-gh-asawicki

I hear you on that, but in practice I've not seen this work.

I only have email notification integrations in my setup, but for my failover config if I set it for replication of my notification integrations, it competes a plan without issues but always fails on apply with the error "Error: INTEGRATIONS must be set in OBJECT_TYPES when setting allowed integration types".

Perhaps I'm doing something wrong but from what I can see there isn't a clear way to get failover support for notification integrations. But as I noted that different that the issue noted here (error notifications) so that doesn't need to be covered, was just suggesting updating the docs if it's expected for it not to work.

gdelia-pm avatar Jul 01 '25 20:07 gdelia-pm