Skip to content

Commit

Permalink
Add example to views data source documentation
Browse files Browse the repository at this point in the history
References: #3203
  • Loading branch information
sfc-gh-asawicki committed Jan 14, 2025
1 parent 4d11557 commit f70f4d9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 12 additions & 4 deletions docs/data-sources/views.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,22 @@ output "limit_output" {
}
# Filtering (in)
data "snowflake_views" "in" {
data "snowflake_views" "in_account" {
in {
database = "database"
account = true
}
}
output "in_output" {
value = data.snowflake_views.in.views
data "snowflake_views" "in_database" {
in {
database = "<database_name>"
}
}
data "snowflake_views" "in_schema" {
in {
schema = "<database_name>.<schema_name>"
}
}
# Without additional data (to limit the number of calls make for every found view)
Expand Down
16 changes: 12 additions & 4 deletions examples/data-sources/snowflake_views/data-source.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,22 @@ output "limit_output" {
}

# Filtering (in)
data "snowflake_views" "in" {
data "snowflake_views" "in_account" {
in {
database = "database"
account = true
}
}

output "in_output" {
value = data.snowflake_views.in.views
data "snowflake_views" "in_database" {
in {
database = "<database_name>"
}
}

data "snowflake_views" "in_schema" {
in {
schema = "<database_name>.<schema_name>"
}
}

# Without additional data (to limit the number of calls make for every found view)
Expand Down

0 comments on commit f70f4d9

Please sign in to comment.