Skip to content

Commit

Permalink
feat(dbaas): add service_log and pg_qualstats properties
Browse files Browse the repository at this point in the history
  • Loading branch information
kangasta committed Dec 8, 2023
1 parent b18efe5 commit ae4a641
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]

- managed_database_mysql: Add `service_log` property
- managed_database_postgresql: Add `service_log` and `pg_qualstats` properties
- managed_database_redis: Add `service_log` property

## [3.1.1] - 2023-11-21

### Changed
Expand Down
6 changes: 6 additions & 0 deletions internal/service/database/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,11 @@ func schemaMySQLProperties() map[string]*schema.Schema {
Computed: true,
ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 64)),
},
"service_log": {
Type: schema.TypeBool,
Description: "Store logs for the service so that they are available in the HTTP API and console.",
Optional: true,
Computed: true,
},
}
}
47 changes: 47 additions & 0 deletions internal/service/database/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,53 @@ func schemaPostgreSQLProperties() map[string]*schema.Schema {
Optional: true,
Computed: true,
},
"service_log": {
Type: schema.TypeBool,
Description: "Store logs for the service so that they are available in the HTTP API and console.",
Optional: true,
Computed: true,
},
"pg_qualstats": {
Description: "System-wide settings for the pg_qualstats extension",
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"enabled": {
Type: schema.TypeBool,
Description: `Enable / Disable pg_qualstats.`,
Optional: true,
Computed: true,
},
"min_err_estimate_num": {
Type: schema.TypeInt,
Description: `Error estimation num threshold to save quals.`,
Optional: true,
Computed: true,
},
"min_err_estimate_ratio": {
Type: schema.TypeInt,
Description: `Error estimation ratio threshold to save quals.`,
Optional: true,
Computed: true,
},
"track_constants": {
Type: schema.TypeBool,
Description: `Enable / Disable pg_qualstats constants tracking.`,
Optional: true,
Computed: true,
},
"track_pg_catalog": {
Type: schema.TypeBool,
Description: `Track quals on system catalogs too.`,
Optional: true,
Computed: true,
},
},
},
},
}
}

Expand Down
6 changes: 6 additions & 0 deletions internal/service/database/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,11 @@ func schemaRedisProperties() map[string]*schema.Schema {
Computed: true,
ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"allchannels", "resetchannels"}, false)),
},
"service_log": {
Type: schema.TypeBool,
Description: "Store logs for the service so that they are available in the HTTP API and console.",
Optional: true,
Computed: true,
},
}
}

0 comments on commit ae4a641

Please sign in to comment.