Skip to content

Commit

Permalink
resource/alicloud_db_instance: modify sql_collector_config_value (#8144)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitiansheng0524 authored Jan 20, 2025
1 parent e40f0a4 commit 0bcd1c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions alicloud/resource_alicloud_db_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,7 @@ func resourceAliCloudDBInstance() *schema.Resource {
Type: schema.TypeInt,
Optional: true,
ValidateFunc: IntInSlice([]int{30, 180, 365, 1095, 1825}),
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
if v, ok := d.GetOk("sql_collector_status"); ok && strings.ToLower(v.(string)) == "enabled" {
return false
}
return true
},
Default: 30,
},
"resource_group_id": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/db_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ The following arguments are supported:

-> **NOTE:** You can specify the time zone when you create a primary instance. You cannot specify the time zone when you create a read-only instance. Read-only instances inherit the time zone of their primary instance. If you do not specify this parameter, the system assigns the default time zone of the region where the instance resides.
* `sql_collector_status` - (Optional, Available since 1.70.0) The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
* `sql_collector_config_value` - (Optional, Available since 1.70.0) The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`.
* `sql_collector_config_value` - (Optional, Available since 1.70.0) The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.

* `instance_name` - (Optional) The name of DB instance. It a string of 2 to 256 characters.
* `connection_string_prefix` - (Optional, Available since 1.126.0) The private connection string prefix. If you want to update public connection string prefix, please use resource alicloud_db_connection [connection_prefix](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/db_connection#connection_prefix).
Expand Down

0 comments on commit 0bcd1c3

Please sign in to comment.