diff --git a/docs/resources/function_java.md b/docs/resources/function_java.md index 4f3737c4ac..e1c86fdda8 100644 --- a/docs/resources/function_java.md +++ b/docs/resources/function_java.md @@ -28,7 +28,17 @@ Resource used to manage java function objects. For more information, check [func ## Example Usage ```terraform -resource "snowflake_function_java" "example" { +resource "snowflake_function_java" "w" { + database = "Database" + schema = "Schema" + name = "Name" + arguments { + arg_data_type = "VARCHAR(100)" + arg_name = "x" + } + return_type = "VARCHAR(100)" + handler = "TestFunc.echoVarchar" + function_definition = "\n\tclass TestFunc {\n\t\tpublic static String echoVarchar(String x) {\n\t\t\treturn x;\n\t\t}\n\t}\n" } ``` -> **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). diff --git a/docs/resources/function_javascript.md b/docs/resources/function_javascript.md index e5b6885482..c81f21a080 100644 --- a/docs/resources/function_javascript.md +++ b/docs/resources/function_javascript.md @@ -28,7 +28,19 @@ Resource used to manage javascript function objects. For more information, check ## Example Usage ```terraform -resource "snowflake_function_javascript" "example" { +# Minimal +resource "snowflake_function_javascript" "minimal" { + database = snowflake_database.test.name + schema = snowflake_schema.test.name + name = "my_javascript_function" + arguments { + arg_data_type = "VARIANT" + arg_name = "x" + } + function_definition = < **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). diff --git a/examples/resources/snowflake_function_java/resource.tf b/examples/resources/snowflake_function_java/resource.tf index c64d360c37..a34d6af477 100644 --- a/examples/resources/snowflake_function_java/resource.tf +++ b/examples/resources/snowflake_function_java/resource.tf @@ -1,2 +1,12 @@ -resource "snowflake_function_java" "example" { +resource "snowflake_function_java" "w" { + database = "Database" + schema = "Schema" + name = "Name" + arguments { + arg_data_type = "VARCHAR(100)" + arg_name = "x" + } + return_type = "VARCHAR(100)" + handler = "TestFunc.echoVarchar" + function_definition = "\n\tclass TestFunc {\n\t\tpublic static String echoVarchar(String x) {\n\t\t\treturn x;\n\t\t}\n\t}\n" } diff --git a/examples/resources/snowflake_function_javascript/resource.tf b/examples/resources/snowflake_function_javascript/resource.tf index 7fa1b494d0..9cff28c6e0 100644 --- a/examples/resources/snowflake_function_javascript/resource.tf +++ b/examples/resources/snowflake_function_javascript/resource.tf @@ -1,2 +1,14 @@ -resource "snowflake_function_javascript" "example" { +# Minimal +resource "snowflake_function_javascript" "minimal" { + database = snowflake_database.test.name + schema = snowflake_schema.test.name + name = "my_javascript_function" + arguments { + arg_data_type = "VARIANT" + arg_name = "x" + } + function_definition = <