Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ CxPolicy[result] {

path := checkPath(resource)

not common_lib.valid_key(path.port, "host_port")
common_lib.valid_key(path.port, "host_port")
result := {
"documentId": input.document[i].id,
"resourceType": x,
"resourceName": tf_lib.get_resource_name(resource, name),
"searchKey": sprintf("%s[%s].%s.port", [x, name, resource_prefix]),
"issueType": "IncorrectValue",
"keyExpectedValue": "Attribute 'host_port' should be defined and not null",
"keyActualValue": "Attribute 'host_port' is undefined or null",
"keyExpectedValue": "Attribute 'host_port' should not be defined",
"keyActualValue": "Attribute 'host_port' is defined",
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ resource "kubernetes_pod" "test" {

port {
container_port = 8080
host_port = 2
}

liveness_probe {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ resource "kubernetes_deployment" "example" {
}
port {
container_port = 8080
host_port = 2
}

liveness_probe {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ resource "kubernetes_pod" "test" {

port {
container_port = 8080
host_port = 2
}

liveness_probe {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ resource "kubernetes_deployment" "example" {
}
port {
container_port = 8080
host_port = 2
}

liveness_probe {
Expand Down
Loading