Snowflake-Labs / terraform-provider-snowflake

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

Error re-creating stream #2201

Open elventear opened 1 year ago

elventear commented 1 year ago

Provider Version

0.76.0

Terraform Version

1.3.9

Describe the bug

I want to re-create an existing stream, which can be done by marking the Terraform state as tainted. Once done that the Terraform plan will say the following about the object:

is tainted, so must be replaced

Once the plan is applied Terraform will fail with:

Error: error creating stream err = 002002 (42710): SQL compilation error: Object '' already exists.

Expected behavior

Should not fail. Either it drops the stream first of uses CREATE OR REPLACE STREAM, which I can see in the activity the provider is not doing.

Code samples and commands

Please add code examples and commands that were run to cause the problem.

Additional context

Add any other context about the problem here.

sfc-gh-jmichalak commented 1 week ago

Hi @elventear 👋

Sorry for the late response. We've released a new v0.98.0 version (release, migration guide) with new stream resources, based on stream type in CREATE STREAM. Please upgrade to this version and use one of the relevant resources. Note that stream is now deprecated.