terraform-provider-snowflake icon indicating copy to clipboard operation
terraform-provider-snowflake copied to clipboard

snowflake_table_constraint generating SQL with more optional parameters than specified in the resource

Open wpl-sf-nbirch opened this issue 1 year ago • 1 comments

Terraform CLI and Provider Versions

0.87.2

Terraform Configuration

resource "snowflake_table_constraint" "pk_reporting_dim" {
  name     = "PK_REPORTING_DIM"
  type     = "PRIMARY KEY"
  table_id = snowflake_table.reporting_dim.qualified_name
  columns  = ["TAGKEY"]
  rely     = true
}

Expected Behavior

Currently the SQL should only specify optional parameters from resource.

Expected SQL: ALTER TABLE "REPORTING_DIM" ADD CONSTRAINT PK_REPORTING_DIM PRIMARY KEY ("TAGKEY") RELY;

Actual Behavior

Currently the SQL generated will specify more optional parameters than expected.

Generated SQL: ALTER TABLE "REPORTING_DIM" ADD CONSTRAINT PK_REPORTING_DIM PRIMARY KEY ("TAGKEY") DEFERRABLE INITIALLY DEFERRED ENABLE RELY;

Steps to Reproduce

  1. terraform apply

How much impact is this issue causing?

Medium

Logs

No response

Additional Information

No response

wpl-sf-nbirch avatar Mar 18 '24 13:03 wpl-sf-nbirch

Hey @wpl-sf-nbirch. We will handle this topic as part of the resources redesign (https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#supporting-all-snowflake-ga-features).

sfc-gh-asawicki avatar Mar 22 '24 11:03 sfc-gh-asawicki