-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: PC-11815 add budget adjustments terraform support (#175)
## Motivation Add support for the new `BudgetAdjustment` kind. ## Release Notes New BudgetAdjustment kind which allows customers to schedule recurring future events that should be excluded from the Error Budget calculations in their SLOs. This PR introduces new `budget_adjustment` resource. --------- Co-authored-by: kubaceg <[email protected]>
- Loading branch information
Showing
10 changed files
with
687 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--- | ||
page_title: "nobl9_budget_adjustment Resource - terraform-provider-nobl9" | ||
description: |- | ||
Budget adjustment configuration documentation https://docs.nobl9.com/features/budget-adjustment | ||
--- | ||
|
||
# nobl9_budget_adjustment (Resource) | ||
|
||
The budget adjustment feature allows you to define future periods where planned maintenance, releases, and similar activities won't affect your budget in specific SLOs. | ||
|
||
For more details, refer to the [Budget adjustment configuration documentation](https://docs.nobl9.com/features/budget-adjustment). | ||
|
||
## Example Usage | ||
|
||
Here's an example of Budget Adjustment resource configuration: | ||
|
||
```terraform | ||
resource "nobl9_budget_adjustment" "single-budget-adjustment-event" { | ||
name = "single-budget-adjustment-event" | ||
display_name = "Single Budget Adjustment Event" | ||
first_event_start = "2022-01-01T00:00:00Z" | ||
duration = "1h" | ||
description = "Single budget adjustment event" | ||
filters { | ||
slos { | ||
slo { | ||
name = "my-slo" | ||
project = "default" | ||
} | ||
} | ||
} | ||
} | ||
resource "nobl9_budget_adjustment" "recurring-budget-adjustment-event" { | ||
name = "recurring-budget-adjustment-event" | ||
display_name = "Recurring Budget Adjustment Event" | ||
first_event_start = "2022-01-01T16:00:00Z" | ||
duration = "1h" | ||
rrule = "FREQ=WEEKLY" | ||
description = "Recurring budget adjustment event" | ||
filters { | ||
slos { | ||
slo { | ||
name = "my-slo" | ||
project = "default" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `duration` (String) The duration of the budget adjustment event. The expected value for this field is a string formatted as a time duration. The duration must be defined with a precision of 1 minute. Example: `1h10m` | ||
- `first_event_start` (String) The time at which the first event is scheduled to start. The expected value must be a string representing the date and time in RFC3339 format. Example: `2022-12-31T00:00:00Z` | ||
- `name` (String) Unique name of the resource, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). | ||
|
||
### Optional | ||
|
||
- `description` (String) Optional description of the resource. Here, you can add details about who is responsible for the integration (team/owner) or the purpose of creating it. | ||
- `display_name` (String) User-friendly display name of the resource. | ||
- `filters` (Block Set) Filters are used to select SLOs for the budget adjustment event. (see [below for nested schema](#nestedblock--filters)) | ||
- `rrule` (String) The recurrence rule for the budget adjustment event. The expected value is a string in RRULE format. Example: `FREQ=MONTHLY;BYMONTHDAY=1` | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--filters"></a> | ||
### Nested Schema for `filters` | ||
|
||
Required: | ||
|
||
- `slos` (Block Set, Min: 1) (see [below for nested schema](#nestedblock--filters--slos)) | ||
|
||
<a id="nestedblock--filters--slos"></a> | ||
### Nested Schema for `filters.slos` | ||
|
||
Required: | ||
|
||
- `slo` (Block List, Min: 1) SLO where budget adjustment event will be applied. (see [below for nested schema](#nestedblock--filters--slos--slo)) | ||
|
||
<a id="nestedblock--filters--slos--slo"></a> | ||
### Nested Schema for `filters.slos.slo` | ||
|
||
Required: | ||
|
||
- `name` (String) Unique name of the resource, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). | ||
- `project` (String) Name of the Nobl9 project the resource sits in, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). | ||
|
||
## Useful Links | ||
|
||
[Budget Adjustment configuration | Nobl9 Documentation](https://docs.nobl9.com/yaml-guide#budget-adjustment) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
resource "nobl9_budget_adjustment" "single-budget-adjustment-event" { | ||
name = "single-budget-adjustment-event" | ||
display_name = "Single Budget Adjustment Event" | ||
first_event_start = "2022-01-01T00:00:00Z" | ||
duration = "1h" | ||
description = "Single budget adjustment event" | ||
filters { | ||
slos { | ||
slo { | ||
name = "my-slo" | ||
project = "default" | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource "nobl9_budget_adjustment" "recurring-budget-adjustment-event" { | ||
name = "recurring-budget-adjustment-event" | ||
display_name = "Recurring Budget Adjustment Event" | ||
first_event_start = "2022-01-01T16:00:00Z" | ||
duration = "1h" | ||
rrule = "FREQ=WEEKLY" | ||
description = "Recurring budget adjustment event" | ||
filters { | ||
slos { | ||
slo { | ||
name = "my-slo" | ||
project = "default" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.