Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_package_version added, base variables for checks #13

Merged
merged 6 commits into from
Sep 11, 2024

Conversation

davidbloss
Copy link
Contributor

No description provided.

@davidbloss davidbloss marked this pull request as ready for review September 10, 2024 20:41
@@ -0,0 +1,44 @@
variable "category" {
type = string
description = "The id of the category the check belongs to."
Copy link
Contributor

@rocktavious rocktavious Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So one thing we are losing here is the ability to use the categoryName since they don't have aliases. The stuff I was doing in modules/check/rubric.tf allowed you to do

module "check" {
  source = "./modules/check"
  
  category = "Security"
  level = "Bronze"
}

With the way it is now you have to do ( reference an existing datasource )

module "check" {
  source = "./modules/check"
  
  category = "Z2lkOi8v098sdf093sdf0dsf0987sdf90w"
  level = "Z2lkOi8vwerlkj987sdflkjwer9887sdf90wer"
}

Which is sub par and more verbose. We can move forward with this but thats the reason i had the locals with logic in modules/check/rubric.tf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohhh yes I see now. I'll bring back rubric.tf and make it work

@@ -0,0 +1,8 @@
data "opslevel_rubric_levels" "all" {}

data "opslevel_rubric_level" "greatest_level_by_index" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats this used for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it now over in OpsLevel/terraform-provider-opslevel#481

Does the test HCL files allow for us to put stuff like this in there? or is this used by more then just 1 test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used for testing downstream. But it should be removed here and pushed over into the test logic there

Copy link
Contributor

@rocktavious rocktavious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall its fine but we are losing some UX.

@davidbloss davidbloss merged commit c5196ff into main Sep 11, 2024
2 checks passed
@davidbloss davidbloss deleted the db/package-version-check branch September 11, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants