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

Error re-creating stream #2201

Open
elventear opened this issue Nov 17, 2023 · 1 comment
Open

Error re-creating stream #2201

elventear opened this issue Nov 17, 2023 · 1 comment
Assignees
Labels
bug Used to mark issues with provider's incorrect behavior category:resource resource:stream Issue connected to the snowflake_stream resource

Comments

@elventear
Copy link

elventear commented Nov 17, 2023

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 '<FQ_NAME>' 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.

@elventear elventear added the bug Used to mark issues with provider's incorrect behavior label Nov 17, 2023
@sfc-gh-jcieslak sfc-gh-jcieslak added category:resource resource:stream Issue connected to the snowflake_stream resource labels May 20, 2024
@sfc-gh-jmichalak sfc-gh-jmichalak self-assigned this Oct 23, 2024
sfc-gh-jmichalak pushed a commit that referenced this issue Nov 8, 2024
##
[0.98.0](v0.97.0...v0.98.0)
(2024-11-08)

Feature scope readiness for V1:
[link](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/v1-preparations/ESSENTIAL_GA_OBJECTS.MD)
([Roadmap
reference](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#wrap-up-the-functional-scope)).
:exclamation: Migration guide: [v0.97.0 ->
v0.98.0](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#v0970--v0980)

### 🎉 What's new
- New resources:
- authentication_policy
([#3098](#3098)),
references
[#2880](#2880)
- external_volume
([#3106](#3106)),
partially references
[#2980](#2980)
- stream_on_directory_table
([#3129](#3129))
- stream_on_view
([#3150](#3150))
- primary_connection, secondary_connection
([#3162](#3162))
- secret_with_basic_authentication, secret_with_generic_string,
secret_with_oauth_authorization_code_grant,
secret_with_oauth_client_credentials
([#3110](#3110)),
([#3141](#3141))
- New data sources:
- connections
([#3155](#3155)),
([#3173](#3173))
- secrets
([#3131](#3131))
- Reworked:
- provider configuration hierarchy
([#3166](#3166)),
references
[#1881](#1881),
[#2145](#2145),
[#2925](#2925),
[#2983](#2983),
[#3104](#3104)
- provider configuration fields
([#3152](#3152))
streams data source
([#3151](#3151))
- SDK upgrades:
- Upgrade tag SDK
([#3126](#3126))
- Recreate streams when they are stale
([#3129](#3129))
### 🔧  Misc
- Add object renaming research summary
([#3172](#3172))
- Test support for object renaming
([#3130](#3130)),
([#3147](#3147)),
([#3154](#3154))
- Add tests to issue
[#3117](#3117)
([#3133](#3133))
- New roadmap entry
([#3158](#3158))
- Test more authentication methods
([#3178](#3178))
- Minor fixes
([#3174](#3174))
### 🐛  Bug fixes
- Apply various fixes
([#3176](#3176)),
this addresses BCR 2024_08, references
[#2717](#2717),
[#3005](#3005),
[#3125](#3125),
[#3127](#3127),
[#3153](#3153)
- Connection and secret data sources tests
([#3177](#3177))
- Fix grant import docs
([#3183](#3183)),
resolves
[#3179](https://github.com/Snowflake-Labs/terraform-provider-snowflake/discussions/3179)
- Fix user resource import
([#3181](#3181))
- Handle external type changes in stream resources
([#3164](#3164))
- Do not use OR REPLACE on initial creation in resources with
copy_grants
([#3129](#3129))
- Address issue
[#2201](#2201)
by introducing new stream resources

Co-authored-by: snowflake-release-please[bot] <105954990+snowflake-release-please[bot]@users.noreply.github.com>
@sfc-gh-jmichalak
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to mark issues with provider's incorrect behavior category:resource resource:stream Issue connected to the snowflake_stream resource
Projects
None yet
Development

No branches or pull requests

3 participants