A Terraform module for configuring a base Snowflake Target integration for use with Snowplow systems.
- Fill variables in terraform.tfvars.tmpl and copy it to
terraform.tfvars
. - Using environment variables for authentication as described in here. Fill the template in snowflake_provider_vars.sh and run
source ./snowflake_provider_vars.sh
to set up your local environment. - Run
terraform init
- Run
terraform apply
Pass authentication parameters directly to Snowflake provider.
provider "snowflake" {
username = "my_user"
account = "my_account"
region = "us-west-2"
role = "ACCOUNTADMIN"
private_key_path = "/path/to/private/key"
}
module "snowflake_target" {
source = "snowplow-devops/target/snowflake"
name = "snowplow"
snowflake_password = "exampleP@ssword1"
}
Name | Version |
---|---|
terraform | >= 1.0.0 |
snowflake | >= 0.45.0 |
Name | Version |
---|---|
snowflake | >= 0.45.0 |
No modules.
Name | Type |
---|---|
snowflake_database.loader | resource |
snowflake_file_format.enriched | resource |
snowflake_schema.atomic | resource |
snowflake_table.events | resource |
snowflake_user.loader | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
name | A name which will be prepended to the created resources | string |
n/a | yes |
snowflake_password | The password to use to connect to the database | string |
n/a | yes |
is_create_database | Should database be created. Set to false, to use an existing one | bool |
true |
no |
override_snowflake_database | Override database name. If not set it will be defaulted to uppercase var.name with "_DATABASE" suffix | string |
"" |
no |
override_snowflake_user | Override snowflake user | string |
"" |
no |
snowflake_file_format_name | Name of the Snowflake file format which is used by stage | string |
"SNOWPLOW_ENRICHED_JSON" |
no |
snowflake_schema | Schema name for snowplow data. Defaults to ATOMIC. | string |
"ATOMIC" |
no |
Name | Description |
---|---|
snowflake_database | Snowflake database name |
snowflake_event_table | Snowflake event table name |
snowflake_file_format | Snowflake file format |
snowflake_password | Password for snowflake_user |
snowflake_schema | Snowflake schema name |
snowflake_user | Snowflake username |
The Terraform Snowflake Target project is Copyright 2022-2022 Snowplow Analytics Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.