Skip to content

Commit 79c8f44

Browse files
authored
Merge pull request #526 from cyberHermanwang/mysql
modify mysql argument to support mysql 8.0
2 parents 520041a + 3248fbc commit 79c8f44

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
ENHANCEMENTS:
44

5+
* Resource: `tencentcloud_mysql_instance` modify argument `engine_version` to support mysql 8.0.
56
* Resource: `tencentcloud_clb_listener_rule` add new argument `forward_type` to support backend protocol([#522](https://github.com/tencentcloudstack/terraform-provider-tencentcloud/issues/522))
67
* Resource: `tencentcloud_instance` add new argument `keep_image_login` to support keeping image login.
78

tencentcloud/data_source_tc_mysql_instance.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ func dataSourceTencentCloudMysqlInstance() *schema.Resource {
6868
"engine_version": {
6969
Type: schema.TypeString,
7070
Optional: true,
71-
ValidateFunc: validateAllowedStringValue([]string{"5.1", "5.5", "5.6", "5.7"}),
72-
Description: "The version number of the database engine to use. Supported versions include 5.5/5.6/5.7.",
71+
ValidateFunc: validateAllowedStringValue([]string{"5.1", "5.5", "5.6", "5.7", "8.0"}),
72+
Description: "The version number of the database engine to use. Supported versions include 5.5/5.6/5.7/8.0.",
7373
},
7474
"init_flag": {
7575
Type: schema.TypeInt,
@@ -159,7 +159,7 @@ func dataSourceTencentCloudMysqlInstance() *schema.Resource {
159159
"engine_version": {
160160
Type: schema.TypeString,
161161
Computed: true,
162-
Description: "The version number of the database engine to use. Supported versions include 5.5/5.6/5.7.",
162+
Description: "The version number of the database engine to use. Supported versions include 5.5/5.6/5.7/8.0.",
163163
},
164164
"cpu_core_count": {
165165
Type: schema.TypeInt,

tencentcloud/extension_mysql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ var MysqlDelStates = map[int64]bool{
7272
//mysql available period value
7373
var MYSQL_AVAILABLE_PERIOD = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36}
7474

75-
var MYSQL_SUPPORTS_ENGINE = []string{"5.5", "5.6", "5.7"}
75+
var MYSQL_SUPPORTS_ENGINE = []string{"5.5", "5.6", "5.7", "8.0"}
7676

7777
//automatic renewal status code
7878
const (

tencentcloud/resource_tc_mysql_instance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ func resourceTencentCloudMysqlInstance() *schema.Resource {
226226
ForceNew: true,
227227
Optional: true,
228228
ValidateFunc: validateAllowedStringValue(MYSQL_SUPPORTS_ENGINE),
229-
Default: MYSQL_SUPPORTS_ENGINE[len(MYSQL_SUPPORTS_ENGINE)-1],
230-
Description: "The version number of the database engine to use. Supported versions include 5.5/5.6/5.7, and default is 5.7.",
229+
Default: MYSQL_SUPPORTS_ENGINE[len(MYSQL_SUPPORTS_ENGINE)-2],
230+
Description: "The version number of the database engine to use. Supported versions include 5.5/5.6/5.7/8.0, and default is 5.7.",
231231
},
232232

233233
"availability_zone": {

website/docs/d/mysql_instance.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ data "tencentcloud_mysql_instance" "database" {
2525
The following arguments are supported:
2626

2727
* `charge_type` - (Optional) Pay type of instance, valid values are `PREPAID` and `POSTPAID`.
28-
* `engine_version` - (Optional) The version number of the database engine to use. Supported versions include 5.5/5.6/5.7.
28+
* `engine_version` - (Optional) The version number of the database engine to use. Supported versions include 5.5/5.6/5.7/8.0.
2929
* `init_flag` - (Optional) Initialization mark. Available values: 0 - Uninitialized; 1 - Initialized.
3030
* `instance_name` - (Optional) Name of mysql instance.
3131
* `instance_role` - (Optional) Instance type. Supported values include: master - master instance, dr - disaster recovery instance, and ro - read-only instance.
@@ -52,7 +52,7 @@ In addition to all arguments above, the following attributes are exported:
5252
* `dead_line_time` - Expire date of instance. NOTES: Only supported prepay instance.
5353
* `device_type` - Supported instance model.HA - high available version; Basic - basic version.
5454
* `dr_instance_ids` - ID list of disaster-recovery type associated with the current instance.
55-
* `engine_version` - The version number of the database engine to use. Supported versions include 5.5/5.6/5.7.
55+
* `engine_version` - The version number of the database engine to use. Supported versions include 5.5/5.6/5.7/8.0.
5656
* `init_flag` - Initialization mark. Available values: 0 - Uninitialized; 1 - Initialized.
5757
* `instance_name` - Name of mysql instance.
5858
* `instance_role` - Instance type. Supported values include: master - master instance, dr - disaster recovery instance, and ro - read-only instance.

website/docs/r/mysql_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The following arguments are supported:
5656
* `auto_renew_flag` - (Optional) Auto renew flag. NOTES: Only supported prepaid instance.
5757
* `availability_zone` - (Optional, ForceNew) Indicates which availability zone will be used.
5858
* `charge_type` - (Optional, ForceNew) Pay type of instance, valid values are `PREPAID`, `POSTPAID`. Default is `POSTPAID`.
59-
* `engine_version` - (Optional, ForceNew) The version number of the database engine to use. Supported versions include 5.5/5.6/5.7, and default is 5.7.
59+
* `engine_version` - (Optional, ForceNew) The version number of the database engine to use. Supported versions include 5.5/5.6/5.7/8.0, and default is 5.7.
6060
* `first_slave_zone` - (Optional, ForceNew) Zone information about first slave instance.
6161
* `force_delete` - (Optional) Indicate whether to delete instance directly or not. Default is false. If set true, the instance will be deleted instead of staying recycle bin. Note: only works for `PREPAID` instance. When the main mysql instance set true, this para of the readonly mysql instance will not take effect.
6262
* `internet_service` - (Optional) Indicates whether to enable the access to an instance from public network: 0 - No, 1 - Yes.

0 commit comments

Comments
 (0)