Primary Key columns are updated to nullable after initial apply #1248
Labels
bug
Used to mark issues with provider's incorrect behavior
category:resource
resource:table
Issue connected to the snowflake_table resource
Provider Version
0.40
Terraform Version
0.15.5
Describe the bug
Columns that are a part of the primary key are correctly created with
NOT NULL
. On the next apply, if you do no explicitly define nullable in the column definition, Terraform will update these columns toNULL
.Expected behavior
Although the default of a column nullable is true, I would expect Terraform to account for columns defined in the primary key and consider those to be false by default.
Code samples and commands
Running
terraform plan
displays the change.Mocked up structure that represents our scenario:
Terraform will create the table on the first apply and the
key
column will haveNOT NULL
.The next apply will result in:
The text was updated successfully, but these errors were encountered: