Skip to content

Commit 7715f1f

Browse files
committed
Cut Release 'v1.11.0'
1 parent edec6ed commit 7715f1f

6 files changed

Lines changed: 18 additions & 79 deletions

File tree

.changes/unreleased/added-campaign-resource.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.changes/v1.11.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## v1.11.0 - [May 20, 2026](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v1.10.1...v1.11.0)
2+
### Added
3+
* Added `opslevel_campaign` resource for managing OpsLevel campaigns as code, including scheduling support. Also added `opslevel_campaign` and `opslevel_campaigns` data sources.

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5-
and is generated by [Changie](https://github.com/miniscruff/changie).## v1.10.1 - [May 05, 2026](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v1.10.0...v1.10.1)
5+
and is generated by [Changie](https://github.com/miniscruff/changie).## v1.11.0 - [May 20, 2026](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v1.10.1...v1.11.0)
6+
### Added
7+
* Added `opslevel_campaign` resource for managing OpsLevel campaigns as code, including scheduling support. Also added `opslevel_campaign` and `opslevel_campaigns` data sources.## v1.10.1 - [May 05, 2026](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v1.10.0...v1.10.1)
68
### Fixed
79
* Fixed `opslevel_service` dropping `preferred_api_document_source` after apply when `api_document_path` was not set, which caused a "Provider produced inconsistent result after apply" error## v1.10.0 - [April 21, 2026](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v1.9.1...v1.10.0)
810
### Fixed

docs/data-sources/campaign.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
23
page_title: "opslevel_campaign Data Source - terraform-provider-opslevel"
34
subcategory: ""
45
description: |-
@@ -9,17 +10,7 @@ description: |-
910

1011
Campaign data source
1112

12-
## Example Usage
1313

14-
```terraform
15-
data "opslevel_campaign" "example" {
16-
identifier = "Z2lkOi8vb3BzbGV2ZWwvQ2FtcGFpZ24vMTIz"
17-
}
18-
19-
output "campaign_name" {
20-
value = data.opslevel_campaign.example.name
21-
}
22-
```
2314

2415
<!-- schema generated by tfplugindocs -->
2516
## Schema
@@ -39,3 +30,5 @@ output "campaign_name" {
3930
- `start_date` (String) The start date of the campaign.
4031
- `status` (String) The current status of the campaign.
4132
- `target_date` (String) The target end date of the campaign.
33+
34+

docs/data-sources/campaigns.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
23
page_title: "opslevel_campaigns Data Source - terraform-provider-opslevel"
34
subcategory: ""
45
description: |-
@@ -7,19 +8,9 @@ description: |-
78

89
# opslevel_campaigns (Data Source)
910

10-
Campaign data sources — lists all campaigns, optionally filtered by status.
11+
Campaign data sources
1112

12-
## Example Usage
1313

14-
```terraform
15-
data "opslevel_campaigns" "active" {
16-
status = "in_progress"
17-
}
18-
19-
output "active_campaign_names" {
20-
value = [for c in data.opslevel_campaigns.active.campaigns : c.name]
21-
}
22-
```
2314

2415
<!-- schema generated by tfplugindocs -->
2516
## Schema
@@ -30,7 +21,7 @@ output "active_campaign_names" {
3021

3122
### Read-Only
3223

33-
- `campaigns` (List of Object) List of Campaign data sources (see [below for nested schema](#nestedatt--campaigns))
24+
- `campaigns` (Attributes List) List of Campaign data sources (see [below for nested schema](#nestedatt--campaigns))
3425

3526
<a id="nestedatt--campaigns"></a>
3627
### Nested Schema for `campaigns`
@@ -46,3 +37,5 @@ Read-Only:
4637
- `start_date` (String) The start date of the campaign.
4738
- `status` (String) The current status of the campaign.
4839
- `target_date` (String) The target end date of the campaign.
40+
41+

docs/resources/campaign.md

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
23
page_title: "opslevel_campaign Resource - terraform-provider-opslevel"
34
subcategory: ""
45
description: |-
@@ -9,12 +10,8 @@ description: |-
910

1011
Campaign Resource
1112

12-
Manages an OpsLevel campaign. Campaigns allow you to roll out changes across your engineering organization that require orchestrated effort across multiple teams.
13-
1413
## Example Usage
1514

16-
### Draft campaign (no schedule)
17-
1815
```terraform
1916
data "opslevel_team" "platform" {
2017
alias = "platform"
@@ -32,6 +29,9 @@ resource "opslevel_campaign" "upgrade_rails" {
3229
owner_id = data.opslevel_team.platform.id
3330
filter_id = data.opslevel_filter.tier_1.id
3431
32+
start_date = "2026-07-01"
33+
target_date = "2026-09-30"
34+
3535
project_brief = <<-EOT
3636
## Overview
3737
All Rails services must upgrade to Rails 7 by end of Q3.
@@ -44,56 +44,6 @@ resource "opslevel_campaign" "upgrade_rails" {
4444
}
4545
```
4646

47-
### Campaign with checks
48-
49-
```terraform
50-
resource "opslevel_campaign" "soc2_compliance" {
51-
name = "SOC2 Compliance Rollout"
52-
owner_id = data.opslevel_team.platform.id
53-
filter_id = data.opslevel_filter.tier_1.id
54-
55-
check_ids = [
56-
opslevel_check_custom_event.secret_rotation.id,
57-
opslevel_check_custom_event.dependency_scanning.id,
58-
]
59-
60-
project_brief = <<-EOT
61-
All Tier 1 services must pass SOC2 checks by end of Q3.
62-
EOT
63-
}
64-
```
65-
66-
### Scheduled campaign
67-
68-
```terraform
69-
resource "opslevel_campaign" "python_upgrade" {
70-
name = "Upgrade to Python 3.12"
71-
owner_id = data.opslevel_team.platform.id
72-
filter_id = data.opslevel_filter.tier_1.id
73-
74-
start_date = "2026-07-01"
75-
target_date = "2026-09-30"
76-
77-
project_brief = <<-EOT
78-
Upgrade all Python services to 3.12 for security and performance.
79-
EOT
80-
}
81-
```
82-
83-
## Check Management
84-
85-
The `check_ids` attribute accepts a list of rubric check IDs. On create, these checks are copied into the campaign. On update, the provider reconciles the list — adding new checks and removing stale ones to match the desired configuration.
86-
87-
Terraform detects drift: if a check is removed from the campaign outside of Terraform (e.g. via the UI), the next `terraform plan` will show it as needing to be re-added.
88-
89-
~> **Note:** The OpsLevel API copies checks into campaigns as separate instances with different IDs but the same name. The provider matches rubric checks to campaign checks by name. If two rubric checks share the same name, the provider may not be able to distinguish them, which can lead to incorrect removal. Ensure rubric check names are unique when using `check_ids`.
90-
91-
## Schedule Management
92-
93-
Setting both `start_date` and `target_date` schedules the campaign. Removing both fields unschedules it back to draft status.
94-
95-
Both fields must be set together — setting only one will result in an error.
96-
9747
<!-- schema generated by tfplugindocs -->
9848
## Schema
9949

0 commit comments

Comments
 (0)