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]: Alter Snowflake tables using Terraform #3329

Open
1 task
sumitbourne opened this issue Jan 8, 2025 · 1 comment
Open
1 task

[Bug]: Alter Snowflake tables using Terraform #3329

sumitbourne opened this issue Jan 8, 2025 · 1 comment
Labels
bug Used to mark issues with provider's incorrect behavior resource:table Issue connected to the snowflake_table resource

Comments

@sumitbourne
Copy link

Terraform CLI Version

1.6.0

Terraform Provider Version

1.6.0

Company Name

No response

Terraform Configuration

We are creating the tables, views and Snowpipe in Snowflake using Terraform code. However we are unable to alter the tables or views or Snowpipe. To alter the resources in the Snowflake, we require to drop the objects and recreate it in Terraform. Can you suggest any other ways to alter the resources without dropping in the Snowflake  through terraform.

Category

category:resource

Object type(s)

No response

Expected Behavior

It should alter table using Terraform code.

Actual Behavior

When we change the datatype through terraform, it is not altering the table in the snowflake. We need to drop the table and recreate it.

Steps to Reproduce

  1. Create the snowflake table using terraform code.
  2. Then change the datatype of any column after creation of table in snowflake

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 😎
@sumitbourne sumitbourne added the bug Used to mark issues with provider's incorrect behavior label Jan 8, 2025
@sfc-gh-asawicki sfc-gh-asawicki added the resource:table Issue connected to the snowflake_table resource label Jan 8, 2025
@sfc-gh-asawicki
Copy link
Collaborator

Hey @sumitbourne. Thanks for reaching out to us.

The table resource is still a preview resource. We will address it with the rework (together with other table problems: resource:table Issue connected to the snowflake_table resource ).

One remark here, though. Using ALTER TABLE to change the data type has limitations on its own; you can change type only to the synonym type, and changing to other types will still require recreation (read more here: https://docs.snowflake.com/en/sql-reference/sql/alter-table-column).

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 resource:table Issue connected to the snowflake_table resource
Projects
None yet
Development

No branches or pull requests

2 participants