Skip to content

Commit

Permalink
Show var value
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKotowick committed Sep 10, 2024
1 parent 9ccfc37 commit 585e543
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,16 @@ data "external" "create_file_chunk" {
working_dir = (jsonencode(var.dynamic_depends_on) != "" ? true : false) && ((var.force_wait_for_apply ? uuid() : "") == "") ? "${path.module}/tmpfiles" : "${path.module}/tmpfiles"
}

module "assert_delete_after" {
source = "Invicton-Labs/assertion/null"
version = "0.2.4"
condition = false
error_message = jsonencode(var.delete_after)
}

data "external" "delete_file" {
depends_on = [
module.assert_delete_after,
data.external.create_file_chunk,
]
program = local.is_windows ? ["powershell.exe", "${abspath(path.module)}/delete.ps1"] : [var.unix_interpreter, "${abspath(path.module)}/delete.sh"]
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ variable "delete_after" {
This is useful if you need to write out a temporary file that is used by other shell scripts, such as credential files.
EOF
type = any
type = list(any)
default = []
nullable = false
}

0 comments on commit 585e543

Please sign in to comment.