-
Notifications
You must be signed in to change notification settings - Fork 427
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 Provider v0.76.0 Plugin Crashing #2222
Comments
Hey @leo-mcn. Thanks for creating the issue. Please provide the config you use (ideally, the simplified one showing the issue). The other info is that we are migrating tables to the new SDK, which may be enough to fix the issue. |
I have just had a crash with the same plugin updating grants on Snowpipes,Functions and file formats from the old method to the new snowflake_grant_privileges_to_role resource Stack trace from the terraform-provider-snowflake_v0.76.0 plugin: panic: runtime error: index out of range [1] with length 1 goroutine 71 [running]: |
I think its related to this Error: error granting privileges to account role: 003111 (0A000): SQL compilation error: resource "snowflake_grant_privileges_to_role" "snowpipe_grants" { |
Tried with individual grants for the snowpipes and it still breaks with the below stack trace Stack trace from the terraform-provider-snowflake_v0.76.0 plugin: panic: runtime error: index out of range [1] with length 1 goroutine 71 [running]: |
I work with @leo-mcn and have been digging around. This is an issue in how we define our columns in an internal module: dynamic "column" {
for_each = each.value["columns"]
content {
name = upper(column.key)
type = column.value["type"]
nullable = column.value["nullable"]
comment = column.value["comment"]
default {
expression = column.value["default"]
}
}
} So here, the This was fixed by making the dynamic "column" {
for_each = each.value["columns"]
content {
name = upper(column.key)
type = column.value["type"]
nullable = column.value["nullable"]
comment = column.value["comment"]
dynamic "default" {
for_each = column.value["default"] == null ? [] : [column.value["default"]]
content {
expression = default.value
}
}
} |
@messi198310 you have a problem with the identifiers (using unqualified where the qualified one is expected). Please try to update the config and if this does not help create a separate issue with config provided. |
Terraform CLI and Provider Versions
Provider version v0.76.0
Terraform Configuration
Expected Behavior
Expected for some changes to apply instead of the plugin breaking.
Actual Behavior
Error received below:
Steps to Reproduce
terraform apply
How much impact is this issue causing?
High
Logs
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: