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_warehouse""INTEGRATION_WAREHOUSE" {
provider=snowflake.account_adminname="QA_INTEGRATION"warehouse_size=var.integration_warehouse_sizeauto_suspend=60auto_resume=truemin_cluster_count=1max_cluster_count=1scaling_policy="STANDARD"
}
resource"snowflake_user""USER_TALEND" {
provider=snowflake.account_adminname="QA_TALEND"login_name="QA_TALEND"comment="Service account for TALEND in ${var.env}"default_warehouse=snowflake_warehouse.TALEND_WAREHOUSE.namedefault_role=snowflake_role.INTEGRATION_ROLE.namersa_public_key=var.service_accounts_public_keys["TALEND"]
}
resource"snowflake_procedure""psa_data_transformation_procedure" {
name="PSA_DATA_TRANSFORMATION"provider=snowflake.account_admindatabase=snowflake_database.DWH.nameschema=snowflake_schema.DWH_SCHEMAS["PSA"].namecomment="Procedure that executes the merge sql script that reads from STREAMs defined on Debeziun tables and updates the Tables defined in PSA schema."language="JAVASCRIPT"arguments {
name="PSA_BATCH_NUM"type="FLOAT"
}
arguments {
name="PSA_PARALLEL_BATCHES"type="FLOAT"
}
return_type="FLOAT"execute_as="CALLER"statement=<<EOT//some java_script_codeEOT
}
Expected Behavior
Creation of the ressources
Actual Behavior
│ Error: 003001 (42501): SQL access control error:
│ Insufficient privileges to operate on warehouse 'QA_INTEGRATION'
│
│ with snowflake_warehouse.INTEGRATION_WAREHOUSE,
│ on warehouse.tf line 1, in resource "snowflake_warehouse" "INTEGRATION_WAREHOUSE":
│ 1: resource "snowflake_warehouse" "INTEGRATION_WAREHOUSE" {
│
╷
│ Error: 003001 (42501): SQL access control error:
│ Insufficient privileges to operate on user 'QA_TALEND'
│
│ with snowflake_user.USER_TALEND,
│ on user.tf line 45, in resource "snowflake_user" "USER_TALEND":
│ 45: resource "snowflake_user" "USER_TALEND" {
│
╵
│ Error: 002003 (02000): SQL compilation error:
│ Procedure 'DWH_QA.PSA.PSA_DATA_TRANSFORMATION' does not exist or not authorized.
│
│ with snowflake_procedure.psa_data_transformation_procedure,
│ on procedure.tf line 6, in resource "snowflake_procedure" "psa_data_transformation_procedure":
│ 6: resource "snowflake_procedure" "psa_data_transformation_procedure" {
│
Steps to Reproduce
terraform plan
How much impact is this issue causing?
High
Logs
No response
Additional Information
Hello,
When running a terraform plan over this configuration on Ubuntu jammy, I get these errors, even if i am using the snowflake provider with an account admin role (the highest in terms of privileges):
provider "snowflake" { alias = "account_admin" username = "terraform-snowflake" account = "TL66483" authenticator = "JWT" region = "europe-west4.gcp" private_key = $some_private_key role = "ACCOUNTADMIN" }
Note that my colleagues using Mac do not have this problem.
--> we suspect that this problem is OS related (I am using Ubuntu jammy)
Could you please have a look?
Thanks !
The text was updated successfully, but these errors were encountered:
HoudaSebti
changed the title
Error creating snowflake_procedure, snowflake_user and snowflake_warehouse ressources on Ubuntu
[Ubuntu] Error creating snowflake_procedure, snowflake_user and snowflake_warehouse ressources
Feb 22, 2024
The OS problem here is highly unlikely. The more likely possibility is that you have a profile config or env variable which causes the provider to be set with a different config (consult #2242#2294). There is a fix incoming #2551.
Hey @sfc-gh-asawicki .Thanks for your quick reply !
This was indeed the problem, I had a SNOWFLAKE_ROLE environment variable defined in my ~/.bashrc
Unsetting that environment var and bumping to v0.86.0 solved the issue .
Terraform CLI and Provider Versions
Terraform version: 1.5.7
Provider version: 0.84.1
Ubuntu Distribution:
Terraform Configuration
Expected Behavior
Creation of the ressources
Actual Behavior
│ Error: 003001 (42501): SQL access control error:
│ Insufficient privileges to operate on warehouse 'QA_INTEGRATION'
│
│ with snowflake_warehouse.INTEGRATION_WAREHOUSE,
│ on warehouse.tf line 1, in resource "snowflake_warehouse" "INTEGRATION_WAREHOUSE":
│ 1: resource "snowflake_warehouse" "INTEGRATION_WAREHOUSE" {
│
╷
│ Error: 003001 (42501): SQL access control error:
│ Insufficient privileges to operate on user 'QA_TALEND'
│
│ with snowflake_user.USER_TALEND,
│ on user.tf line 45, in resource "snowflake_user" "USER_TALEND":
│ 45: resource "snowflake_user" "USER_TALEND" {
│
╵
│ Error: 002003 (02000): SQL compilation error:
│ Procedure 'DWH_QA.PSA.PSA_DATA_TRANSFORMATION' does not exist or not authorized.
│
│ with snowflake_procedure.psa_data_transformation_procedure,
│ on procedure.tf line 6, in resource "snowflake_procedure" "psa_data_transformation_procedure":
│ 6: resource "snowflake_procedure" "psa_data_transformation_procedure" {
│
Steps to Reproduce
terraform plan
How much impact is this issue causing?
High
Logs
No response
Additional Information
Hello,
When running a terraform plan over this configuration on Ubuntu jammy, I get these errors, even if i am using the snowflake provider with an account admin role (the highest in terms of privileges):
provider "snowflake" { alias = "account_admin" username = "terraform-snowflake" account = "TL66483" authenticator = "JWT" region = "europe-west4.gcp" private_key = $some_private_key role = "ACCOUNTADMIN" }
Note that my colleagues using Mac do not have this problem.
--> we suspect that this problem is OS related (I am using Ubuntu jammy)
Could you please have a look?
Thanks !
The text was updated successfully, but these errors were encountered: