Skip to content

johndutchover/sfguide-terraform-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraforming Snowflake

Snowflake environment

Cloud Platform Cloud Region Region ID
Microsoft Azure East US 2 (Virginia) eastus2

Setup

Bootstrap Snowflake Account

openssl genrsa -out snowflake_tf_key 4096
openssl rsa -in snowflake_tf_key -pubout -out snowflake_tf_key.pub
openssl pkcs8 -topk8 -inform pem -in snowflake_tf_key -outform PEM -v2 aes-256-cbc -out snowflake_tf_key.p8

Important

When setting the RSA_PUBLIC_KEY in Snowflake, you need to remove the PEM header and delimeters, as well as all spaces and line breaks!

(-----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY-----).

I used a terraform.tfvars file to populate variables defined in the variables.tf file.

Note: The SNOWFLAKE_ACCOUNT variable needs to be in "URL" format. More info here.

Provider deprecation note (v0.74.0 and higher)

Deprecation error message after provider upgrade from 0.66.2 to 0.85.0 #2476.

Since the private_key_path attribute has been deprecated in favor of private_key, use the file() function to read the private key from a file when declaring resources.

provider "snowflake" {
# before
private_key_path = "<filepath>"

# after
private_key = file("<filepath>")
}

Provider deprecation advanced notification

resource snowflake_grant_privileges_to_role is deprecated and will be removed in a future major version release. Please use snowflake_grant_privileges_to_account_role instead.

About

Terraforming Snowflake

Topics

Resources

Stars

Watchers

Forks

Languages