Open
Description
Terraform Version
Terraform v1.11.3
on windows_amd64
Terraform Configuration Files
Available here as a complete config: https://github.com/Invicton-Labs/terraform-aws-plantimestamp-error
variables.tf
variable "myvar" {
type = string
nullable = false
}
tests/main.tftest.hcl
# This one works fine
run "timestamp" {
command = plan
variables {
myvar = timestamp()
}
}
# This one does not
run "plantimestamp" {
command = plan
variables {
# This function really should exist:
# https://developer.hashicorp.com/terraform/language/functions/plantimestamp
myvar = plantimestamp()
}
}
Debug Output
https://gist.github.com/KyleKotowick/cd54de2a28bc33326cdc6aa356163220
Expected Behavior
This function should work in tests, it certainly does exist:
https://developer.hashicorp.com/terraform/language/functions/plantimestamp
Actual Behavior
│ Error: Call to unknown function
│
│ on tests\main.tftest.hcl line 15, in run "plantimestamp":
│ 15: myvar = plantimestamp()
│
│ There is no function named "plantimestamp".
This function apparently doesn't exist for tests.
Steps to Reproduce
terraform test
Additional Context
No response
References
No response
Generative AI / LLM assisted development?
No response