Skip to content

Commit

Permalink
Add default value for backup_retention_days field (#297)
Browse files Browse the repository at this point in the history
Set default number of backup retention days as 7 for dbaas resources
  • Loading branch information
Gogen120 authored Sep 9, 2024
1 parent 3776e70 commit 505039f
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 5 deletions.
5 changes: 0 additions & 5 deletions selectel/dbaas_base_schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ func resourceDBaaSDatastoreV1BaseSchema() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"backup_retention_days": {
Type: schema.TypeInt,
Optional: true,
Description: "Number of days to retain backups.",
},
"connections": {
Type: schema.TypeMap,
Computed: true,
Expand Down
1 change: 1 addition & 0 deletions selectel/schema_selectel_dbaas_datastore_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func resourceDBaaSDatastoreV1Schema() map[string]*schema.Schema {
Type: schema.TypeInt,
Optional: true,
Description: "Number of days to retain backups.",
Default: 7,
}
datastoreSchema["pooler"] = &schema.Schema{
Type: schema.TypeSet,
Expand Down
1 change: 1 addition & 0 deletions selectel/schema_selectel_dbaas_mysql_datastore_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ func resourceDBaaSMySQLDatastoreV1Schema() map[string]*schema.Schema {
Type: schema.TypeInt,
Optional: true,
Description: "Number of days to retain backups.",
Default: 7,
}
datastoreSchema["restore"] = &schema.Schema{
Type: schema.TypeSet,
Expand Down
1 change: 1 addition & 0 deletions selectel/schema_selectel_dbaas_postgresql_datastore_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func resourceDBaaSPostgreSQLDatastoreV1Schema() map[string]*schema.Schema {
Type: schema.TypeInt,
Optional: true,
Description: "Number of days to retain backups.",
Default: 7,
}
datastoreSchema["pooler"] = &schema.Schema{
Type: schema.TypeSet,
Expand Down
1 change: 1 addition & 0 deletions selectel/schema_selectel_dbaas_redis_datastore_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ func resourceDBaaSRedisDatastoreV1Schema() map[string]*schema.Schema {
Type: schema.TypeInt,
Optional: true,
Description: "Number of days to retain backups.",
Default: 7,
}
datastoreSchema["restore"] = &schema.Schema{
Type: schema.TypeSet,
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/dbaas_mysql_datastore_v1.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ resource "selectel_dbaas_mysql_datastore_v1" "datastore_1" {

* replica - (Required) Number of public IPs associated with the replicas. The minimum value is `0`. The maximum value must be 1 less than the value of the `node_count` argument.

* `backup_retention_days` - (Optional) Number of days to retain backups.

## Attributes Reference

* `status` - Datastore status.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/dbaas_postgresql_datastore_v1.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ resource "selectel_dbaas_postgresql_datastore_v1" "datastore_1" {

* replica - (Required) Number of public IPs associated with the replicas. The minimum value is `0`. The maximum value must be 1 less than the value of the `node_count` argument.

* `backup_retention_days` - (Optional) Number of days to retain backups.

## Attributes Reference

* `status` - Datastore status.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/dbaas_redis_datastore_v1.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ resource "selectel_dbaas_redis_datastore_v1" "datastore_1" {

* replica - (Required) Number of public IPs associated with the replicas. The minimum value is `0`. The maximum value must be 1 less than the value of the `node_count` argument.

* `backup_retention_days` - (Optional) Number of days to retain backups.

## Attributes Reference

* `status` - Datastore status.
Expand Down

0 comments on commit 505039f

Please sign in to comment.