diff options
| author | Patrick Spek <p.spek@tyil.nl> | 2025-12-28 02:34:30 +0100 |
|---|---|---|
| committer | Patrick Spek <p.spek@tyil.nl> | 2025-12-28 02:34:30 +0100 |
| commit | b067174006aa95656edfaa26839ada2de5242c0b (patch) | |
| tree | 0815516bbccc96bb82a95f8bd3ee7a2b1ffcbee2 | |
| parent | f74123273728bbcd5f2b75e5f712c67afdf022d9 (diff) | |
| download | kubernetes-container-b067174006aa95656edfaa26839ada2de5242c0b.tar.gz kubernetes-container-b067174006aa95656edfaa26839ada2de5242c0b.tar.bz2 | |
Set default for allow_privilege_escalation based on privileged
| -rw-r--r-- | deployment.tf | 2 | ||||
| -rw-r--r-- | main.tf | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/deployment.tf b/deployment.tf index 791ce85..0bb091d 100644 --- a/deployment.tf +++ b/deployment.tf @@ -84,7 +84,7 @@ resource "kubernetes_deployment_v1" "this" { image_pull_policy = try(var.pull_policy, contains(local.container_tags_pull_always, local.container_tag) ? "Always" : null, "IfNotPresent") security_context { - allow_privilege_escalation = var.allow_privilege_escalation + allow_privilege_escalation = coalesce(var.allow_privilege_escalation, var.privileged) privileged = var.privileged read_only_root_filesystem = var.ro_rootfs } @@ -54,7 +54,7 @@ variable "namespace" { variable "allow_privilege_escalation" { type = bool - default = false + default = null description = <<-EOF Allow privilege escalation of the container. Be wary of security risks when setting this to true. In Kubernetes manifests, this is equivalent to |
