fix tests
This commit is contained in:
parent
0ecc4b5e52
commit
4242cf3151
@ -5,6 +5,7 @@ variable "env_test" {
|
||||
}
|
||||
|
||||
locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }
|
||||
# The "legacy_isotime" function has been provided for backwards compatability, but we recommend switching to the timestamp and formatdate functions.
|
||||
|
||||
# 5 errors occurred upgrading the following block:
|
||||
# unhandled "lower" call:
|
||||
@ -33,7 +34,7 @@ locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }
|
||||
# Visit https://www.packer.io/docs/templates/hcl_templates/functions/string/upper for more infos.
|
||||
locals {
|
||||
build_timestamp = "${local.timestamp}"
|
||||
iso_datetime = "${local.timestamp}"
|
||||
iso_datetime = "${legacy_isotime("2006-01-02T15:04:05Z07:00")}"
|
||||
lower = "{{ lower `HELLO` }}"
|
||||
pwd = "${path.cwd}"
|
||||
replace = "{{ replace `b` `c` `ababa` 2 }}"
|
||||
|
@ -198,7 +198,7 @@ build {
|
||||
# Please manually upgrade to use custom validation rules, `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`
|
||||
# Visit https://packer.io/docs/templates/hcl_templates/variables#custom-validation-rules , https://www.packer.io/docs/templates/hcl_templates/functions/string/replace or https://www.packer.io/docs/templates/hcl_templates/functions/string/regex_replace for more infos.
|
||||
provisioner "shell" {
|
||||
inline = ["echo mybuild-{{ clean_resource_name `${local.timestamp}` }}"]
|
||||
inline = ["echo mybuild-{{ clean_resource_name `${timestamp()}` }}"]
|
||||
}
|
||||
|
||||
|
||||
|
@ -151,7 +151,7 @@ build {
|
||||
# Please manually upgrade to use custom validation rules, `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`
|
||||
# Visit https://packer.io/docs/templates/hcl_templates/variables#custom-validation-rules , https://www.packer.io/docs/templates/hcl_templates/functions/string/replace or https://www.packer.io/docs/templates/hcl_templates/functions/string/regex_replace for more infos.
|
||||
provisioner "shell" {
|
||||
inline = ["echo mybuild-{{ clean_resource_name `${local.timestamp}` }}"]
|
||||
inline = ["echo mybuild-{{ clean_resource_name `${timestamp()}` }}"]
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user