Skip to content

Infostrux-Solutions/terraform-snowflake-role

Repository files navigation

Snowflake Role Terraform Module

Terraform module which creates Roles on Snowflake.

Usage

Simple Role:

Create a single role.

module "role" {
  source  = "Infostrux-Solutions/role/snowflake"
  name   = "EXAMPLE"
}

Role with grants:

Create a single role and grant sysadmin access.

module "role_with_grant" {
  source        = "../../"
  name          = "EXAMPLE_WITH_GRANTS"
  granted_roles = ["SYSADMIN"]
}

Role Hierarchy:

Creates a role hierarchy with two roles.

module "under_sysadmin_role" {
  source        = "../../"
  name          = "UNDER_SYSADMIN"
  granted_roles = ["SYSADMIN"]
}

module "middle_role" {
  source        = "../../"
  name          = "MIDDLE"
  granted_roles = [module.under_sysadmin_role.role_name]
}

Requirements

Name Version
terraform >= 0.13.1
snowflake >=0.40.0

Providers

Name Version
snowflake >=0.40.0

Modules

No modules.

Resources

Name Type
snowflake_role.role resource
snowflake_role_grants.grants resource

Inputs

Name Description Type Default Required
comment Specifies a comment for the user. string "Created by Terraform." no
granted_roles Roles that the role created by the module will have acces. set(string) [] no
name Name of the role. string n/a yes

Outputs

Name Description
role_comment Roles's comment.
role_id Role's id.
role_name Role's name.

Authors

Module is maintained by Infostrux Solutions with help from these awesome contributors.

License

Apache 2 Licensed. See LICENSE for full details.