Skip to content

Commit

Permalink
.maybe adding it into the resource.tf can get this through doc autoge…
Browse files Browse the repository at this point in the history
…neration and validation
  • Loading branch information
sfc-gh-dszmolka committed Dec 26, 2024
1 parent f21c49c commit 6dc4b60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 0 additions & 5 deletions docs/resources/stage.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ resource "snowflake_stage" "example_stage" {

-> **Note** Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult [identifiers guide](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/guides/identifiers#new-computed-fully-qualified-name-field-in-resources).
<!-- TODO(SNOW-1634854): include an example showing both methods-->
-> **Examples of usage for `file_format`:**
* with hardcoding value: `file_format="FORMAT_NAME = DB.SCHEMA.FORMATNAME"`
* from dynamic value: `file_format = "FORMAT_NAME = ${snowflake_database.mydb.name}.${snowflake_schema.myschema.name}.${snowflake_file_format.myfileformat.name}"`
* from expression: `file_format = format("FORMAT_NAME =%s.%s.MYFILEFORMAT", var.db_name, each.value.schema_name)`
(Reference: [#265](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/265))
<!-- schema generated by tfplugindocs -->
## Schema

Expand Down
7 changes: 7 additions & 0 deletions examples/resources/snowflake_stage/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ resource "snowflake_stage" "example_stage" {
schema = "EXAMPLE_SCHEMA"
credentials = "AWS_KEY_ID='${var.example_aws_key_id}' AWS_SECRET_KEY='${var.example_aws_secret_key}'"
}
/*
* Examples of usage for `file_format`:
* with hardcoding value: `file_format="FORMAT_NAME = DB.SCHEMA.FORMATNAME"`
* from dynamic value: `file_format = "FORMAT_NAME = ${snowflake_database.mydb.name}.${snowflake_schema.myschema.name}.${snowflake_file_format.myfileformat.name}"`
* from expression: `file_format = format("FORMAT_NAME =%s.%s.MYFILEFORMAT", var.db_name, each.value.schema_name)`
* Reference: [#265](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/265)
*/

0 comments on commit 6dc4b60

Please sign in to comment.