Snowflake-Labs / terraform-provider-snowflake

Terraform provider for managing Snowflake accounts
https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest
MIT License
529 stars 410 forks source link

[Bug]: removal of deprecated notification integration's type and direction shouldn't cause replacement #2851

Closed andreineculau closed 2 days ago

andreineculau commented 3 months ago

Terraform CLI Version

1.8.4

Terraform Provider Version

0.91.0

Terraform Configuration

resource "snowflake_notification_integration" "main" {
  name = local.sf_notification

  enabled   = true
  # type      = "QUEUE"
  # direction = "INBOUND"

  notification_provider        = "GCP_PUBSUB"
  gcp_pubsub_subscription_name = google_pubsub_subscription.main.id
}

Category

category:resource

Object type(s)

resource:notification_integration

Expected Behavior

Removal of the deprecated type and direction should show no changes after terraform plan.

Actual Behavior

terraform plan will show 1 resource to destroy, 1 to create (replacement).

Steps to Reproduce

The obvious: add type+direction, plan, apply, remove type+direction, plan.

How much impact is this issue causing?

High

Logs

No response

Additional Information

In v0.85.0, direction and type of a snowflake_notification_integration were removed=deprecated as they now default to INBOUND, and QUEUE respectively.

Acting on the deprecation warning (removing the two configs), will result in the notification integration to be replaced i.e. tear down the current one, and provision a new one. AFAICS this will cause downtime, and data loss, despite being a noop at core.

Would you like to implement a fix?

sfc-gh-jcieslak commented 3 months ago

Hey @andreineculau πŸ‘‹ It seems that one of the deprecated parameters is still marked as ForceNew. I'll try to make a pr today and remove the ForceNew. That should fix it and you'll be able to remove both parameters from the configuration.

sfc-gh-jcieslak commented 2 months ago

Hey @andreineculau The fix was recently released, please check if your problem was resolved in the latest version and let me know or just close the issue. Thanks

sfc-gh-jcieslak commented 2 days ago

Closing due to long inactivity. If the problem still occurs, please create another issue and link this one.