Skip to content

Commit 164e61e

Browse files
committed
Generating docs
1 parent 22d0f07 commit 164e61e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/resources/kibana_maintenance_window.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ resource "elasticstack_kibana_maintenance_window" "my_maintenance_window" {
2222
title = "UPDATE TEST"
2323
enabled = true
2424
25-
custom_schedule {
25+
custom_schedule = {
2626
start = "1993-01-01T05:00:00.200Z"
2727
duration = "12d"
2828
29-
recurring {
29+
recurring = {
3030
every = "21d"
3131
on_week_day = ["MO", "+3TU", "-2FR"]
3232
on_month_day = [1, 2, 4, 6, 7]
3333
on_month = [12]
3434
}
3535
}
3636
37-
scope {
38-
alerting {
37+
scope = {
38+
alerting = {
3939
kql = "_id: '1234'"
4040
}
4141
}
@@ -78,7 +78,7 @@ Optional:
7878

7979
Optional:
8080

81-
- `end` (String) The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.
81+
- `end` (String) The end date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: `2025-03-12T12:00:00.000Z`.
8282
- `every` (String) The duration of the schedule. It allows values in `<integer><unit>` format. `<unit>` is one of `d`, `h`, `m`, or `s` for hours, minutes, seconds. For example: `1d`, `5h`, `30m`, `5000s`.
8383
- `occurrences` (Number) The total number of recurrences of the schedule.
8484
- `on_month` (List of Number) The specific months for a recurring schedule. Valid values are 1-12.

internal/kibana/maintenance_window/models.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (model MaintenanceWindowModel) toAPICreateRequest(ctx context.Context) (kba
5151

5252
body := kbapi.PostMaintenanceWindowJSONRequestBody{
5353
Enabled: model.Enabled.ValueBoolPointer(),
54-
Title: *model.Title.ValueStringPointer(),
54+
Title: model.Title.ValueString(),
5555
}
5656

5757
body.Schedule.Custom.Duration = model.CustomSchedule.Duration.ValueString()
@@ -75,7 +75,7 @@ func (model MaintenanceWindowModel) toAPICreateRequest(ctx context.Context) (kba
7575
Every: model.CustomSchedule.Recurring.Every.ValueStringPointer(),
7676
}
7777

78-
if !model.CustomSchedule.Recurring.Occurrences.IsNull() && !model.CustomSchedule.Recurring.Occurrences.IsUnknown() && model.CustomSchedule.Recurring.Occurrences.ValueInt32() > 0 {
78+
if utils.IsKnown(model.CustomSchedule.Recurring.Occurrences) {
7979
occurrences := float32(model.CustomSchedule.Recurring.Occurrences.ValueInt32())
8080
body.Schedule.Custom.Recurring.Occurrences = &occurrences
8181
}

0 commit comments

Comments
 (0)