From 1073b94e5c3bab722908f01fef7fc93a2bb7f7f4 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Tue, 15 Aug 2023 21:38:41 +0000 Subject: [PATCH] make routineType required in the BigQuery Routine resource (#8573) Signed-off-by: Modular Magician --- .changelog/8573.txt | 3 +++ .../services/bigquery/resource_bigquery_routine.go | 14 +++++++------- website/docs/r/bigquery_routine.html.markdown | 10 +++++----- 3 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 .changelog/8573.txt diff --git a/.changelog/8573.txt b/.changelog/8573.txt new file mode 100644 index 00000000000..0d58f61438f --- /dev/null +++ b/.changelog/8573.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +bigquery: made routineType required for Routine +``` diff --git a/google/services/bigquery/resource_bigquery_routine.go b/google/services/bigquery/resource_bigquery_routine.go index f80c78dd538..d3cf2311ef4 100644 --- a/google/services/bigquery/resource_bigquery_routine.go +++ b/google/services/bigquery/resource_bigquery_routine.go @@ -72,6 +72,13 @@ If language=SQL, it is the substring inside (but excluding) the parentheses.`, Description: `The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.`, }, + "routine_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: verify.ValidateEnum([]string{"SCALAR_FUNCTION", "PROCEDURE", "TABLE_VALUED_FUNCTION"}), + Description: `The type of routine. Possible values: ["SCALAR_FUNCTION", "PROCEDURE", "TABLE_VALUED_FUNCTION"]`, + }, "arguments": { Type: schema.TypeList, Optional: true, @@ -164,13 +171,6 @@ d the order of values or replaced STRUCT field type with RECORD field type, we c cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.`, }, - "routine_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: verify.ValidateEnum([]string{"SCALAR_FUNCTION", "PROCEDURE", "TABLE_VALUED_FUNCTION", ""}), - Description: `The type of routine. Possible values: ["SCALAR_FUNCTION", "PROCEDURE", "TABLE_VALUED_FUNCTION"]`, - }, "creation_time": { Type: schema.TypeInt, Computed: true, diff --git a/website/docs/r/bigquery_routine.html.markdown b/website/docs/r/bigquery_routine.html.markdown index 4b66d0cca74..b195aca2769 100644 --- a/website/docs/r/bigquery_routine.html.markdown +++ b/website/docs/r/bigquery_routine.html.markdown @@ -125,6 +125,11 @@ The following arguments are supported: (Required) The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. +* `routine_type` - + (Required) + The type of routine. + Possible values are: `SCALAR_FUNCTION`, `PROCEDURE`, `TABLE_VALUED_FUNCTION`. + * `definition_body` - (Required) The body of the routine. For functions, this is the expression in the AS clause. @@ -134,11 +139,6 @@ The following arguments are supported: - - - -* `routine_type` - - (Optional) - The type of routine. - Possible values are: `SCALAR_FUNCTION`, `PROCEDURE`, `TABLE_VALUED_FUNCTION`. - * `language` - (Optional) The language of the routine.