Skip to content
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]: snowflake_notification_integration resource parameters type and direction are incorrectly considered as deprecated #3138

Open
1 task
ajain-coveo opened this issue Oct 15, 2024 · 2 comments
Labels
general-usage General help/usage questions resource:notification_integration Issue connected to the snowflake_notification_integration resource

Comments

@ajain-coveo
Copy link

Terraform CLI Version

1.7.4

Terraform Provider Version

0.85.0

Terraform Configuration

For resource - snowflake_notification_integration, the parameters "type" and "direction" are incorrectly considered as deprecated as per the documentation on snowflake terraform provider.
Hence a warning shows up when creating this resource with these params as following:

Warning: Argument is deprecated
│ 
│   with snowflake_notification_integration.snowflake_sns_integration,
│   on notification_integration.tf line 5, in resource "snowflake_notification_integration" "snowflake_sns_integration":5:   direction             = "OUTBOUND"
│ 
│ Will be removed - it is added automatically on the SDK level.


However as per the Snowflake documentation these parameters, "type" and "direction", are still required parameters.  Hence this warning is incorrect and confusing. In my view the warning should be removed.

Category

category:resource

Object type(s)

No response

Expected Behavior

No Warning related to "type" and "direction" parameters in snowflake_notification_integration (Resource)

Actual Behavior

"type" and "direction" parameters show as deprecated in snowflake_notification_integration (Resource)

Steps to Reproduce

  1. Copy the following configuration:
resource "snowflake_notification_integration" "snowflake_sns_integration" {
  name                  = "snowflake_notification_integration_name"
  enabled               = true
  type                  = "QUEUE"
  direction             = "OUTBOUND"
  notification_provider = "AWS_SNS"
  aws_sns_topic_arn     = aws_sns_topic.snowflake_sns_topic.arn
  aws_sns_role_arn      = "aws_sns_role_arn"
}
  1. Run terraform apply

How much impact is this issue causing?

Low

Logs

No response

Additional Information

No response

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@ajain-coveo ajain-coveo added the bug Used to mark issues with provider's incorrect behavior label Oct 15, 2024
@sfc-gh-jmichalak
Copy link
Collaborator

Hi @ajain-coveo 👋

These fields were deprecated because they are filled by the provider itself. Please remove them from the config for now.

Note that we will rework this resource - it's on our Remaining Objects list. We'll probably split this resource into multiple resources based on type and/or direction.

@sfc-gh-asawicki
Copy link
Collaborator

Hey @ajain-coveo. Thanks for reaching out to us.

These parameters are not needed on the resource level. However, they are added automatically (that's what the deprecation message says: Will be removed - it is added automatically on the SDK level.).

The reason is that you can't modify these attributes for the given notification. For example, check the doc for SNS: https://docs.snowflake.com/en/sql-reference/sql/create-notification-integration-queue-outbound-aws (TYPE and DIRECTION are fixed). That's why the provider ignores the provided values for these parameters.

We plan to rework this resource and split it into more granular type-specific resources (like the one for the email we already have), but these attributes will also not be needed then.

@sfc-gh-asawicki sfc-gh-asawicki added general-usage General help/usage questions resource:notification_integration Issue connected to the snowflake_notification_integration resource and removed bug Used to mark issues with provider's incorrect behavior labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general-usage General help/usage questions resource:notification_integration Issue connected to the snowflake_notification_integration resource
Projects
None yet
Development

No branches or pull requests

3 participants