From c6784dc3d0ee0be22064f02b2eb3ed3ffe1866c3 Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 13:52:12 +0100 Subject: [PATCH 01/10] update docs and migration guide starts here From 50f1969ef41374e072f24776d776a3da8361a534 Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 14:05:29 +0100 Subject: [PATCH 02/10] Use only multiline examples for function/procedure definitions --- docs/resources/function_java.md | 8 +++++++- docs/resources/function_javascript.md | 10 +++++++--- docs/resources/function_python.md | 13 ++++++++----- docs/resources/function_scala.md | 14 +++++++------- docs/resources/function_sql.md | 12 ++++++------ docs/resources/procedure_java.md | 18 ++++++++++++++++-- docs/resources/procedure_javascript.md | 8 +++++++- docs/resources/procedure_python.md | 8 +++++++- docs/resources/procedure_scala.md | 9 ++++++++- docs/resources/procedure_sql.md | 6 +++++- .../snowflake_function_java/resource.tf | 8 +++++++- .../snowflake_function_javascript/resource.tf | 10 +++++++--- .../snowflake_function_python/resource.tf | 13 ++++++++----- .../snowflake_function_scala/resource.tf | 14 +++++++------- .../snowflake_function_sql/resource.tf | 12 ++++++------ .../snowflake_procedure_java/resource.tf | 18 ++++++++++++++++-- .../snowflake_procedure_javascript/resource.tf | 8 +++++++- .../snowflake_procedure_python/resource.tf | 8 +++++++- .../snowflake_procedure_scala/resource.tf | 9 ++++++++- .../snowflake_procedure_sql/resource.tf | 6 +++++- 20 files changed, 156 insertions(+), 56 deletions(-) diff --git a/docs/resources/function_java.md b/docs/resources/function_java.md index 5570e2575e..2c6ec4350e 100644 --- a/docs/resources/function_java.md +++ b/docs/resources/function_java.md @@ -40,7 +40,13 @@ resource "snowflake_function_java" "w" { } 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" + 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/docs/resources/function_javascript.md b/docs/resources/function_javascript.md index 9333693081..ef5b99c949 100644 --- a/docs/resources/function_javascript.md +++ b/docs/resources/function_javascript.md @@ -39,10 +39,14 @@ resource "snowflake_function_javascript" "minimal" { 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/docs/resources/function_python.md b/docs/resources/function_python.md index a2cf487db5..bd06d46893 100644 --- a/docs/resources/function_python.md +++ b/docs/resources/function_python.md @@ -42,12 +42,15 @@ resource "snowflake_function_python" "minimal" { arg_data_type = "NUMBER(36, 2)" 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/docs/resources/function_scala.md b/docs/resources/function_scala.md index 9a03c90548..0a0a4f49a1 100644 --- a/docs/resources/function_scala.md +++ b/docs/resources/function_scala.md @@ -37,16 +37,16 @@ resource "snowflake_function_scala" "minimal" { arg_data_type = "VARCHAR(100)" 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/docs/resources/procedure_python.md b/docs/resources/procedure_python.md index 76d9495fd4..af0fe5bfab 100644 --- a/docs/resources/procedure_python.md +++ b/docs/resources/procedure_python.md @@ -42,7 +42,13 @@ resource "snowflake_procedure_python" "w" { } return_type = "VARCHAR(100)" handler = "echoVarchar" - procedure_definition = "\ndef echoVarchar(x):\n\tresult = \"\"\n\tfor a in range(5):\n\t\tresult += x\n\treturn result\n" + procedure_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 a34d6af477..2be224de9c 100644 --- a/examples/resources/snowflake_function_java/resource.tf +++ b/examples/resources/snowflake_function_java/resource.tf @@ -8,5 +8,11 @@ resource "snowflake_function_java" "w" { } 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" + function_definition = < Date: Fri, 20 Dec 2024 14:06:31 +0100 Subject: [PATCH 03/10] Fix link --- v1-preparations/LIST_OF_PREVIEW_FEATURES_FOR_V1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1-preparations/LIST_OF_PREVIEW_FEATURES_FOR_V1.md b/v1-preparations/LIST_OF_PREVIEW_FEATURES_FOR_V1.md index 93164a2c18..d0c39508a4 100644 --- a/v1-preparations/LIST_OF_PREVIEW_FEATURES_FOR_V1.md +++ b/v1-preparations/LIST_OF_PREVIEW_FEATURES_FOR_V1.md @@ -1,6 +1,6 @@ # List of preview resources and data sources that are available in V1 -[Preview features](../ROADMAP.md#preview-resourcesdata sources) for the V1: +[Preview features](../ROADMAP.md#preview-resourcesdatasources) for the V1: * [snowflake_current_account](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/1.0.0/docs/data-sources/current_account) (data source) * [snowflake_account_password_policy_attachment](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/1.0.0/docs/resources/account_password_policy_attachment) From 3d343e471feb7ce6796af5e705cdf8336deac19a Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 14:10:22 +0100 Subject: [PATCH 04/10] Update migration guide --- MIGRATION_GUIDE.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 005f3992ed..94a5893908 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -67,6 +67,11 @@ All of the preview features objects are now disabled by default. This includes: - `snowflake_external_volume` - `snowflake_failover_group` - `snowflake_file_format` + - `snowflake_function_java` + - `snowflake_function_javascript` + - `snowflake_function_python` + - `snowflake_function_scala` + - `snowflake_function_sql` - `snowflake_managed_account` - `snowflake_materialized_view` - `snowflake_network_policy_attachment` @@ -76,10 +81,16 @@ All of the preview features objects are now disabled by default. This includes: - `snowflake_object_parameter` - `snowflake_password_policy` - `snowflake_pipe` + - `snowflake_procedure_java` + - `snowflake_procedure_javascript` + - `snowflake_procedure_python` + - `snowflake_procedure_scala` + - `snowflake_procedure_sql` - `snowflake_sequence` - `snowflake_share` - `snowflake_stage` - `snowflake_storage_integration` + - `snowflake_table` - `snowflake_table_column_masking_policy_application` - `snowflake_table_constraint` - `snowflake_user_public_keys` @@ -95,8 +106,10 @@ All of the preview features objects are now disabled by default. This includes: - `snowflake_external_tables` - `snowflake_failover_groups` - `snowflake_file_formats` + - `snowflake_functions` - `snowflake_materialized_views` - `snowflake_pipes` + - `snowflake_procedures` - `snowflake_current_role` - `snowflake_sequences` - `snowflake_shares` @@ -107,6 +120,7 @@ All of the preview features objects are now disabled by default. This includes: - `snowflake_system_get_aws_sns_iam_policy` - `snowflake_system_get_privatelink_config` - `snowflake_system_get_snowflake_platform_info` + - `snowflake_tables` If you want to have them enabled, add the feature name to the provider configuration (with `_datasource` or `_resource` suffix), like this: ```terraform From 7e8d291d2f457f279c45c9e93e68e51f7fa764ca Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 14:27:20 +0100 Subject: [PATCH 05/10] Add migration guide and update the docs --- MIGRATION_GUIDE.md | 24 ++++++++++++++++++++++++ docs/resources/function_java.md | 2 +- docs/resources/function_javascript.md | 2 +- docs/resources/function_python.md | 2 +- docs/resources/function_scala.md | 2 +- docs/resources/function_sql.md | 2 +- docs/resources/procedure_java.md | 2 +- docs/resources/procedure_javascript.md | 2 +- docs/resources/procedure_python.md | 2 +- docs/resources/procedure_scala.md | 2 +- docs/resources/procedure_sql.md | 2 +- pkg/resources/function_commons.go | 2 +- pkg/resources/procedure_commons.go | 2 +- 13 files changed, 36 insertions(+), 12 deletions(-) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 94a5893908..d12178df30 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -52,6 +52,26 @@ We added non-negative validations for the following parameters: Note that enum parameters are still not validated by the provider - they are only validated in Snowflake. We will handle this during a small rework of the parameters in the future. +### Add missing preview features to config + +Values: +- `snowflake_functions_datasource` +- `snowflake_procedures_datasource` +- `snowflake_tables_datasource` + were missing in the `preview_features_enabled` attribute in the provider's config. They were added. + +References: #3302 + +### functions and procedures docs updated + +Argument names are automatically wrapped in double quotes, so: +- uppercase names should be used or +- argument name should be quoted in the procedure/function definition. + +Updated the docs and the previous migration guide entry. + +References: #3298 + ## v0.100.0 ➞ v1.0.0 ### Preview features flag @@ -184,6 +204,8 @@ The new resources are more aligned with current features like: - secrets support - argument default values +**Note**: argument names are now quoted automatically by the provider so remember about this while writing the function definition (argument name should be quoted or uppercase should be used for the argument name). + `snowflake_procedure` is now deprecated in favor of 5 new preview resources: - `snowflake_procedure_java` @@ -200,6 +222,8 @@ The new resources are more aligned with current features like: - secrets support - argument default values +**Note**: argument names are now quoted automatically by the provider so remember about this while writing the procedure definition (argument name should be quoted or uppercase should be used for the argument name). + ### *(new feature)* Account role data source Added a new `snowflake_account_roles` data source for account roles. Now it reflects It's based on `snowflake_roles` data source. `account_roles` field now organizes output of show under `show_output` field. diff --git a/docs/resources/function_java.md b/docs/resources/function_java.md index 2c6ec4350e..2ad592c726 100644 --- a/docs/resources/function_java.md +++ b/docs/resources/function_java.md @@ -96,7 +96,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition. Optional: diff --git a/docs/resources/function_javascript.md b/docs/resources/function_javascript.md index ef5b99c949..c587e4b9a9 100644 --- a/docs/resources/function_javascript.md +++ b/docs/resources/function_javascript.md @@ -89,7 +89,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition. Optional: diff --git a/docs/resources/function_python.md b/docs/resources/function_python.md index bd06d46893..249a4d8ebc 100644 --- a/docs/resources/function_python.md +++ b/docs/resources/function_python.md @@ -100,7 +100,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition. Optional: diff --git a/docs/resources/function_scala.md b/docs/resources/function_scala.md index 0a0a4f49a1..9cea381089 100644 --- a/docs/resources/function_scala.md +++ b/docs/resources/function_scala.md @@ -143,7 +143,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition. Optional: diff --git a/docs/resources/function_sql.md b/docs/resources/function_sql.md index 68e532fca6..9374f1044c 100644 --- a/docs/resources/function_sql.md +++ b/docs/resources/function_sql.md @@ -102,7 +102,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition. Optional: diff --git a/docs/resources/procedure_java.md b/docs/resources/procedure_java.md index fb89be1358..545cd1efed 100644 --- a/docs/resources/procedure_java.md +++ b/docs/resources/procedure_java.md @@ -153,7 +153,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition. Optional: diff --git a/docs/resources/procedure_javascript.md b/docs/resources/procedure_javascript.md index 54fa63c584..8b2c7c201d 100644 --- a/docs/resources/procedure_javascript.md +++ b/docs/resources/procedure_javascript.md @@ -89,7 +89,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition. Optional: diff --git a/docs/resources/procedure_python.md b/docs/resources/procedure_python.md index af0fe5bfab..64608edf46 100644 --- a/docs/resources/procedure_python.md +++ b/docs/resources/procedure_python.md @@ -100,7 +100,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition. Optional: diff --git a/docs/resources/procedure_scala.md b/docs/resources/procedure_scala.md index 676ba91e1c..f119d62a4b 100644 --- a/docs/resources/procedure_scala.md +++ b/docs/resources/procedure_scala.md @@ -98,7 +98,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition. Optional: diff --git a/docs/resources/procedure_sql.md b/docs/resources/procedure_sql.md index fd8dcb2879..fcf7441ee8 100644 --- a/docs/resources/procedure_sql.md +++ b/docs/resources/procedure_sql.md @@ -84,7 +84,7 @@ EOT Required: - `arg_data_type` (String) The argument type. -- `arg_name` (String) The argument name. +- `arg_name` (String) The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition. Optional: diff --git a/pkg/resources/function_commons.go b/pkg/resources/function_commons.go index c9c8bf05e6..89b675a7b7 100644 --- a/pkg/resources/function_commons.go +++ b/pkg/resources/function_commons.go @@ -226,7 +226,7 @@ func functionBaseSchema() map[string]schema.Schema { Type: schema.TypeString, Required: true, // TODO [SNOW-1348103]: adjust diff suppression accordingly. - Description: "The argument name.", + Description: "The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the function definition.", }, // TODO [SNOW-1348103]: after testing weird names add limitations to the docs and add validation here "arg_data_type": { diff --git a/pkg/resources/procedure_commons.go b/pkg/resources/procedure_commons.go index 1cd819647b..f87b694b47 100644 --- a/pkg/resources/procedure_commons.go +++ b/pkg/resources/procedure_commons.go @@ -217,7 +217,7 @@ func procedureBaseSchema() map[string]schema.Schema { Type: schema.TypeString, Required: true, // TODO [SNOW-1348103]: adjust diff suppression accordingly. - Description: "The argument name.", + Description: "The argument name. The provider wraps it in double quotes by default, so be aware of that while referencing the argument in the procedure definition.", }, "arg_data_type": { Type: schema.TypeString, From d12abae74b04320b865f70efc601899ba30c770d Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 14:32:38 +0100 Subject: [PATCH 06/10] Update procedure docs References: #3303 --- MIGRATION_GUIDE.md | 6 ++++++ docs/resources/procedure_python.md | 2 ++ templates/resources/procedure_python.md.tmpl | 2 ++ 3 files changed, 10 insertions(+) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index d12178df30..80aa0eb952 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -72,6 +72,12 @@ Updated the docs and the previous migration guide entry. References: #3298 +### python procedure docs were updated + +Importing python procedure is currently limited to procedures with snowflake-snowpark-python version explicitly set in Snowflake. Docs were updated. + +References: #3303 + ## v0.100.0 ➞ v1.0.0 ### Preview features flag diff --git a/docs/resources/procedure_python.md b/docs/resources/procedure_python.md index 64608edf46..0ad0eb5505 100644 --- a/docs/resources/procedure_python.md +++ b/docs/resources/procedure_python.md @@ -7,6 +7,8 @@ description: |- !> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled field` in the [provider configuration](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs#schema). Please always refer to the [Getting Help](https://github.com/Snowflake-Labs/terraform-provider-snowflake?tab=readme-ov-file#getting-help) section in our Github repo to best determine how to get help for your questions. +!> **Caution: Import limitation** To import the python procedure, snowflake-snowpark-python version must be explicitly set in Snowflake (i.e. `snowflake-snowpark-python==1.14.0`). You can verify it by running `DESCRIBE PROCEDURE ` and checking the `packages`. Check [#3303](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3303) for reference. + -> **Note** External changes to `is_secure` and `null_input_behavior` are not currently supported. They will be handled in the following versions of the provider which may still affect this resource. -> **Note** `COPY GRANTS` and `OR REPLACE` are not currently supported. diff --git a/templates/resources/procedure_python.md.tmpl b/templates/resources/procedure_python.md.tmpl index 2636c371fa..1b16fbd8a4 100644 --- a/templates/resources/procedure_python.md.tmpl +++ b/templates/resources/procedure_python.md.tmpl @@ -11,6 +11,8 @@ description: |- !> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled field` in the [provider configuration](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs#schema). Please always refer to the [Getting Help](https://github.com/Snowflake-Labs/terraform-provider-snowflake?tab=readme-ov-file#getting-help) section in our Github repo to best determine how to get help for your questions. +!> **Caution: Import limitation** To import the python procedure, snowflake-snowpark-python version must be explicitly set in Snowflake (i.e. `snowflake-snowpark-python==1.14.0`). You can verify it by running `DESCRIBE PROCEDURE ` and checking the `packages`. Check [#3303](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3303) for reference. + -> **Note** External changes to `is_secure` and `null_input_behavior` are not currently supported. They will be handled in the following versions of the provider which may still affect this resource. -> **Note** `COPY GRANTS` and `OR REPLACE` are not currently supported. From 4637266767984d5edf5d256efdb3adbd21694367 Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 15:00:12 +0100 Subject: [PATCH 07/10] Fix after merge --- MIGRATION_GUIDE.md | 2 +- pkg/resources/account_parameter_acceptance_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 80aa0eb952..33e72d18e7 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -72,7 +72,7 @@ Updated the docs and the previous migration guide entry. References: #3298 -### python procedure docs were updated +### python procedure docs updated Importing python procedure is currently limited to procedures with snowflake-snowpark-python version explicitly set in Snowflake. Docs were updated. diff --git a/pkg/resources/account_parameter_acceptance_test.go b/pkg/resources/account_parameter_acceptance_test.go index 6ee2edb147..2df5a3a9dc 100644 --- a/pkg/resources/account_parameter_acceptance_test.go +++ b/pkg/resources/account_parameter_acceptance_test.go @@ -142,7 +142,7 @@ func TestAcc_AccountParameter_ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES(t *testi CheckDestroy: acc.CheckAccountParameterUnset(t, sdk.AccountParameterRequireStorageIntegrationForStageCreation), Steps: []resource.TestStep{ { - Config: config.FromModel(t, model), + Config: config.FromModels(t, model), Check: assert.AssertThat(t, resourceassert.AccountParameterResource(t, model.ResourceReference()). HasKeyString(string(sdk.AccountParameterRequireStorageIntegrationForStageCreation)). HasValueString("true"), @@ -163,7 +163,7 @@ func TestAcc_AccountParameter_INITIAL_REPLICATION_SIZE_LIMIT_IN_TB(t *testing.T) CheckDestroy: acc.CheckAccountParameterUnset(t, sdk.AccountParameterInitialReplicationSizeLimitInTB), Steps: []resource.TestStep{ { - Config: config.FromModel(t, model), + Config: config.FromModels(t, model), Check: assert.AssertThat(t, resourceassert.AccountParameterResource(t, model.ResourceReference()). HasKeyString(string(sdk.AccountParameterInitialReplicationSizeLimitInTB)). HasValueString("3.0"), From 81d78027005c0ffd33fd462f8284dc38b42023c6 Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 15:00:43 +0100 Subject: [PATCH 08/10] Bump tracking --- pkg/internal/tracking/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/tracking/context.go b/pkg/internal/tracking/context.go index 412ff9eb77..371cd2fe49 100644 --- a/pkg/internal/tracking/context.go +++ b/pkg/internal/tracking/context.go @@ -10,7 +10,7 @@ import ( const ( CurrentSchemaVersion string = "1" - ProviderVersion string = "v1.0.0" // TODO(SNOW-1814934): Currently hardcoded, make it computed + ProviderVersion string = "v1.0.1" // TODO(SNOW-1814934): Currently hardcoded, make it computed MetadataPrefix string = "terraform_provider_usage_tracking" ) From feda5f2d9c470487de7c928f0f73cfd570ec3f8a Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 15:01:48 +0100 Subject: [PATCH 09/10] Run pre-push --- pkg/sdk/parameters.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/sdk/parameters.go b/pkg/sdk/parameters.go index 86551dd14e..aea226a018 100644 --- a/pkg/sdk/parameters.go +++ b/pkg/sdk/parameters.go @@ -1216,7 +1216,6 @@ func (v *AccountParameters) validate() error { if err != nil || value < 0 { return fmt.Errorf("InitialReplicationSizeLimitInTB must be a non-negative float, got %v", *v.InitialReplicationSizeLimitInTB) } - } if valueSet(v.MinDataRetentionTimeInDays) { if !validateIntInRangeInclusive(*v.MinDataRetentionTimeInDays, 0, 90) { From 6e00d90b97cf95f9863f4ac7d5a6e1697d09fcc5 Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Fri, 20 Dec 2024 15:12:29 +0100 Subject: [PATCH 10/10] Change tabs to double spaces --- MIGRATION_GUIDE.md | 126 ++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 33e72d18e7..1b05e256d8 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -83,70 +83,70 @@ References: #3303 ### Preview features flag All of the preview features objects are now disabled by default. This includes: - Resources - - `snowflake_account_password_policy_attachment` - - `snowflake_alert` - - `snowflake_api_integration` - - `snowflake_cortex_search_service` - - `snowflake_dynamic_table` - - `snowflake_external_function` - - `snowflake_external_table` - - `snowflake_external_volume` - - `snowflake_failover_group` - - `snowflake_file_format` - - `snowflake_function_java` - - `snowflake_function_javascript` - - `snowflake_function_python` - - `snowflake_function_scala` - - `snowflake_function_sql` - - `snowflake_managed_account` - - `snowflake_materialized_view` - - `snowflake_network_policy_attachment` - - `snowflake_network_rule` - - `snowflake_email_notification_integration` - - `snowflake_notification_integration` - - `snowflake_object_parameter` - - `snowflake_password_policy` - - `snowflake_pipe` - - `snowflake_procedure_java` - - `snowflake_procedure_javascript` - - `snowflake_procedure_python` - - `snowflake_procedure_scala` - - `snowflake_procedure_sql` - - `snowflake_sequence` - - `snowflake_share` - - `snowflake_stage` - - `snowflake_storage_integration` - - `snowflake_table` - - `snowflake_table_column_masking_policy_application` - - `snowflake_table_constraint` - - `snowflake_user_public_keys` - - `snowflake_user_password_policy_attachment` + - `snowflake_account_password_policy_attachment` + - `snowflake_alert` + - `snowflake_api_integration` + - `snowflake_cortex_search_service` + - `snowflake_dynamic_table` + - `snowflake_external_function` + - `snowflake_external_table` + - `snowflake_external_volume` + - `snowflake_failover_group` + - `snowflake_file_format` + - `snowflake_function_java` + - `snowflake_function_javascript` + - `snowflake_function_python` + - `snowflake_function_scala` + - `snowflake_function_sql` + - `snowflake_managed_account` + - `snowflake_materialized_view` + - `snowflake_network_policy_attachment` + - `snowflake_network_rule` + - `snowflake_email_notification_integration` + - `snowflake_notification_integration` + - `snowflake_object_parameter` + - `snowflake_password_policy` + - `snowflake_pipe` + - `snowflake_procedure_java` + - `snowflake_procedure_javascript` + - `snowflake_procedure_python` + - `snowflake_procedure_scala` + - `snowflake_procedure_sql` + - `snowflake_sequence` + - `snowflake_share` + - `snowflake_stage` + - `snowflake_storage_integration` + - `snowflake_table` + - `snowflake_table_column_masking_policy_application` + - `snowflake_table_constraint` + - `snowflake_user_public_keys` + - `snowflake_user_password_policy_attachment` - Data sources - - `snowflake_current_account` - - `snowflake_alerts` - - `snowflake_cortex_search_services` - - `snowflake_database` - - `snowflake_database_role` - - `snowflake_dynamic_tables` - - `snowflake_external_functions` - - `snowflake_external_tables` - - `snowflake_failover_groups` - - `snowflake_file_formats` - - `snowflake_functions` - - `snowflake_materialized_views` - - `snowflake_pipes` - - `snowflake_procedures` - - `snowflake_current_role` - - `snowflake_sequences` - - `snowflake_shares` - - `snowflake_parameters` - - `snowflake_stages` - - `snowflake_storage_integrations` - - `snowflake_system_generate_scim_access_token` - - `snowflake_system_get_aws_sns_iam_policy` - - `snowflake_system_get_privatelink_config` - - `snowflake_system_get_snowflake_platform_info` - - `snowflake_tables` + - `snowflake_current_account` + - `snowflake_alerts` + - `snowflake_cortex_search_services` + - `snowflake_database` + - `snowflake_database_role` + - `snowflake_dynamic_tables` + - `snowflake_external_functions` + - `snowflake_external_tables` + - `snowflake_failover_groups` + - `snowflake_file_formats` + - `snowflake_functions` + - `snowflake_materialized_views` + - `snowflake_pipes` + - `snowflake_procedures` + - `snowflake_current_role` + - `snowflake_sequences` + - `snowflake_shares` + - `snowflake_parameters` + - `snowflake_stages` + - `snowflake_storage_integrations` + - `snowflake_system_generate_scim_access_token` + - `snowflake_system_get_aws_sns_iam_policy` + - `snowflake_system_get_privatelink_config` + - `snowflake_system_get_snowflake_platform_info` + - `snowflake_tables` If you want to have them enabled, add the feature name to the provider configuration (with `_datasource` or `_resource` suffix), like this: ```terraform