diff --git a/.changes/unreleased/Feature-20230831-112138.yaml b/.changes/unreleased/Feature-20230831-112138.yaml deleted file mode 100644 index 0ede2926..00000000 --- a/.changes/unreleased/Feature-20230831-112138.yaml +++ /dev/null @@ -1,3 +0,0 @@ -kind: Feature -body: add datasource for scorecards -time: 2023-08-31T11:21:38.61878-04:00 diff --git a/.changes/unreleased/Feature-20230912-152914.yaml b/.changes/unreleased/Feature-20230912-152914.yaml deleted file mode 100644 index 33ecaca4..00000000 --- a/.changes/unreleased/Feature-20230912-152914.yaml +++ /dev/null @@ -1,3 +0,0 @@ -kind: Feature -body: add webhook action data source -time: 2023-09-12T15:29:14.031552-05:00 diff --git a/.changes/unreleased/Feature-20230912-153021.yaml b/.changes/unreleased/Feature-20230912-153021.yaml deleted file mode 100644 index 8d5b5bdc..00000000 --- a/.changes/unreleased/Feature-20230912-153021.yaml +++ /dev/null @@ -1,3 +0,0 @@ -kind: Feature -body: add extendedTeamAccess field to trigger definitions -time: 2023-09-12T15:30:21.239598-05:00 diff --git a/.changes/v0.8.9.md b/.changes/v0.8.9.md new file mode 100644 index 00000000..26c8ce07 --- /dev/null +++ b/.changes/v0.8.9.md @@ -0,0 +1,5 @@ +## [September 15, 2023](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v0.8.8...v0.8.9) +### Feature +- add datasource for scorecards +- add webhook action data source +- add extendedTeamAccess field to trigger definitions \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 27071537..afa66620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ 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).## [August 28, 2023](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v0.8.7...v0.8.8) +and is generated by [Changie](https://github.com/miniscruff/changie).## [September 15, 2023](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v0.8.8...v0.8.9) +### Feature +- add datasource for scorecards +- add webhook action data source +- add extendedTeamAccess field to trigger definitions## [August 28, 2023](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v0.8.7...v0.8.8) ### Feature - add support for scorecards (no datasource)## [August 15, 2023](https://github.com/OpsLevel/terraform-provider-opslevel/compare/v0.8.6...v0.8.7) ### Bugfix diff --git a/docs/data-sources/group.md b/docs/data-sources/group.md index 16f6f109..f6c52a53 100644 --- a/docs/data-sources/group.md +++ b/docs/data-sources/group.md @@ -14,11 +14,11 @@ description: |- ```terraform data "opslevel_group" "foo" { - identifier = "foo" + identifier = "foo" } data "opslevel_group" "bar" { - identifier = "Z2lkOi8vb3BzbGV2ZWwvTmFtZXNwYWNlczo6R3JvdXAvNTI" + identifier = "Z2lkOi8vb3BzbGV2ZWwvTmFtZXNwYWNlczo6R3JvdXAvNTI" } ``` diff --git a/docs/data-sources/integration.md b/docs/data-sources/integration.md index 64693f8d..41ea229d 100644 --- a/docs/data-sources/integration.md +++ b/docs/data-sources/integration.md @@ -14,10 +14,10 @@ description: |- ```terraform data "opslevel_integration" "deploy" { - filter { - field = "name" - value = "deploy" - } + filter { + field = "name" + value = "deploy" + } } ``` diff --git a/docs/data-sources/lifecycle.md b/docs/data-sources/lifecycle.md index 91fdf61a..8f329782 100644 --- a/docs/data-sources/lifecycle.md +++ b/docs/data-sources/lifecycle.md @@ -14,17 +14,17 @@ description: |- ```terraform data "opslevel_lifecycle" "beta" { - filter { - field = "alias" - value = "beta" - } + filter { + field = "alias" + value = "beta" + } } data "opslevel_lifecycle" "pre-alpha" { - filter { - field = "index" - value = "0" - } + filter { + field = "index" + value = "0" + } } ``` diff --git a/docs/data-sources/repositories.md b/docs/data-sources/repositories.md index 1323c8f0..23b7cdb1 100644 --- a/docs/data-sources/repositories.md +++ b/docs/data-sources/repositories.md @@ -14,10 +14,10 @@ description: |- ```terraform data "opslevel_tier" "tier2" { - filter { - field = "alias" - value = "tier_2" - } + filter { + field = "alias" + value = "tier_2" + } } data "opslevel_repositories" "all" { diff --git a/docs/data-sources/repository.md b/docs/data-sources/repository.md index d333eaba..782724e4 100644 --- a/docs/data-sources/repository.md +++ b/docs/data-sources/repository.md @@ -14,11 +14,11 @@ description: |- ```terraform data "opslevel_repository" "foo" { - alias = "github.com:organization/example" + alias = "github.com:organization/example" } data "opslevel_repository" "bar" { - id = "Z2lkOi8vb3BzbGV2ZWwvUmVwb3NpdG9yaWVzOjpHaXRodWIvMjY1MTk" + id = "Z2lkOi8vb3BzbGV2ZWwvUmVwb3NpdG9yaWVzOjpHaXRodWIvMjY1MTk" } ``` diff --git a/docs/data-sources/rubric_category.md b/docs/data-sources/rubric_category.md index 1361aadc..3aad72b3 100644 --- a/docs/data-sources/rubric_category.md +++ b/docs/data-sources/rubric_category.md @@ -14,17 +14,17 @@ description: |- ```terraform data "opslevel_rubric_category" "security" { - filter { - field = "name" - value = "Security" - } + filter { + field = "name" + value = "Security" + } } data "opslevel_rubric_category" "Observability" { - filter { - field = "id" - value = "Z2lkOi8vb3BzbGV2ZWwvQ2F0ZWdvcnkvNjA3" - } + filter { + field = "id" + value = "Z2lkOi8vb3BzbGV2ZWwvQ2F0ZWdvcnkvNjA3" + } } ``` diff --git a/docs/data-sources/rubric_level.md b/docs/data-sources/rubric_level.md index 4ae7f9ca..d3eb22ae 100644 --- a/docs/data-sources/rubric_level.md +++ b/docs/data-sources/rubric_level.md @@ -14,17 +14,17 @@ description: |- ```terraform data "opslevel_rubric_level" "bronze" { - filter { - field = "alias" - value = "bronze" - } + filter { + field = "alias" + value = "bronze" + } } data "opslevel_rubric_level" "gold" { - filter { - field = "id" - value = "Z2lkOi8vb3BzbGV2ZWwvTGV2ZWwvMzE5" - } + filter { + field = "id" + value = "Z2lkOi8vb3BzbGV2ZWwvTGV2ZWwvMzE5" + } } ``` diff --git a/docs/data-sources/scorecard.md b/docs/data-sources/scorecard.md new file mode 100644 index 00000000..94279540 --- /dev/null +++ b/docs/data-sources/scorecard.md @@ -0,0 +1,34 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "opslevel_scorecard Data Source - terraform-provider-opslevel" +subcategory: "" +description: |- + +--- + +# opslevel_scorecard (Data Source) + + + + + + +## Schema + +### Required + +- `identifier` (String) The id or alias of the scorecard to find. + +### Read-Only + +- `aliases` (List of String) The scorecard's aliases. +- `description` (String) The scorecard's description. +- `filter_id` (String) The scorecard's filter. +- `id` (String) The ID of this resource. +- `name` (String) The scorecard's name. +- `owner_id` (String) The scorecard's owner. +- `passing_checks` (Number) The scorecard's number of checks that are passing. +- `service_count` (Number) The scorecard's number of services matched. +- `total_checks` (Number) The scorecard's total number of checks. + + diff --git a/docs/data-sources/scorecards.md b/docs/data-sources/scorecards.md new file mode 100644 index 00000000..7b9cf6df --- /dev/null +++ b/docs/data-sources/scorecards.md @@ -0,0 +1,31 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "opslevel_scorecards Data Source - terraform-provider-opslevel" +subcategory: "" +description: |- + +--- + +# opslevel_scorecards (Data Source) + + + + + + +## Schema + +### Read-Only + +- `aliases` (List of List of String) +- `descriptions` (List of String) +- `filter_ids` (List of String) +- `id` (String) The ID of this resource. +- `ids` (List of String) +- `names` (List of String) +- `owner_ids` (List of String) +- `passing_checks` (List of Number) +- `service_counts` (List of Number) +- `total_checks` (List of Number) + + diff --git a/docs/data-sources/services.md b/docs/data-sources/services.md index 994f4a16..cd1683a6 100644 --- a/docs/data-sources/services.md +++ b/docs/data-sources/services.md @@ -14,10 +14,10 @@ description: |- ```terraform data "opslevel_tier" "tier1" { - filter { - field = "alias" - value = "tier_1" - } + filter { + field = "alias" + value = "tier_1" + } } data "opslevel_services" "all" { diff --git a/docs/data-sources/team.md b/docs/data-sources/team.md index 1c974106..a3d174d6 100644 --- a/docs/data-sources/team.md +++ b/docs/data-sources/team.md @@ -14,11 +14,11 @@ description: |- ```terraform data "opslevel_team" "devs" { - alias = "developers" + alias = "developers" } data "opslevel_team" "devs" { - id = "Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS83NzQ0" + id = "Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS83NzQ0" } ``` diff --git a/docs/data-sources/tier.md b/docs/data-sources/tier.md index a6d45c3b..07ef6cf6 100644 --- a/docs/data-sources/tier.md +++ b/docs/data-sources/tier.md @@ -14,17 +14,17 @@ description: |- ```terraform data "opslevel_tier" "tier1" { - filter { - field = "alias" - value = "tier_1" - } + filter { + field = "alias" + value = "tier_1" + } } data "opslevel_tier" "tier3" { - filter { - field = "index" - value = "3" - } + filter { + field = "index" + value = "3" + } } ``` diff --git a/docs/index.md b/docs/index.md index ac31b471..7790d93e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,8 +20,8 @@ provider "opslevel" { } resource "opslevel_team" "foo" { - name = "foo" - manager_email = "foo@example.com" + name = "foo" + manager_email = "foo@example.com" responsibilities = "Responsible for foo frontend and backend" } @@ -33,8 +33,8 @@ resource "opslevel_service" "foo-frontend" { language = "ruby" lifecycle_alias = "beta" - tier_alias = "tier_3" - owner_alias = opslevel_team.foo.alias + tier_alias = "tier_3" + owner_alias = opslevel_team.foo.alias tags = [ "environment:production", @@ -58,21 +58,21 @@ data "opslevel_rubric_level" "bronze" { resource "opslevel_filter" "filter" { name = "foo" predicate { - key = "tier_index" - type = "equals" + key = "tier_index" + type = "equals" value = "tier_3" } connective = "and" } resource "opslevel_check_repository_integrated" "foo" { - name = "foo" - enabled = true + 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" + 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" } ``` diff --git a/docs/resources/check_custom_event.md b/docs/resources/check_custom_event.md index ab565308..853332d5 100644 --- a/docs/resources/check_custom_event.md +++ b/docs/resources/check_custom_event.md @@ -39,25 +39,25 @@ data "opslevel_filter" "tier1" { } data "opslevel_integration" "kubernetes" { - filter { - field = "name" - value = "Kubernetes" - } + filter { + field = "name" + value = "Kubernetes" + } } resource "opslevel_check_custom_event" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" - category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id - integration = data.opslevel_integration.kubernetes.id - service_selector = ".messages[] | .incident.service.id" + category = data.opslevel_rubric_category.security.id + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id + integration = data.opslevel_integration.kubernetes.id + service_selector = ".messages[] | .incident.service.id" success_condition = ".messages[] | select(.incident.service.id == $ctx.alias) | .incident.status == \"resolved\"" - message = <<-EOT + message = <<-EOT {% if check.passed %} ### Check passed {% else %} @@ -66,7 +66,7 @@ resource "opslevel_check_custom_event" "example" { {% endif %} OpsLevel note: here you can fill in more details about this check. You can even include `data` from the payload, `params` specified in the URL and context `ctx` such as the service alias for the current evaluation. EOT - notes = "Optional additional info on why this check is run or how to fix it" + notes = "Optional additional info on why this check is run or how to fix it" } ``` diff --git a/docs/resources/check_has_documentation.md b/docs/resources/check_has_documentation.md index a8a62d6b..4655f36d 100644 --- a/docs/resources/check_has_documentation.md +++ b/docs/resources/check_has_documentation.md @@ -39,8 +39,8 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_has_documentation" "has_docs" { - name = "foo" - enabled = true + name = "foo" + enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" category = data.opslevel_rubric_category.security.id diff --git a/docs/resources/check_repository_file.md b/docs/resources/check_repository_file.md index 76c663a2..0a36b850 100644 --- a/docs/resources/check_repository_file.md +++ b/docs/resources/check_repository_file.md @@ -39,19 +39,19 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_repository_file" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" - category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id + category = data.opslevel_rubric_category.security.id + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id directory_search = false - filepaths = ["/src", "/tests"] + filepaths = ["/src", "/tests"] file_contents_predicate { - type = "equals" - value = "import shim" + type = "equals" + value = "import shim" } notes = "Optional additional info on why this check is run or how to fix it" } diff --git a/docs/resources/check_repository_grep.md b/docs/resources/check_repository_grep.md index e313a340..3436daf6 100644 --- a/docs/resources/check_repository_grep.md +++ b/docs/resources/check_repository_grep.md @@ -39,19 +39,19 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_repository_grep" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" - category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id + category = data.opslevel_rubric_category.security.id + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id directory_search = false - filepaths = ["/src", "/tests"] + filepaths = ["/src", "/tests"] file_contents_predicate { - type = "contains" - value = "**/hello.go" + type = "contains" + value = "**/hello.go" } notes = "Optional additional info on why this check is run or how to fix it" } diff --git a/docs/resources/check_repository_integrated.md b/docs/resources/check_repository_integrated.md index d3a15eda..9d90f8d6 100644 --- a/docs/resources/check_repository_integrated.md +++ b/docs/resources/check_repository_integrated.md @@ -39,15 +39,15 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_repository_integrated" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id - notes = "Optional additional info on why this check is run or how to fix it" + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id + notes = "Optional additional info on why this check is run or how to fix it" } ``` diff --git a/docs/resources/check_repository_search.md b/docs/resources/check_repository_search.md index 5c61b91d..6929f412 100644 --- a/docs/resources/check_repository_search.md +++ b/docs/resources/check_repository_search.md @@ -39,18 +39,18 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_repository_search" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" - category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id + category = data.opslevel_rubric_category.security.id + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id file_extensions = ["sbt", "py"] file_contents_predicate { - type = "contains" - value = "postgres" + type = "contains" + value = "postgres" } notes = "Optional additional info on why this check is run or how to fix it" } diff --git a/docs/resources/check_service_configuration.md b/docs/resources/check_service_configuration.md index e8e48411..1c529f5e 100644 --- a/docs/resources/check_service_configuration.md +++ b/docs/resources/check_service_configuration.md @@ -39,15 +39,15 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_service_configuration" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id - notes = "Optional additional info on why this check is run or how to fix it" + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id + notes = "Optional additional info on why this check is run or how to fix it" } ``` diff --git a/docs/resources/check_service_ownership.md b/docs/resources/check_service_ownership.md index a6074591..d16fc0e7 100644 --- a/docs/resources/check_service_ownership.md +++ b/docs/resources/check_service_ownership.md @@ -39,20 +39,20 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_service_ownership" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" - category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id - notes = "Optional additional info on why this check is run or how to fix it" + category = data.opslevel_rubric_category.security.id + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id + notes = "Optional additional info on why this check is run or how to fix it" require_contact_method = true - contact_method = "ANY" - tag_key = "team" + contact_method = "ANY" + tag_key = "team" tag_predicate { - type = "equals" + type = "equals" value = "frontend" } } diff --git a/docs/resources/check_service_property.md b/docs/resources/check_service_property.md index 178e5d2d..2265025d 100644 --- a/docs/resources/check_service_property.md +++ b/docs/resources/check_service_property.md @@ -39,18 +39,18 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_service_property" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id property = "language" predicate { - type = "equals" - value = "python" + type = "equals" + value = "python" } notes = "Optional additional info on why this check is run or how to fix it" } diff --git a/docs/resources/check_tag_defined.md b/docs/resources/check_tag_defined.md index e397dca0..6e49faf7 100644 --- a/docs/resources/check_tag_defined.md +++ b/docs/resources/check_tag_defined.md @@ -39,18 +39,18 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_tag_defined" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id - tag_key = "environment" + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id + tag_key = "environment" tag_predicate { - type = "contains" - value = "dev" + type = "contains" + value = "dev" } notes = "Optional additional info on why this check is run or how to fix it" } diff --git a/docs/resources/check_tool_usage.md b/docs/resources/check_tool_usage.md index ccee5edb..1833df5d 100644 --- a/docs/resources/check_tool_usage.md +++ b/docs/resources/check_tool_usage.md @@ -39,21 +39,21 @@ data "opslevel_filter" "tier1" { } resource "opslevel_check_tool_usage" "example" { - name = "foo" + name = "foo" enabled = true # To set a future enable date remove field 'enabled' and use 'enable_on' # enable_on = "2022-05-23T14:14:18.782000Z" - category = data.opslevel_rubric_category.security.id - level = data.opslevel_rubric_level.bronze.id - owner = data.opslevel_team.devs.id - filter = data.opslevel_filter.tier1.id + category = data.opslevel_rubric_category.security.id + level = data.opslevel_rubric_level.bronze.id + owner = data.opslevel_team.devs.id + filter = data.opslevel_filter.tier1.id tool_category = "metrics" tool_name_predicate { - type = "equals" + type = "equals" value = "datadog" } environment_predicate { - type = "equals" + type = "equals" value = "production" } notes = "Optional additional info on why this check is run or how to fix it" diff --git a/docs/resources/domain.md b/docs/resources/domain.md index c0170faa..e18cea1a 100644 --- a/docs/resources/domain.md +++ b/docs/resources/domain.md @@ -18,10 +18,10 @@ data "opslevel_team" "devs" { } resource "opslevel_domain" "example" { - name = "Example" + name = "Example" description = "The whole app in one monolith" - owner = data.opslevel_team.devs.id // or .alias - note = "This is an example" + owner = data.opslevel_team.devs.id // or .alias + note = "This is an example" } ``` diff --git a/docs/resources/filter.md b/docs/resources/filter.md index 7b22ade0..9ab42ee9 100644 --- a/docs/resources/filter.md +++ b/docs/resources/filter.md @@ -16,8 +16,8 @@ Manages a filter resource "opslevel_filter" "tier1" { name = "foo" predicate { - key = "tier_index" - type = "equals" + key = "tier_index" + type = "equals" value = "1" } connective = "and" @@ -26,13 +26,13 @@ resource "opslevel_filter" "tier1" { resource "opslevel_filter" "tier2_alpha" { name = "foo" predicate { - key = "tier_index" - type = "equals" + key = "tier_index" + type = "equals" value = "1" } predicate { - key = "lifecycle_index" - type = "equals" + key = "lifecycle_index" + type = "equals" value = "1" } connective = "and" diff --git a/docs/resources/group.md b/docs/resources/group.md index e565d08c..6ba451d2 100644 --- a/docs/resources/group.md +++ b/docs/resources/group.md @@ -14,18 +14,18 @@ Manages a group ```terraform resource "opslevel_group" "foo" { - name = "foo" + name = "foo" description = "foo group" - members = ["foo@example.com"] - teams = ["foo-team"] + members = ["foo@example.com"] + teams = ["foo-team"] } resource "opslevel_group" "bar" { - name = "bar" + name = "bar" description = "bar group" - members = ["bar@example.com"] - parent = opslevel_group.foo.alias - teams = ["bar-team"] + members = ["bar@example.com"] + parent = opslevel_group.foo.alias + teams = ["bar-team"] } ``` diff --git a/docs/resources/infrastructure.md b/docs/resources/infrastructure.md index 9b9a06fb..27e64cd5 100644 --- a/docs/resources/infrastructure.md +++ b/docs/resources/infrastructure.md @@ -14,48 +14,49 @@ Manages an infrastructure resource ```terraform data "opslevel_group" "foo" { - identifier = "foo" + identifier = "foo" } // Minimum example resource "opslevel_infrastructure" "example_1" { - schema = "Database" - provider_data { - account = "dev" - } - data = jsonencode({ - name = "my-database" - }) + schema = "Database" + provider_data { + account = "dev" + } + data = jsonencode({ + name = "my-database" + }) } // Detailed example resource "opslevel_infrastructure" "example_2" { - schema = "Database" - owner = data.opslevel_group.devs.id - provider_data { - account = "dev" - name = "google cloud" - type = "BigQuery" - url = "https://console.cloud.google.com/..." + schema = "Database" + owner = data.opslevel_group.foo.id + provider_data { + account = "dev" + name = "google cloud" + type = "BigQuery" + url = "https://console.cloud.google.com/..." + } + data = jsonencode({ + name = "big-query" + external_id = "example_2_1234" + zone = "us-east-1" + engine = "bigquery" + engine_version = "1.28.0" + endpoint = "https://console.cloud.google.com/..." + replica = false + publicly_accessible = false + storage_size = { + unit = "GB" + value = 700 + } + storage_type = "gp3" + storage_iops = { + unit = "per second" + value = 12000 } - data = jsonencode({ - name = "big-query" - zone = "us-east-1" - engine = "bigquery" - engine_version = "1.28.0" - endpoint = "https://console.cloud.google.com/..." - replica = false - publicly_accessible = false - storage_size = { - unit = "GB" - value = 700 - } - storage_type = "gp3" - storage_iops = { - unit = "per second" - value = 12000 - } - }) + }) } ``` diff --git a/docs/resources/integration_aws.md b/docs/resources/integration_aws.md index 65134698..44441a49 100644 --- a/docs/resources/integration_aws.md +++ b/docs/resources/integration_aws.md @@ -14,8 +14,8 @@ Manages a AWS Integration ```terraform resource "random_string" "external_id" { - length = 16 - special = false + length = 16 + special = false } resource "aws_iam_policy" "opslevel" { @@ -25,7 +25,7 @@ resource "aws_iam_policy" "opslevel" { Version = "2012-10-17" Statement = [ { - Action = [ + Action = [ "autoscaling:Describe*", "cloudfront:GetDistribution", "cloudfront:ListDistributions", @@ -94,7 +94,7 @@ resource "aws_iam_role" "opslevel" { Sid = "" Principal = { Service = "ec2.amazonaws.com", - AWS = "arn:aws:iam::746108190720:user/opslevel-integration", + AWS = "arn:aws:iam::746108190720:user/opslevel-integration", } Condition = { StringEquals = { @@ -107,11 +107,11 @@ resource "aws_iam_role" "opslevel" { } resource "opslevel_integration_aws" "dev" { - name = "dev" - iam_role = aws_iam_role.opslevel.arn - external_id = random_string.external_id.result + name = "dev" + iam_role = aws_iam_role.opslevel.arn + external_id = random_string.external_id.result ownership_tag_overrides = true - ownership_tag_keys = ["owner", "team", "group"] + ownership_tag_keys = ["owner", "team", "group"] } ``` diff --git a/docs/resources/repository.md b/docs/resources/repository.md index d02795cb..a44f1888 100644 --- a/docs/resources/repository.md +++ b/docs/resources/repository.md @@ -14,12 +14,12 @@ Manages the ownership of a repository but does not create or delete the reposito ```terraform data "opslevel_team" "devs" { - alias = "developers" + alias = "developers" } resource "opslevel_repository" "repo" { - identifier = "github.com:rocktavious/autopilot" - owner = data.opslevel_team.devs.id + identifier = "github.com:rocktavious/autopilot" + owner = data.opslevel_team.devs.id } ``` diff --git a/docs/resources/rubric_level.md b/docs/resources/rubric_level.md index 50401a20..33eeb6ce 100644 --- a/docs/resources/rubric_level.md +++ b/docs/resources/rubric_level.md @@ -14,9 +14,9 @@ Manages a rubric level ```terraform resource "opslevel_rubric_level" "example" { - name = "foo" + name = "foo" description = "foo level" - index = 2 + index = 2 } output "level" { diff --git a/docs/resources/scorecard.md b/docs/resources/scorecard.md index cb3b3cbc..c481d335 100644 --- a/docs/resources/scorecard.md +++ b/docs/resources/scorecard.md @@ -25,17 +25,17 @@ data "opslevel_filter" "tier_1" { } resource "opslevel_scorecard" "my_scorecard" { - name = "My Scorecard" - description = "This is my example scorecard" - ownerId = data.opslevel_team.devs.id - filterId = data.opslevel_filter.tier_1.id + name = "My Scorecard" + description = "This is my example scorecard" + ownerId = data.opslevel_team.devs.id + filterId = data.opslevel_filter.tier_1.id } // Example of how to assign a check to a scorecard resource "opslevel_check_manual" "my_check" { - name = "My check that uses a scorecard" - category = resource.opslevel_scorecard.my_scorecard.id - ... + name = "My check that uses a scorecard" + category = resource.opslevel_scorecard.my_scorecard.id + # ... } ``` diff --git a/docs/resources/secret.md b/docs/resources/secret.md new file mode 100644 index 00000000..45035e7a --- /dev/null +++ b/docs/resources/secret.md @@ -0,0 +1,58 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "opslevel_secret Resource - terraform-provider-opslevel" +subcategory: "" +description: |- + Manages a secret +--- + +# opslevel_secret (Resource) + +Manages a secret + +## Example Usage + +```terraform +data "opslevel_team" "devs" { + alias = "devs" +} + +resource "opslevel_secret" "my_secret" { + alias = "secret-alias" + owner = data.opslevel_team.devs.id + value = "too_many_passwords" +} + +resource "opslevel_secret" "my_secret_2" { + alias = "secret-alias-2" + owner = "devs" + value = "0sd09wer0sdlkjwer90wer098sdfsewr" +} +``` + + +## Schema + +### Required + +- `alias` (String) The alias for this secret. +- `owner` (String) The owner of this secret. +- `value` (String, Sensitive) A sensitive value. + +### Optional + +- `last_updated` (String) + +### Read-Only + +- `created_at` (String) Timestamp of time created at. +- `id` (String) The ID of this resource. +- `updated_at` (String) Timestamp of last update. + +## Import + +Import is supported using the following syntax: + +```shell +terraform import opslevel_secret.my_secret Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS82MDI0 +``` diff --git a/docs/resources/service.md b/docs/resources/service.md index 568b6b84..84b9f177 100644 --- a/docs/resources/service.md +++ b/docs/resources/service.md @@ -14,24 +14,24 @@ Manages a service ```terraform data "opslevel_lifecycle" "beta" { - filter { - field = "alias" - value = "beta" - } + filter { + field = "alias" + value = "beta" + } } data "opslevel_tier" "tier3" { - filter { - field = "index" - value = "3" - } + filter { + field = "index" + value = "3" + } } resource "opslevel_team" "foo" { - name = "foo" - manager_email = "john.doe@example.com" + name = "foo" + manager_email = "john.doe@example.com" responsibilities = "Responsible for foo frontend and backend" - aliases = ["bar", "baz"] + aliases = ["bar", "baz"] } resource "opslevel_service" "foo" { @@ -42,14 +42,14 @@ resource "opslevel_service" "foo" { language = "ruby" lifecycle_alias = data.opslevel_lifecycle.beta.alias - tier_alias = data.opslevel_tier.tier3.alias - owner_alias = opslevel_team.foo.alias + tier_alias = data.opslevel_tier.tier3.alias + owner_alias = opslevel_team.foo.alias - api_document_path = "/swagger.json" + api_document_path = "/swagger.json" preferred_api_document_source = "PULL" //or "PUSH" aliases = ["bar", "baz"] - tags = ["foo:bar"] + tags = ["foo:bar"] } output "foo_aliases" { diff --git a/docs/resources/service_dependency.md b/docs/resources/service_dependency.md index e1eb848c..e7bd99a8 100644 --- a/docs/resources/service_dependency.md +++ b/docs/resources/service_dependency.md @@ -22,9 +22,9 @@ data "opslevel_service" "bar" { } resource "opslevel_service_dependency" "example" { - service = data.opslevel_service.foo.alias + service = data.opslevel_service.foo.alias depends_on = data.opslevel_service.bar.alias - note = <<-EOT + note = <<-EOT This is an example of notes on a service dependency EOT } diff --git a/docs/resources/service_repository.md b/docs/resources/service_repository.md index c8aecf8f..08850129 100644 --- a/docs/resources/service_repository.md +++ b/docs/resources/service_repository.md @@ -22,18 +22,18 @@ data "opslevel_repository" "foo" { } resource "opslevel_service_repository" "foo" { - service = data.opslevel_service.foo.id + service = data.opslevel_service.foo.id repository = data.opslevel_repository.foo.id - name = "Foo" + name = "Foo" base_directory = "/" } resource "opslevel_service_repository" "bar" { - service_alias = "bar" + service_alias = "bar" repository_alias = "github.com:example/bar" - name = "Bar" + name = "Bar" base_directory = "/" } ``` diff --git a/docs/resources/service_tag.md b/docs/resources/service_tag.md index b8c26f31..9b47deed 100644 --- a/docs/resources/service_tag.md +++ b/docs/resources/service_tag.md @@ -20,14 +20,14 @@ data "opslevel_service" "foo" { resource "opslevel_service_tag" "foo_environment" { service = data.opslevel_service.foo.id - key = "environment" + key = "environment" value = "production" } resource "opslevel_service_tool" "bar_environment" { service_alias = "bar" - key = "environment" + key = "environment" value = "production" } ``` diff --git a/docs/resources/service_tool.md b/docs/resources/service_tool.md index e2dd3929..331f21d6 100644 --- a/docs/resources/service_tool.md +++ b/docs/resources/service_tool.md @@ -20,18 +20,18 @@ data "opslevel_service" "foo" { resource "opslevel_service_tool" "foo_datadog" { service = data.opslevel_service.foo.id - name = "Datadog" - category = "metrics" - url = "https://datadoghq.com" + name = "Datadog" + category = "metrics" + url = "https://datadoghq.com" environment = "Production" } resource "opslevel_service_tool" "bar_datadog" { service_alias = "bar" - name = "Datadog" - category = "metrics" - url = "https://datadoghq.com" + name = "Datadog" + category = "metrics" + url = "https://datadoghq.com" environment = "Production" } ``` diff --git a/docs/resources/system.md b/docs/resources/system.md index 9c57a7c6..8f8e9681 100644 --- a/docs/resources/system.md +++ b/docs/resources/system.md @@ -18,18 +18,18 @@ data "opslevel_team" "devs" { } resource "opslevel_domain" "example" { - name = "Example" + name = "Example" description = "The whole app in one monolith" - owner = data.opslevel_team.devs.id - note = "This is an example" + owner = data.opslevel_team.devs.id + note = "This is an example" } resource "opslevel_system" "example" { - name = "Example" + name = "Example" description = "The async processing system for the monolith" - owner = data.opslevel_team.devs.id - domain = opslevel_domain.example.id // or .aliases[0] - note = "This is another example" + owner = data.opslevel_team.devs.id + domain = opslevel_domain.example.id // or .aliases[0] + note = "This is another example" } ``` diff --git a/docs/resources/team.md b/docs/resources/team.md index bcae82dc..5f652773 100644 --- a/docs/resources/team.md +++ b/docs/resources/team.md @@ -18,12 +18,12 @@ data "opslevel_group" "foo" { } resource "opslevel_team" "example" { - name = "foo" - manager_email = "john.doe@example.com" - members = ["john.doe@example.com", "jane.doe@example.com"] + name = "foo" + manager_email = "john.doe@example.com" + members = ["john.doe@example.com", "jane.doe@example.com"] responsibilities = "Responsible for foo frontend and backend" - aliases = ["bar", "baz"] - group = data.opslevel_group.foo.alias + aliases = ["bar", "baz"] + group = data.opslevel_group.foo.alias } output "team" { diff --git a/docs/resources/team_tag.md b/docs/resources/team_tag.md index efa3810d..86cf3a27 100644 --- a/docs/resources/team_tag.md +++ b/docs/resources/team_tag.md @@ -20,14 +20,14 @@ data "opslevel_team" "foo" { resource "opslevel_team_tag" "foo_environment" { team = data.opslevel_team.foo.id - key = "type" + key = "type" value = "frontend" } resource "opslevel_team_tag" "bar_environment" { team_alias = "bar" - key = "type" + key = "type" value = "frontend" } ``` diff --git a/docs/resources/trigger_definition.md b/docs/resources/trigger_definition.md index 7cdd862e..7adbf54f 100644 --- a/docs/resources/trigger_definition.md +++ b/docs/resources/trigger_definition.md @@ -14,7 +14,7 @@ Manages a webhook action ```terraform data "opslevel_team" "platform" { - alias = "platform" + alias = "platform" } data "opslevel_filter" "tier_1" { @@ -25,15 +25,15 @@ data "opslevel_filter" "tier_1" { } resource "opslevel_webhook_action" "example" { - name = "Page The On Call" + name = "Page The On Call" description = "Pages the On Call" - url = "https://api.pagerduty.com/incidents" - method = "POST" + url = "https://api.pagerduty.com/incidents" + method = "POST" headers = { - content-type = "application/json" - accept = "application/vnd.pagerduty+json;version=2" + content-type = "application/json" + accept = "application/vnd.pagerduty+json;version=2" authorization = "Token token=XXXXXXXXXXXXX" - from = "john@opslevel.com" + from = "john@opslevel.com" } payload = <= 200 and response.status < 300 %} ## Congratulations! Your request for {{ service.name }} has succeeded. See the incident here: {{response.body.incident.html_url}} @@ -104,6 +105,7 @@ Please contact [{{ action_owner.name }}]({{ action_owner.href }}) for more help. - `description` (String) The description of what the Trigger Definition will do. - `entity_type` (String) The entity type to associate with the Trigger Definition. +- `extended_team_access` (List of String) The set of additional teams who can invoke this Trigger Definition. - `filter` (String) A filter defining which services this Trigger Definition applies to. - `manual_inputs_definition` (String) The YAML definition of any custom inputs for this Trigger Definition. - `published` (Boolean) The published state of the Custom Action; true if the Trigger Definition is ready for use; false if it is a draft. Defaults to false. diff --git a/docs/resources/webhook_action.md b/docs/resources/webhook_action.md index db0e85df..09a7c571 100644 --- a/docs/resources/webhook_action.md +++ b/docs/resources/webhook_action.md @@ -14,15 +14,15 @@ Manages a webhook action ```terraform resource "opslevel_webhook_action" "example" { - name = "Page The On Call" + name = "Page The On Call" description = "Pages the On Call" - url = "https://api.pagerduty.com/incidents" - method = "POST" + url = "https://api.pagerduty.com/incidents" + method = "POST" headers = { - content-type = "application/json" - accept = "application/vnd.pagerduty+json;version=2" + content-type = "application/json" + accept = "application/vnd.pagerduty+json;version=2" authorization = "Token token=XXXXXXXXXXXXXX" - from = "john@opslevel.com" + from = "john@opslevel.com" } payload = <