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

data source snowflake_alerts: syntax error line 1 at position 17 unexpected 'IN' #2216

Closed
hieu-cc opened this issue Nov 27, 2023 · 1 comment · Fixed by #2234
Closed

data source snowflake_alerts: syntax error line 1 at position 17 unexpected 'IN' #2216

hieu-cc opened this issue Nov 27, 2023 · 1 comment · Fixed by #2234
Assignees
Labels
bug Used to mark issues with provider's incorrect behavior

Comments

@hieu-cc
Copy link

hieu-cc commented Nov 27, 2023

Terraform CLI and Provider Versions

Terraform v1.6.4
on darwin_arm64
+ provider registry.terraform.io/snowflake-labs/snowflake v0.76.0

Terraform Configuration

data "snowflake_alerts" "current" {
  database = "MYDB"
  schema   = "MYSCHEMA"
}

Expected Behavior

No error, even if the database and schema don't exist.

Actual Behavior

terraform apply

returns:

data.snowflake_alerts.current: Reading...
╷
│ Error: 001003 (42000): SQL compilation error:
│ syntax error line 1 at position 17 unexpected 'IN'.
│
│   with data.snowflake_alerts.current,
│   on main.tf line 1, in data "snowflake_alerts" "current":
│    1: data "snowflake_alerts" "current" {

Steps to Reproduce

  1. terraform apply

How much impact is this issue causing?

High

Logs

https://gist.github.com/hieu-cc/8e37ac3556b5b0f0d3589206aec501a5

Additional Information

No response

@hieu-cc hieu-cc added the bug Used to mark issues with provider's incorrect behavior label Nov 27, 2023
@sfc-gh-asawicki
Copy link
Collaborator

Hey @hieu-cc. Thanks for reporting the issue.

You are right, there is a problem with SQL statement construction for this datasource. The fix is easy, so we will add it to one of the next releases.

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

Successfully merging a pull request may close this issue.

2 participants