I want to introduce a simple timestamp to my ec2 instance names
tags = {
"Name" = "windows server 2012 ${var.env} - ${formatdate("YYYYMMDD", timestamp())}"
}
However when I run terraform validate
,
I got this
Error: aws_instance.convertor: 1 error(s) occurred:
* aws_instance.convertor: 1:33: unknown function called: formatdate in:
windows server 2012 ${var.env} - ${formatdate("YYYYMMDD", timestamp())}
Apparently formatdate is not available in my version of terraform (v0.11.7). How can I achieve the same result in HCL of 0.11.7?