[Bug]: Snowpipe Not Being Recreated When Only Integration Changes #2785
Labels
bug
Used to mark issues with provider's incorrect behavior
category:resource
resource:pipe
Issue connected to the snowflake_pipe resource
Terraform CLI Version
1.8.2
Terraform Provider Version
0.87.2
Terraform Configuration
Category
category:resource
Object type(s)
resource:pipe
Expected Behavior
After having created a snowpipe with the above code, if only the integration value is changed (for example going from "TEST_INTEGRATION" to "TEST_INTEGRATION_V2"), the expectation is that the snowpipe will be updated to change the integration after an apply. At the very least, if this doesn't happen, there should be an error message saying the integration was not updated.
Actual Behavior
Upon running terraform plan, the following was returned:
Upon running terraform apply, the following was returned:
However, in Snowflake itself, the pipe's integration remained unchanged, staying as "TEST_INTEGRATION".
Steps to Reproduce
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
I think this issue revolves around how the parameters are set in the snowflake_pipe resource. In the documentation for ALTER PIPE, it states that:
However, comparing the AWS_SNS_TOPIC and INTEGRATION definitions in the pkg/resources/pipe.go file, I noticed that only AWS_SNS_TOPIC has ForceNew=True:
I believe that integration also needs a ForceNew=True in it as well to force recreation of the pipe when the value of the integration parameters is changed. I am not sure though if this is accurate, or if this is the only change that would need to be made - it is just a theory I have from looking a few hours in the code base.
Would you like to implement a fix?
The text was updated successfully, but these errors were encountered: