-
Hey, I want to switch my role as USERADMIN for user provisioning. In that case I want to not use my environment variable SNOWFLAKE_ROLE. I tried to use the below code block(users.tf), but it is not picking the value from provider block, instead using the default role : PUBLIC. However it worked for other resources like databases. I'm using Terraform Cloud. My workspace env variables : SNOWFLAKE_ACCOUNT = mysnowflakeaccount.azure.eastus2.snowfake.com users.tf `provider "snowflake" { alias = "useradmin_user" } This issue is there for warehouse resource provision as well. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I fixed this by using the below format `provider "snowflake" { alias = "useradmin_user" } |
Beta Was this translation helpful? Give feedback.
I fixed this by using the below format
`provider "snowflake" {
alias = "useradmin_user"
role = "USERADMIN"
}
resource "snowflake_user" "nrt_user" {
provider = snowflake.useradmin_user
name = "SQMS_SVC_NRT_USER"
password = "mypassword123"
login_name = "SQMS_SVC_NRT_USER"
comment = "SQMS Kafka user. Created in Mar 2023"
disabled = false
display_name = "SQMS NRT User"
first_name = "SQMS"
last_name = "NRT"
must_change_password = true
}`