-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
39 lines (32 loc) · 880 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
terraform {
required_version = ">= 1.5.6"
required_providers {
null = {
source = "hashicorp/null"
version = "~> 3.1.0"
}
snowflake = {
source = "Snowflake-Labs/snowflake"
version = "~> 0.90.0"
}
}
}
resource "snowflake_pipe" "this" {
database = var.database
schema = var.schema
name = var.name
comment = var.comment
copy_statement = var.copy_statement
auto_ingest = var.auto_ingest
aws_sns_topic_arn = var.aws_sns_topic_arn
}
resource "snowflake_pipe_grant" "grant" {
database_name = var.database
schema_name = var.schema
pipe_name = snowflake_pipe.this.name
privilege = var.privilege
roles = var.roles // Example: ["role1", "role2"]
on_future = var.on_future
with_grant_option = var.with_grant_option
enable_multiple_grants = var.enable_multiple_grants
}