-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add materialized view resource (#385)
- Loading branch information
Showing
13 changed files
with
991 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "snowflake_materialized_view Resource - terraform-provider-snowflake" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# snowflake_materialized_view (Resource) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "snowflake_materialized_view" "view" { | ||
database = "db" | ||
schema = "schema" | ||
name = "view" | ||
warehouse = "warehouse" | ||
comment = "comment" | ||
statement = <<-SQL | ||
select * from foo; | ||
SQL | ||
or_replace = false | ||
is_secure = false | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **database** (String) The database in which to create the view. Don't use the | character. | ||
- **name** (String) Specifies the identifier for the view; must be unique for the schema in which the view is created. | ||
- **schema** (String) The schema in which to create the view. Don't use the | character. | ||
- **statement** (String) Specifies the query used to create the view. | ||
- **warehouse** (String) The warehouse name. | ||
|
||
### Optional | ||
|
||
- **comment** (String) Specifies a comment for the view. | ||
- **id** (String) The ID of this resource. | ||
- **is_secure** (Boolean) Specifies that the view is secure. | ||
- **or_replace** (Boolean) Overwrites the View if it exists. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# format is database name | schema name | view name | ||
terraform import snowflake_materialized_view.example 'dbName|schemaName|viewName' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# format is database name | schema name | view name | ||
terraform import snowflake_materialized_view.example 'dbName|schemaName|viewName' |
14 changes: 14 additions & 0 deletions
14
examples/resources/snowflake_materialized_view/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
resource "snowflake_materialized_view" "view" { | ||
database = "db" | ||
schema = "schema" | ||
name = "view" | ||
warehouse = "warehouse" | ||
|
||
comment = "comment" | ||
|
||
statement = <<-SQL | ||
select * from foo; | ||
SQL | ||
or_replace = false | ||
is_secure = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.