- Website: https://www.terraform.io
- Mailing list: Google Groups
Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-$PROVIDER_NAME
$ mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
$ git clone git@github.com:terraform-providers/terraform-provider-$PROVIDER_NAME
Enter the provider directory and build the provider
$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-$PROVIDER_NAME
$ make build
go get github.com/snowflakedb/gosnowflake
If you wish to work on the provider, you'll first need Go installed on your machine (version 1.8+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin
to your $PATH
.
To compile the provider, run make build
. This will build the provider and put the provider binary in the $GOPATH/bin
directory.
$ make build
...
$ $GOPATH/bin/terraform-provider-$PROVIDER_NAME
...
Firstly, to use the provider you will need to create a user within Snowflake that can execute the resource requests made by Terraform
$ export SF_USER
$ export SF_PASSWORD
$ export SF_REGION
$ export SF_ACCOUNT
resource "snowflake_warehouse" "warehouse_terraform" {
name = "dev_wh"
warehouse_size = "SMALL"
auto_resume = false
auto_suspend = 600
comment = "terraform development warehouse"
}
Property | Description | Type | Required |
---|---|---|---|
name |
Name of the Snowflake warehouse | String | TRUE |
max_concurrency_level |
Max concurrent SQL statements that can run on warehouse | String | FALSE |
statement_queued_timeout_in_seconds |
Time, in seconds, an SQL statement can be queued before being cancelled | String | FALSE |
statement_timeout_in_seconds |
Time, in seconds, after which an SQL statement will be terminated | String | FALSE |
warehouse_size |
Size of the warehouse | String | FALSE |
max_cluster_count |
Min number of warehouses | String | FALSE |
min_cluster_count |
Max number of warehouses | String | FALSE |
auto_resume |
Should warehouse should auto resume | Boolean | FALSE |
auto_suspend |
Should warehouse should auto suspend | Boolean | FALSE |
initially_suspended |
Should warehouse start off suspended | Boolean | FALSE |
resource_monitor |
Name of resource monitor assigned to warehouse | Boolean | FALSE |
comment |
Additional comments | String | FALSE |
resource "snowflake_database" "database_terraform" {
name = "dev_db"
comment = "terraform development database"
}
Property | Description | Type | Required |
---|---|---|---|
name |
Name of the Snowflake database | String | TRUE |
comment |
Additional comments | String | FALSE |
resource "snowflake_user" "tf_test_user" {
user = "terraform.test"
host = "mydomain.org"
plaintext_password = "12345QWERTYqwerty"
default_role = "READONLY"
}
Property | Description | Type | Required |
---|---|---|---|
user |
The username of the user | String | TRUE |
host |
Host/TLD associated with the user. The default for this is localhost. This has a direct effect on the Username | String | FALSE |
plaintext_password |
Password of the user. Ensure that passwords conform to the complexity requirements by Snowflake | String | TRUE |
default_role |
Default role the user assumes. Defaults to null |
String | FALSE |