Skip to content

Commit

Permalink
database: Add validation to maintenance window and improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
moreinhardt committed Dec 21, 2024
1 parent 6f15115 commit 075f685
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions digitalocean/database/resource_database_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ func ResourceDigitalOceanDatabaseCluster() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"day": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.IsDayOfTheWeek(true),
},
"hour": {
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/database_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ The following arguments are supported:

`maintenance_window` supports the following:

* `day` - (Required) The day of the week on which to apply maintenance updates.
* `hour` - (Required) The hour in UTC at which maintenance updates will be applied in 24 hour format.
* `day` - (Required) The day of the week on which to apply maintenance updates. May be one of `monday` through `sunday`.
* `hour` - (Required) The hour in UTC at which maintenance updates will be applied as a string in 24 hour format, e.g. `13:00`.

* `backup_restore` - (Optional) Create a new database cluster based on a backup of an existing cluster.

Expand Down

0 comments on commit 075f685

Please sign in to comment.