-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from OpsLevel/db/add-check-code-issue-module
add check code_issue module
- Loading branch information
Showing
5 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../base_variables.tf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
resource "opslevel_check_code_issue" "this" { | ||
constraint = var.constraint | ||
issue_name = var.issue_name | ||
issue_type = var.issue_type | ||
max_allowed = var.max_allowed | ||
resolution_time = var.resolution_time | ||
severity = var.severity | ||
|
||
# -- check base fields -- | ||
category = module.category.this | ||
enable_on = var.enable_on | ||
enabled = var.enabled | ||
filter = var.filter | ||
level = module.level.this | ||
name = var.name | ||
notes = var.notes | ||
owner = var.owner | ||
} | ||
|
||
module "category" { | ||
source = "../../rubric_category/data" | ||
rubric_category = var.category | ||
} | ||
|
||
module "level" { | ||
source = "../../rubric_level/data" | ||
rubric_level = var.level | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
output "this" { | ||
value = opslevel_check_code_issue.this | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
variable "constraint" { | ||
type = string | ||
description = "The type of constraint used in evaluation the code issues check." | ||
} | ||
|
||
variable "issue_name" { | ||
type = string | ||
description = "The issue name used for code issue lookup." | ||
default = null | ||
} | ||
|
||
variable "issue_type" { | ||
type = list(string) | ||
description = "The type of code issue to consider." | ||
default = null | ||
} | ||
|
||
variable "max_allowed" { | ||
type = number | ||
description = "The threshold count of code issues beyond which the check starts failing." | ||
default = null | ||
} | ||
|
||
variable "resolution_time" { | ||
type = object({ | ||
unit = string | ||
value = number | ||
}) | ||
description = "The resolution time recommended by the reporting source of the code issue." | ||
default = null | ||
} | ||
|
||
variable "severity" { | ||
type = list(string) | ||
description = "The severity levels of the issue." | ||
default = null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../versions.tf |