Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opslevel/terraform-provider-opslevel
Terraform provider for OpsLevel.com
https://github.com/opslevel/terraform-provider-opslevel
go golang terraform terraform-provider
Last synced: 4 days ago
JSON representation
Terraform provider for OpsLevel.com
- Host: GitHub
- URL: https://github.com/opslevel/terraform-provider-opslevel
- Owner: OpsLevel
- License: mit
- Created: 2021-07-10T16:52:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T20:53:38.000Z (7 months ago)
- Last Synced: 2024-04-13T20:56:52.828Z (7 months ago)
- Topics: go, golang, terraform, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/OpsLevel/opslevel/latest/docs
- Size: 1.41 MB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![Overall](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fapp.opslevel.com%2Fapi%2Fservice_level%2FOYbJw2HuOqY7Np42eBzMn_RCwWebqaywVSJAQczStEY)](https://app.opslevel.com/services/opslevel_terraform_provider/maturity-report)
Terraform Provider for [OpsLevel](https://opslevel.com)
===============================## Minimum requirements
- Terraform 1.7.0 or newer. We recommend running the [latest version](https://developer.hashicorp.com/terraform/downloads?product_intent=terraform) for optimal compatibility with the OpsLevel provider.
# Migrating to v1.0.0
Notes on migrating to v1.0.0 and fixes to migration issues can be found in [./MIGRATION.md].
[Provider Documentation](https://registry.terraform.io/providers/OpsLevel/opslevel/latest/docs)
[Quickstart](https://www.opslevel.com/docs/terraform)
[Importing All Existing Account Data](https://www.opslevel.com/docs/terraform/#Importing)## Example
```hcl
provider "opslevel" {
api_token = "XXX" // or environment variable OPSLEVEL_API_TOKEN
}resource "opslevel_team" "foo" {
name = "foo"
responsibilities = "Responsible for foo frontend and backend"member {
email = "[email protected]"
role = "manager"
}
member {
email = "[email protected]"
role = "contributor"
}
}resource "opslevel_service" "foo-frontend" {
name = "foo-frontend"description = "The foo frontend service"
framework = "rails"
language = "ruby"lifecycle_alias = "beta"
tier_alias = "tier_3"
owner = opslevel_team.foo.aliastags = [
"environment:production",
]
}data "opslevel_rubric_category" "security" {
filter {
field = "name"
value = "Security"
}
}data "opslevel_rubric_level" "bronze" {
filter {
field = "name"
value = "Bronze"
}
}resource "opslevel_filter" "filter" {
name = "foo"
predicate {
key = "tier_index"
type = "equals"
value = "tier_3"
}
connective = "and"
}resource "opslevel_check_repository_integrated" "foo" {
name = "foo"
enabled = true
category = data.opslevel_rubric_category.security.id
level = data.opslevel_rubric_level.bronze.id
owner = opslevel_team.foo.id
filter = opslevel_filter.filter.id
notes = "Optional additional info on why this check is run or how to fix it"
}
```# Useful Terraform Snippets
Get a service's tag keys
```hcl
output "service_tag_keys" {
value = values({for entry in opslevel_service.example.tags : entry => split(":", entry)[0]})
}
```Get a service's tag values
```hcl
output "service_tag_values" {
value = values({for entry in opslevel_service.example.tags : entry => split(":", entry)[1]})
}
```