Skip to content

Commit

Permalink
[docs] stage example (Snowflake-Labs#297)
Browse files Browse the repository at this point in the history
* Create stage example

* Rename examples/stage.tf to examples/stage/stage.tf
  • Loading branch information
dariada authored and Gino John Varghese committed Mar 16, 2021
1 parent 51148ca commit 2f19612
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/stage/stage.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

resource "snowflake_stage" "example_stage" {
name = "EXAMPLE_STAGE"
url = "s3://com.example.bucket/prefix"
database = "EXAMPLE_DB"
schema = "EXAMPLE_SCHEMA"
credentials = "AWS_KEY_ID='${var.example_aws_key_id}' AWS_SECRET_KEY='${var.example_aws_secret_key}'"
}

resource "snowflake_stage_grant" "grant_example_stage" {
database_name = snowflake_stage.example_stage.database
schema_name = snowflake_stage.example_stage.schema
roles = ["LOADER"]
privilege = "OWNERSHIP"
stage_name = snowflake_stage.example_stage.name
}

0 comments on commit 2f19612

Please sign in to comment.