Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/terraform/hashicorp/null-tw-3.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard-Barrett authored May 12, 2024
2 parents 2552a12 + 4c05a72 commit 7dfabf6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Here's a summary of what each resource does:

- `auto_ingest`: determines whether the pipe will automatically ingest new files from the data source.
- `aws_sns_topic_arn`: specifies the Amazon Resource Name (ARN) of the SNS topic that will send notifications about new data files to ingest.
- `notification_channel`: specifies the channel that will receive notifications about the pipe's activities.
- `comment`: allows you to add a comment or description for the pipe.
- `copy_statement`: is the SQL statement that the pipe will use to copy data from the data source to the Snowflake database.

Expand Down Expand Up @@ -54,7 +53,6 @@ module "snowflake_pipe" {
# Pipe variables
auto_ingest = true
aws_sns_topic_arn = "arn:aws:sns:us-west-2:123456789012:my-topic"
notification_channel = "arn:aws:sns:us-west-2:123456789012:my-channel"
comment = "This is my pipe"
copy_statement = "COPY INTO my_table FROM @my_stage"
database = "my_database"
Expand Down Expand Up @@ -83,7 +81,6 @@ module "snowflake_pipe" {
# Pipe variables
auto_ingest = true
aws_sns_topic_arn = aws_sns_topic.my_topic.arn
notification_channel = aws_sns_topic.my_channel.arn
comment = "This is my advanced pipe"
copy_statement = <<EOF
COPY INTO my_advanced_table
Expand Down Expand Up @@ -189,7 +186,6 @@ No modules.
| <a name="input_database"></a> [database](#input\_database) | The name of the database. | `string` | n/a | yes |
| <a name="input_enable_multiple_grants"></a> [enable\_multiple\_grants](#input\_enable\_multiple\_grants) | A boolean that determines if multiple grants are enabled. | `bool` | `true` | no |
| <a name="input_name"></a> [name](#input\_name) | The name of the pipe. | `string` | n/a | yes |
| <a name="input_notification_channel"></a> [notification\_channel](#input\_notification\_channel) | The notification channel for the pipe. | `string` | `null` | no |
| <a name="input_on_future"></a> [on\_future](#input\_on\_future) | ... | `bool` | `null` | no |
| <a name="input_privilege"></a> [privilege](#input\_privilege) | The privilege for the grant. | `string` | `"USAGE"` | no |
| <a name="input_roles"></a> [roles](#input\_roles) | The roles for the grant. | `list(string)` | `[]` | no |
Expand Down
4 changes: 3 additions & 1 deletion examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ No resources.

## Inputs

No inputs.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_notification_channel"></a> [notification\_channel](#input\_notification\_channel) | The notification channel for the pipe. | `string` | `"arn:aws:sns:us-west-2:123456789012:my-channel"` | no |

## Outputs

Expand Down
17 changes: 15 additions & 2 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,28 @@ terraform {

provider "snowflake" {}

variable "notification_channel" {
description = "The notification channel for the pipe."
type = string
default = "arn:aws:sns:us-west-2:123456789012:my-channel"

}
module "snowflake_pipe" {
source = "../.." # Path to the root of the snowflake-pipe module

# Pipe variables
auto_ingest = true
aws_sns_topic_arn = "arn:aws:sns:us-west-2:123456789012:my-topic"
notification_channel = "arn:aws:sns:us-west-2:123456789012:my-channel"
comment = "This is my pipe"
copy_statement = "COPY INTO my_table FROM @my_stage"

copy_statement = <<EOF
COPY INTO my_table
FROM @my_stage
FILE_FORMAT = (TYPE = 'CSV' FIELD_DELIMITER = ',' SKIP_HEADER = 1)
ON_ERROR = 'CONTINUE'
NOTIFY = '${var.notification_channel}'
EOF

database = "my_database"
name = "my_pipe"
schema = "my_schema"
Expand Down
1 change: 0 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ resource "snowflake_pipe" "this" {
auto_ingest = var.auto_ingest

aws_sns_topic_arn = var.aws_sns_topic_arn
notification_channel = var.notification_channel
}

resource "snowflake_pipe_grant" "grant" {
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ variable "name" {
type = string
}

variable "notification_channel" {
description = "The notification channel for the pipe."
type = string
default = null
}

variable "on_future" {
description = "..."
type = bool
Expand Down

0 comments on commit 7dfabf6

Please sign in to comment.