Skip to content

Commit

Permalink
Cut Release 'v1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
opslevel-ops committed Jun 6, 2024
1 parent 412e494 commit 49a9864
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 22 deletions.
4 changes: 0 additions & 4 deletions .changes/unreleased/Bugfix-20240604-112057.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions .changes/unreleased/Bugfix-20240606-112819.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions .changes/unreleased/Bugfix-20240606-135829.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions .changes/unreleased/Refactor-20240604-112724.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .changes/v1.0.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## [June 06, 2024](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v1.0.1...v1.0.2)
### Bugfix
- enforce opslevel_check_repository_search.file_extensions is null or non-empty to match API
- provider arg 'api_token' is optional, defaults to env var token instead of raising error
- terraform import opslevel_team_tag resources fixed
### Refactor
- ensure unique file_extensions in opslevel_check_repository_search by converting this field from list type to set type
172 changes: 170 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,183 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and is generated by [Changie](https://github.com/miniscruff/changie).## [June 03, 2024](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v1.0.0...v1.0.1)
and is generated by [Changie](https://github.com/miniscruff/changie).## [June 06, 2024](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v1.0.1...v1.0.2)
### Bugfix
- enforce opslevel_check_repository_search.file_extensions is null or non-empty to match API
- provider arg 'api_token' is optional, defaults to env var token instead of raising error
- terraform import opslevel_team_tag resources fixed
### Refactor
- ensure unique file_extensions in opslevel_check_repository_search by converting this field from list type to set type## [June 03, 2024](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v1.0.0...v1.0.1)
### Bugfix
- skip unneeded update on service tag ordering, convert tags from list type to set type
- fix unwanted update to trigger_definition.entity_type when specified## [May 31, 2024](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v0.11.0...v1.0.0)

We at OpsLevel have been working on upgrading [our Terraform provider](https://github.com/OpsLevel/terraform-provider-opslevel) to version 1.0.0.

While the majority of these improvements are under the hood, there are a few Terraform configuration changes to be aware of.
These are covered in the [Migration Guide to v1.0.0](./MIGRATION.md)

# BREAKING CHANGES to some resource fields

The following resources with fields that were “block type fields" will need an “=” added.

- opslevel_check_manual

```yaml
# OLD - no "=" sign
resource "opslevel_check_manual" "example" {
update_frequency { ... }
}
# New has "=" sign
resource "opslevel_check_manual" "example" {
update_frequency = { ... }
}
```
Just like `opslevel_check_manual.update_frequency`, the following `opslevel_resource.field`s will need an "=" added.
- `opslevel_check_alert_source_usage.alert_name_predicate`
- `opslevel_check_repository_file.file_contents_predicate`
- `opslevel_check_repository_grep.file_contents_predicate`
- `opslevel_check_repository_search.file_contents_predicate`
- `opslevel_check_service_ownership.tag_predicate`
- `opslevel_check_service_property.predicate`
- `opslevel_infrastructure.provider_data`
- `data.opslevel_repositories.filter` (datasource)
- `data.opslevel_services.filter` (datasource)


# BREAKING CHANGES with OpsLevel's updated "plural" datasources

Many of our [datasources](https://registry.terraform.io/providers/OpsLevel/opslevel/latest/docs) were updated to provide a better user experience and may require a few small updates.

## Terraform configuration changes during upgrade

When upgrading from versions older than 0.12.0-0, updating the outputs of "plural" datasources may be needed.

```terraform
# Requesting the datasource remains the same
data "opslevel_domains" "all" {}
# OLD - before v0.12.0-0
output "all" {
value = data.opslevel_domains.all
}
output "domain_names" {
value = data.opslevel_domains.all.names
}
# NEW - versions v0.12.0-0 and after
output "all" {
value = data.opslevel_domains.all.domains
}
output "domain_names" {
value = data.opslevel_domains.all.domains[*].name
}
```

This same pattern applies to `data.opslevel_scorecards`, `data.opslevel_services`, `data.opslevel_teams`, etc.

### Output Example - `data.opslevel_domains` with version >= 0.12.0

Given this configuration:

```terraform
data "opslevel_domains" "all" {}
output "all" {
value = data.opslevel_domains.all.domains
}
output "domain_names" {
value = sort(data.opslevel_domains.all.domains[*].name)
}
```

Will return:

```terraform
data.opslevel_domains.all: Reading...
data.opslevel_domains.all: Read complete after 1s
Changes to Outputs:
+ all = [
+ {
+ aliases = [
+ "alias_1",
+ "alias_2",
]
+ description = null
+ id = "Z2lkOi8vb3BzbGV2ZWwvRW50aXR5T2JqZWN0LzEwOTk2NjU"
+ name = "Big Domain"
+ owner = "Z2lkOi8vb3BzbGV2ZWwvVGVhbS8xNDQwNg"
},
+ {
+ aliases = [
+ "example_1",
+ "example_2",
]
+ description = "Example description"
+ id = "Z2lkOi8vb3BzbGV2ZWwvRW50aXR5T2JqZWN0LzE4ODg2NzA"
+ name = "Example Domain"
+ owner = "Z2lkOi8vb3BzbGV2ZWwvVGVhbS85NzU5"
},
]
+ domain_names = [
+ "Big Domain",
+ "Example Domain",
]
```

### Output Example - `data.opslevel_domains` before version 0.12.0-0

Given this configuration:

```terraform
data "opslevel_domains" "all" {}
output "all" {
value = data.opslevel_domains.all
}
output "domain_names" {
value = sort(data.opslevel_domains.all.names)
}
```

Will return:

```terraform
data.opslevel_domains.all: Reading...
data.opslevel_domains.all: Read complete after 1s
Changes to Outputs:
+ all = [
+ aliases = [
+ "alias_1",
+ "alias_2",
+ "example_1",
+ "example_2",
]
+ descriptions = [
+ "",
+ "Example description",
]
+ ids = [
+ "Z2lkOi8vb3BzbGV2ZWwvRW50aXR5T2JqZWN0LzEwOTk2NjU",
+ "Z2lkOi8vb3BzbGV2ZWwvRW50aXR5T2JqZWN0LzE4ODg2NzA",
]
+ names = [
+ "Big Domain",
+ "Example Domain",
]
+ owners = [
+ "Z2lkOi8vb3BzbGV2ZWwvVGVhbS8xNDQwNg",
+ "Z2lkOi8vb3BzbGV2ZWwvVGVhbS85NzU5",
]
}
+ domain_names = [
+ "Big Domain",
+ "Example Domain",
]
```

### Bugfix
- fix unsetting headers field in Webhook Action resource
Expand Down
5 changes: 1 addition & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,10 @@ resource "opslevel_check_repository_integrated" "foo" {
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `api_token` (String, Sensitive) The API authorization token. It can also be sourced from the OPSLEVEL_API_TOKEN environment variable.

### Optional

- `api_timeout` (Number) Value (in seconds) to use for the timeout of API calls made. It can also be sourced from the OPSLEVEL_API_TIMEOUT environment variable.
- `api_token` (String, Sensitive) The API authorization token. It can also be sourced from the OPSLEVEL_API_TOKEN environment variable.
- `api_url` (String) The url of the OpsLevel API to. It can also be sourced from the OPSLEVEL_API_URL environment variable.

## Argument Reference
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/check_repository_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ resource "opslevel_check_repository_search" "example" {
If you use this field you should add both 'enabled' and 'enable_on' to the lifecycle ignore_changes settings.
See example in opslevel_check_manual for proper configuration.
- `enabled` (Boolean) Whether the check is enabled or not. Do not use this field in tandem with 'enable_on'.
- `file_extensions` (List of String) Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: ["py", "rb"].
- `file_extensions` (Set of String) Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: ["py", "rb"].
- `filter` (String) The id of the filter of the check.
- `notes` (String) Additional information to display to the service owner about the check.
- `owner` (String) The id of the team that owns the check.
Expand Down

0 comments on commit 49a9864

Please sign in to comment.