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

0.86.0 Snowflake Table Contstraints all failing to create #2553

Closed
rjminchuk opened this issue Feb 24, 2024 · 1 comment
Closed

0.86.0 Snowflake Table Contstraints all failing to create #2553

rjminchuk opened this issue Feb 24, 2024 · 1 comment
Labels
bug Used to mark issues with provider's incorrect behavior

Comments

@rjminchuk
Copy link

Terraform CLI and Provider Versions

Terraform v1.6.3
on darwin_arm64

  • provider registry.terraform.io/aidanmelen/snowsql v1.3.3
  • provider registry.terraform.io/hashicorp/aws v5.38.0
  • provider registry.terraform.io/hashicorp/random v3.6.0
  • provider registry.terraform.io/hashicorp/time v0.10.0
  • provider registry.terraform.io/snowflake-labs/snowflake v0.86.0

Your version of Terraform is out of date! The latest version
is 1.7.4. You can update by downloading from https://www.terraform.io/downloads.html

Terraform Configuration

required_providers {
    snowflake = {
      source  = "Snowflake-Labs/snowflake"
      version = ">=0.53.0"
    }
  }

Expected Behavior

I should be able to create a primary key on a table using provider version 0.86.0.

Actual Behavior

│ Error: table id is incorrect: {TERRAFORM_WORKSPACE|MYAPP|MYTABLE}

│ with module.snowflake.module.my_module["MYTABLE"].snowflake_table_constraint.primary_key,
│ on .terraform/modules/snowflake/modules/my_module/main.tf line 42, in resource "snowflake_table_constraint" "primary_key":
│ 42: resource "snowflake_table_constraint" "primary_key" {

Steps to Reproduce

changelog doens't mention anything about primary keys: https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CHANGELOG.md#0860-2024-02-15

resource "snowflake_table_constraint" "primary_key" {
  columns  = local.upper_primary_keys
  name     = snowflake_table.this.name
  table_id = snowflake_table.this.id
  type     = "PRIMARY KEY"
}

pinning to version 0.85.0 of the provider does not allow apply to complete successfully because resources were created with a newer version of the module:

│ Error: Resource instance managed by newer provider version

│ The current state of module.snowflake.module.my-sub-module["my-table"].snowflake_procedure.etl_proc was created by a newer provider version than is currently selected. Upgrade the snowflake provider to work with this state.

only solution is to destroy resources and redeploy pinned to 0.85.0

How much impact is this issue causing?

High

Logs

No response

Additional Information

No response

@rjminchuk rjminchuk added the bug Used to mark issues with provider's incorrect behavior label Feb 24, 2024
@rjminchuk
Copy link
Author

Closing this as a dupe of #2535

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
Projects
None yet
Development

No branches or pull requests

1 participant