Releases: OpsLevel/terraform-provider-opslevel
v1.0.2
June 06, 2024
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
v1.0.1
June 03, 2024
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
v1.0.0
May 31, 2024
We at OpsLevel have been working on upgrading our Terraform provider 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.
BREAKING CHANGES to some resource fields
The following resources with fields that were “block type fields" will need an “=” added.
- opslevel_check_manual
# 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 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.
# 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:
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:
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:
data "opslevel_domains" "all" {}
output "all" {
value = data.opslevel_domains.all
}
output "domain_names" {
value = sort(data.opslevel_domains.all.names)
}
Will return:
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
- fix unsetting api_document_path field in Service resource
- fix unsetting responsibilities field in Team resource
- accept case insensitive contact types - i.e. slack,email,web,github
- force replace ServiceRepository if deleted from UI
- keep existing Team members when no member blocks used
- can now unset parent Domain field from System
- Fix bug on resource
opslevel_service
where'' was not found
error message was thrown on all updates fortier_alias
,lifecycle_alias
- Fix bug where
owner
on resourceopslevel_service
could not be unset - Fix bug where
owner
on resourceopslevel_service
had to be the default alias of a team - any valid alias can now be used - Fix bug on resource
opslevel_check_repository_grep
wherefile_contents_predicate
was not required causing API errors - fix listing services, show empty list when no services exist
- fix default value for OPSLEVEL_API_TIMEOUT when not provided
- upstream Domain Aliases field updated to ManagedAliases
Feature
- add Terraform config validation to filter predicates
- add fields (aliases, ID) to Webhook Action datasource
- add new webhook actions datasource
- add users datasource back after upgrade
- add new output to the
opslevel_repository
data source - add Terraform config validation to owner field in Domain resource
- bump opslevel-go version to 'v2024.5.13'
- add filters datasource back after upgrade
- add repositories datasource back after upgrade
- add rubric_levels datasource back after upgrade
- add integrations datasource back after upgrade
- add lifecycles datasource back after upgrade
- add property_definitions datasource back after upgrade
- add scorecards datasource back after upgrade
- add services datasource back after upgrade
- add teams datasource back after upgrade
- add fields to teams datasource - name, members, parent_alias, parent_id
- add tiers datasource back after upgrade
- can filter services datasource by filter id
- add rubric_categories datasource back after upgrade
- add systems datasource back after upgrade
- add domains datasource back after upgrade
- add user datasource
Dependency
- Bump goreleaser/goreleaser-action from 5.0.0 to 5.1.0
- bump opslevel-go version to v2024.4.26
Refactor
- fix unneeded updates to "aliases" field in infrastructure, service, and team when only order is changed. Converted "aliases" from list type to set type
- datasource opslevel_service takes identifier, replaces id or alias
- TF config: "tag_predicate" field in opslevel_check resources use equal sign
- TF config: "update_frequency" field in opslevel_check_manual resource uses equal sign
- TF config: "provider_data" field in opslevel_infrastructure resource uses equal sign
Removed
- unused 'last_updated' computed field from all resources
v0.13.0-2
May 13, 2024
Bugfix
- can now unset parent Domain field from System
- Fix bug on resource
opslevel_service
where'' was not found
error message was thrown on all updates fortier_alias
,lifecycle_alias
- Fix bug where
owner
on resourceopslevel_service
could not be unset - Fix bug where
owner
on resourceopslevel_service
had to be the default alias of a team - any valid alias can now be used - Fix bug on resource
opslevel_check_repository_grep
wherefile_contents_predicate
was not required causing API errors - fix listing services, show empty list when no services exist
Feature
- add fields (aliases, ID) to Webhook Action datasource
- add new webhook actions datasource
- add users datasource back after upgrade
- add new output to the
opslevel_repository
data source - add Terraform config validation to owner field in Domain resource
- bump opslevel-go version to 'v2024.5.13'
Dependency
- Bump goreleaser/goreleaser-action from 5.0.0 to 5.1.0
v0.13.0-1
April 26, 2024
Feature
- add filters datasource back after upgrade
- add repositories datasource back after upgrade
- add rubric_levels datasource back after upgrade
- add integrations datasource back after upgrade
- add lifecycles datasource back after upgrade
- add property_definitions datasource back after upgrade
- add scorecards datasource back after upgrade
- add services datasource back after upgrade
- add teams datasource back after upgrade
- add fields to teams datasource - name, members, parent_alias, parent_id
- add tiers datasource back after upgrade
- can filter services datasource by filter id
- bump opslevel-go version to v2024.4.26
v0.13.0-0
April 19, 2024
Bugfix
- fix default value for OPSLEVEL_API_TIMEOUT when not provided
Feature
- add rubric_categories datasource back after upgrade
- add systems datasource back after upgrade
- add domains datasource back after upgrade
v0.12.0-0
April 16, 2024
Bugfix
- upstream Domain Aliases field updated to ManagedAliases
Feature
- add user datasource
Refactor
- datasource opslevel_service takes identifier, replaces id or alias
- TF config: "tag_predicate" field in opslevel_check resources use equal sign
- TF config: "update_frequency" field in opslevel_check_manual resource uses equal sign
- TF config: "provider_data" field in opslevel_infrastructure resource uses equal sign
Removed
- TEMPORARY: datasources that return multiple resources, e.g. opslevel_rubric_levels
v0.11.0
March 22, 2024
Bugfix
- add missing id to opslevel.CheckUpdateInput during check update
Feature
- Add support for locked property assignments and allowed_in_config_files property definitions
- release opslevel_webhook_action datasource
Dependency
- Bump google.golang.org/protobuf from 1.32.0 to 1.33.0
- Bump github.com/opslevel/opslevel-go/v2024 from 2024.2.26 to 2024.3.15
v0.10.0
February 26, 2024
Bugfix
- Fixed bug in filter predicates where making some filters like on repository_ids was impossible because of bool 'case_sensitive' being required. To toggle case_sensitive use 'case_sensitive = true' or 'case_insensitive = true'. A bug still persists where case sensitivity cannot be disabled when updating a predicate. The workaround is to manually set the predicate to null in Graphiql.
- Fixed bug in filters where the connective was not able to be omitted. A bug still persists where once the optional 'connective' value is set it cannot be unset to null, only changed to 'and' and 'or'. To workaround this you can set 'connective' to null in Graphiql.
- on property_assignment resources the fields owner and definition can use alias not just id, fix an infinite plan bug because we store the wrong thing into the terraform state
- Fix bug where aliases was required for Team resource and aliases contained the slug
Dependency
- Bump github.com/rs/zerolog from 1.31.0 to 1.32.0
- Bump arduino/setup-task from 1 to 2
- Bump zwaldowski/semver-release-action from 3 to 4
v0.9.0
January 16, 2024
Bugfix
- Fix bug where a Team's parent became unset or changed unexpectedly
- Fix bug where parent team could not be unassigned
- [BREAKING CHANGE] require filter predicate case_sensitive bool to prevent bug where value cannot be set to false
- Fix bug where using 'required_contact_method = true' in service ownership checks was not possible
Feature
- Support for Property Definitions as a terraform resource
- Support for Property Definitions as a terraform datasource
- Add ability to assign and unassign properties on a Service in terraform
- Add support for unsetting the owner of a Service
- Add support for removing the owner and domain on a System
- Add support for alias as Team's parent
Refactor
- [BREAKING CHANGE] all optional boolean fields are now required
- BREAKING CHANGE: update schemas to support opslevel-go v2024
Removed
- Removed support for the deprecated owner_alias in Service resource
- Groups, Group fields from Teams, Owner cannot be Group