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

VARCHAR data type inconsistent #1271

Open
bennylu2 opened this issue Oct 11, 2022 · 0 comments
Open

VARCHAR data type inconsistent #1271

bennylu2 opened this issue Oct 11, 2022 · 0 comments
Labels
bug Used to mark issues with provider's incorrect behavior category:resource resource:table Issue connected to the snowflake_table resource

Comments

@bennylu2
Copy link
Contributor

0.47.0

The provider version you are using.

1.3.1

The version of Terraform you were using when the bug was encountered.

Describe the bug

When defining a snowflake_table with columns of type VARCHAR(16777216) it creates successfully but any subsequent terraform plans show it wants to modify the column to VARCHAR(16777216) because the type is VARCHAR

      ~ column {
            name     = "NAME"
          ~ type     = "VARCHAR" -> "VARCHAR(16777216)"
            # (1 unchanged attribute hidden)
        }

Updating the resource definition to VARCHAR seems to cause the opposite effect

      ~ column {
            name     = "NAME"
          ~ type     = "VARCHAR(16777216)" -> "VARCHAR"
            # (1 unchanged attribute hidden)
        }

This causes unnecessary diffs during terraform plans

Expected behavior

From Snowflake docs

If no length is specified, the default is the maximum allowed length (16,777,216).

https://docs.snowflake.com/en/sql-reference/data-types-text.html#varchar

Therefore VARCHAR and VARCHAR(16777216) should be synonymous and not show a diff

@bennylu2 bennylu2 added the bug Used to mark issues with provider's incorrect behavior label Oct 11, 2022
@sfc-gh-jcieslak sfc-gh-jcieslak added category:resource resource:table Issue connected to the snowflake_table resource labels May 20, 2024
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:table Issue connected to the snowflake_table resource
Projects
None yet
Development

No branches or pull requests

2 participants