Skip to content

Commit

Permalink
Add instances for clamav
Browse files Browse the repository at this point in the history
  • Loading branch information
asteel-gsa committed Feb 27, 2024
1 parent 8696fec commit fa150ed
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ module "clamav" {
name = "my_clamav_name"
clamav_image = "ghcr.io/gsa-tts/clamav-rest/clamav:TAG_NAME"
max_file_size = "30M"
instances = 2
proxy_server = local.proxy_server # https proxy to reach database.clamav.net:443, if necessary
proxy_port = local.proxy_port
proxy_username = local.proxy_username
Expand Down
1 change: 1 addition & 0 deletions clamav/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource "cloudfoundry_app" "clamav_api" {
disk_quota = 2048
timeout = 600
strategy = "rolling"
instances = var.instances
docker_image = var.clamav_image
routes {
route = cloudfoundry_route.clamav_route.id
Expand Down
6 changes: 6 additions & 0 deletions clamav/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ variable "proxy_password" {
description = "password for proxy_server, eg a-password"
default = ""
}

variable "instances" {
type = number
description = "the number of instances that the clamav module should operate (default 1)"
default = 1
}
6 changes: 3 additions & 3 deletions semver/tests/default/default.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ locals {
# This test will break after we tag something higher than 1.0.0; fix and
# expand these tests then!
# https://github.com/npm/node-semver#tilde-ranges-123-12-1
greaterthan = "~0",
greaterthan = "~0",
}

latest_tag = trimprefix(jsondecode(data.http.latest_version.response_body).tag_name, "v")
Expand All @@ -41,8 +41,8 @@ resource "test_assertions" "greater-than-is-latest" {
component = "outputs"
equal "target_version" {
description = "greater than should always be the latest in the repo"
got = module.version["greaterthan"].target_version
want = local.latest_tag
got = module.version["greaterthan"].target_version
want = local.latest_tag
}
}

0 comments on commit fa150ed

Please sign in to comment.