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

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

Open
wpl-sf-nbirch opened this issue Mar 18, 2024 · 1 comment
Labels
bug Used to mark issues with provider's incorrect behavior category:resource resource:table_constraint Issue connected to the snowflake_table_constraint resource

Comments

@wpl-sf-nbirch
Copy link

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 wpl-sf-nbirch added the bug Used to mark issues with provider's incorrect behavior label Mar 18, 2024
@sfc-gh-asawicki
Copy link
Collaborator

sfc-gh-asawicki added a commit that referenced this issue Apr 11, 2024
sfc-gh-asawicki added a commit that referenced this issue Apr 12, 2024
Fixed a few issues (from GH and reported internally):
- Do not swallow error in access token setup (References: #2678)
- Fix import example after v0.85.0 changes (References: #993)
- Fix alter allowed values for tags (reported internally)
- Suppress diff for quoted on_table/on_view in stream resource
(References: #2672)
- Test primary key creation (References: #2674 #2629)
- Fix v0.85.0 state migrator for external functions (References: #2694)
@sfc-gh-jcieslak sfc-gh-jcieslak added resource:table_constraint Issue connected to the snowflake_table_constraint resource category: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_constraint Issue connected to the snowflake_table_constraint resource
Projects
None yet
Development

No branches or pull requests

3 participants