validate bundle, use pathexpand in cloud function modules (#2360)
This commit is contained in:
committed by
GitHub
parent
cb5b36906c
commit
ea5e6dedc9
@@ -48,6 +48,18 @@ variable "bundle_config" {
|
||||
excludes = optional(list(string))
|
||||
output_path = optional(string)
|
||||
})
|
||||
validation {
|
||||
condition = (
|
||||
var.bundle_config.path != null && (
|
||||
(
|
||||
try(fileexists(pathexpand(var.bundle_config.path)), null) != null &&
|
||||
endswith(var.bundle_config.path, ".zip")
|
||||
) ||
|
||||
length(fileset(pathexpand(var.bundle_config.path), "**/*")) > 0
|
||||
)
|
||||
)
|
||||
error_message = "Bundle path must be set to a local folder or zip file."
|
||||
}
|
||||
}
|
||||
|
||||
variable "description" {
|
||||
|
||||
Reference in New Issue
Block a user