I am currently seeing some inconsistencies when running the snowflake-labs/snowflake
provider.
There are two different ways that credentials are provided to the provider. The first is via ~/.snowflake/config
, the second is via environment variables.
When running terraform plan
while using ~/.snowflake/config
I get the messaging that no changes have been detected, as expected, however when using the environment variables, terraform complains of drift (specifically a snowflake storage integration with s3), and then further on I get the following error Error: object does not exist or not authorized
for a Snowflake database that is there.
The infrastructure was initially provisioned using ~/.snowflake/config
to authenticate.
I need to be able to get this working with the environment variables for running terraform in CI/CD.
Below are my configurations:
WORKING WITH ~/.snowflake/config
Provider block in main.tf
provider "snowflake" {
profile = "default"
role = "ACCOUNTADMIN"
}
Contents of ~/.snowflake/config
[default]
account='<REDACTED>'
user='<REDACTED>'
password='<REDACTED>'
role='ACCOUNTADMIN'
NOT WORKING WITH ENVIRONMENT VARIABLES
Provider block in main.tf
provider "snowflake" {
role = "ACCOUNTADMIN"
}
Environment variables:
SNOWFLAKE_ACCOUNT="<REDACTED>"
SNOWFLAKE_USER="<REDACTED>"
SNOWFLAKE_ROLE="ACCOUNTADMIN"
SNOWFLAKE_PASSWORD="<REDACTED>"
Any thoughts on to what I may be missing the the environment variables case would be greatly appreciated.
Summary
This text will be hidden