Skip to content

Commit e37f99e

Browse files
convert databaseVersion enum to string (#12687) (#20859)
[upstream:e2df63b0bcdf8f7067f0d6de291815c37815d9c7] Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent 4132d82 commit e37f99e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.changelog/12687.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
sql: `sql_source_representation_instance` now uses `string` representation of `databaseVersion`
3+
```

google/services/sql/resource_sql_source_representation_instance.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232

3333
"github.com/hashicorp/terraform-provider-google/google/tpgresource"
3434
transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport"
35-
"github.com/hashicorp/terraform-provider-google/google/verify"
3635

3736
"google.golang.org/api/googleapi"
3837
)
@@ -58,11 +57,10 @@ func ResourceSQLSourceRepresentationInstance() *schema.Resource {
5857

5958
Schema: map[string]*schema.Schema{
6059
"database_version": {
61-
Type: schema.TypeString,
62-
Required: true,
63-
ForceNew: true,
64-
ValidateFunc: verify.ValidateEnum([]string{"MYSQL_5_6", "MYSQL_5_7", "MYSQL_8_0", "POSTGRES_9_6", "POSTGRES_10", "POSTGRES_11", "POSTGRES_12", "POSTGRES_13", "POSTGRES_14"}),
65-
Description: `The MySQL version running on your source database server. Possible values: ["MYSQL_5_6", "MYSQL_5_7", "MYSQL_8_0", "POSTGRES_9_6", "POSTGRES_10", "POSTGRES_11", "POSTGRES_12", "POSTGRES_13", "POSTGRES_14"]`,
60+
Type: schema.TypeString,
61+
Required: true,
62+
ForceNew: true,
63+
Description: `The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, MYSQL_8_4, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, POSTGRES_16, POSTGRES_17. Database Version Policies includes an up-to-date reference of supported versions.`,
6664
},
6765
"name": {
6866
Type: schema.TypeString,

website/docs/r/sql_source_representation_instance.html.markdown

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ The following arguments are supported:
8484

8585
* `database_version` -
8686
(Required)
87-
The MySQL version running on your source database server.
88-
Possible values are: `MYSQL_5_6`, `MYSQL_5_7`, `MYSQL_8_0`, `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12`, `POSTGRES_13`, `POSTGRES_14`.
87+
The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, MYSQL_8_4, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, POSTGRES_16, POSTGRES_17. Database Version Policies includes an up-to-date reference of supported versions.
8988

9089
* `host` -
9190
(Required)

0 commit comments

Comments
 (0)