Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

A Terraform module for preparing Snowflake for loading Snowplow data. It uses Snowflake Loader Setup and Snowflake Target modules to create necessary resources.

Its outputs should be used as input variables of aws/pipeline.

Requirements

Name Version
terraform ~> 1
aws ~> 3.45.0
snowflake 0.25.32

Providers

Name Version
aws ~> 3.45.0

Modules

Name Source Version
snowflake_loader_setup snowplow-devops/snowflake-loader-setup/aws 0.1.0
snowflake_target snowplow-devops/target/snowflake 0.1.0

Resources

Name Type
aws_iam_policy.snowflakedb_load_policy resource
aws_iam_role.snowflakedb_load_role resource
aws_iam_role_policy_attachment.snowflake_role_policy_attachment resource
aws_caller_identity.current data source
aws_iam_policy_document.snowflake_load_assume_role_policy_storage_integration data source
aws_iam_policy_document.snowflake_load_policy data source

Inputs

Name Description Type Default Required
prefix Will be prefixed to all resource names. Use to easily identify the resources created string n/a yes
s3_bucket_name The name of the S3 bucket events will be loaded into string n/a yes
snowflake_account Snowflake account to use string n/a yes
snowflake_loader_password The password to use for the loader user string n/a yes
snowflake_operator_user_role Snowflake user role to pass Snowflake TF provider string n/a yes
snowflake_operator_username Snowflake username to pass Snowflake TF provider string n/a yes
snowflake_private_key_path Private key for accessing Snowflake string n/a yes
snowflake_region Region of Snowflake account string n/a yes
iam_permissions_boundary The permissions boundary ARN to set on IAM roles created string "" no
is_create_database Should database be created. Set to false, to use an existing one bool true no
override_iam_loader_role_name Override transformed stage url, if not set it will be var.name with -snowflakedb-load-role suffix string "" no
override_snowflake_db_name Override database name. If not set it will be defaulted to uppercase var.name with "_DATABASE" suffix string "" no
override_snowflake_loader_role Override loader role name in snowflake, if not set it will be uppercase var.name with "_LOADER_ROLE" suffix string "" no
override_snowflake_loader_user Override loader user name in snowflake, if not set it will be uppercase var.name with _LOADER_USER suffix string "" no
override_snowflake_schema Override snowflake schema string "ATOMIC" no
override_snowflake_wh_name Override warehouse name, if not set it will be defaulted to uppercase var.name with "_WAREHOUSE" suffix string "" no
s3_bucket_object_prefix An optional prefix under which Snowplow data will be saved (Note: your prefix must end with a trailing '/') string "" no
snowflake_file_format_name Name of the Snowflake file format which is used by stage string "SNOWPLOW_ENRICHED_JSON" no
snowflake_wh_auto_resume Whether to enable auto resume which makes automatically resume the warehouse when any statement that requires a warehouse is submitted bool true no
snowflake_wh_auto_suspend Time period to wait before suspending warehouse number 60 no
snowflake_wh_size Size of the Snowflake warehouse to connect to string "XSMALL" no
tags The tags to append to the resources in this module map(string) {} no

Outputs

Name Description
snowflake_database Snowflake database name
snowflake_loader_role Snowflake role for loading snowplow data
snowflake_loader_user The Snowflake user used by Snowflake Loader
snowflake_schema Snowflake schema name
snowflake_transformed_stage_name Name of transformed stage
snowflake_warehouse Snowflake warehouse name