You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource"snowflake_role""sandbox_test_user_role" {
provider=snowflake.security_adminname="SANDBOX_TEST_USER_ROLE"comment="A role granting access to test_user's sandbox."
}
resource"snowflake_schema""sandbox_test_user_schema" {
database=snowflake_database.sandbox_db.namename="TEST_USER"comment="test_user's sandbox managed access schema."is_managed=true
}
Expected Behavior
The role comment is created/changed without issue.
Actual Behavior
│ Error: 001003 (42000): SQL compilation error:
│ syntax error line 1 at position 89 unexpected 'sandbox'.
│ syntax error line 1 at position 96 unexpected '.'.
│
│ with snowflake_role.sandbox_test_user_role,
│ on sandbox.tf line 231, in resource "snowflake_role" "sandbox_test_user_role":
│ 231: resource "snowflake_role" "sandbox_test_user_role" {
Steps to Reproduce
terraform apply
How much impact is this issue causing?
Low
Logs
No response
Additional Information
The comment for the snowflake_schema can be created/changed to include the single quote without issue, but doing the same for the role for some reason causes the error. The generated SQL isn't escaping the single quote for the role. From the debug logs:
2024-01-25T13:41:06.971-0300 [DEBUG] provider.terraform-provider-snowflake_v0.84.1: 2024/01/25 13:41:06 [DEBUG] sql-conn-exec: [query ALTER ROLE "SANDBOX_TEST_USER_ROLE" SET COMMENT = 'A role granting access to test_user's sandbox.' err 001003 (42000): SQL compilation error:
2024-01-25T13:41:06.971-0300 [DEBUG] provider.terraform-provider-snowflake_v0.84.1: syntax error line 1 at position 89 unexpected 'sandbox'.
2024-01-25T13:41:06.971-0300 [DEBUG] provider.terraform-provider-snowflake_v0.84.1: syntax error line 1 at position 96 unexpected '.'. duration 514.861625ms args {}] (%!s(<nil>))
The text was updated successfully, but these errors were encountered:
Terraform CLI and Provider Versions
Terraform v1.5.7
on darwin_amd64
Terraform Configuration
Expected Behavior
The role comment is created/changed without issue.
Actual Behavior
│ Error: 001003 (42000): SQL compilation error:
│ syntax error line 1 at position 89 unexpected 'sandbox'.
│ syntax error line 1 at position 96 unexpected '.'.
│
│ with snowflake_role.sandbox_test_user_role,
│ on sandbox.tf line 231, in resource "snowflake_role" "sandbox_test_user_role":
│ 231: resource "snowflake_role" "sandbox_test_user_role" {
Steps to Reproduce
terraform apply
How much impact is this issue causing?
Low
Logs
No response
Additional Information
The comment for the snowflake_schema can be created/changed to include the single quote without issue, but doing the same for the role for some reason causes the error. The generated SQL isn't escaping the single quote for the role. From the debug logs:
vs.
The text was updated successfully, but these errors were encountered: