Skip to content

Commit

Permalink
explained how to add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
OmriGez committed Jan 30, 2025
1 parent 827ffd4 commit a0b8bf9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ make lint
**NOTE**: Should be installed with `make dev-setup`, if you prefer manually, have a look at the [installation guide](https://golangci-lint.run/welcome/install/#local-installation).


In addition, when changing documentation, run `make gen-docs`.
## Documentation

The resource examples are generated from the schema. This means that in order to update the examples, you will need to update the `ResourceMarkdownDescription` in the resource schema.go file.

In addition, when changing schema, run `make gen-docs`.

You can preview how the documentation will look in the Terraform registry with [this tool](https://registry.terraform.io/tools/doc-preview).

Expand Down
12 changes: 11 additions & 1 deletion port/scorecard/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ resource "port_scorecard" "readiness" {
` + "```" + `
## Example Usage with Levels
## Example Usage with Levels and Filter
This will override the default levels (Basic, Bronze, Silver, Gold) with the provided levels: Not Ready, Partially Ready, Ready.
Expand Down Expand Up @@ -295,6 +295,16 @@ resource "port_scorecard" "readiness" {
identifier = "Readiness"
title = "Readiness"
blueprint = port_blueprint.microservice.identifier
filter = {
combinator = "and"
conditions = [
jsonencode({
property = "sum"
operator = ">"
value = 0
})
]
}
levels = [
{
color = "red"
Expand Down

0 comments on commit a0b8bf9

Please sign in to comment.