A quoted type name
Correct in 0.11 and an error since 0.12
variable "region" {
type = "string"
}Find the syntax that changed in 0.12, 0.13 and since. Some of it still works and will not forever; some of it a current Terraform refuses outright, with an error that does not mention the rename.
Or drop a file anywhere on this panel. Nothing is uploaded: the analysis runs in this tab.
The answer appears here
Paste on the left and press Check. Nothing leaves this tab.
Nothing else to flag.
No formatting problems, and nothing the rules object to. Worth remembering what that covers: this reads the file you pasted, not the account or cluster it will be applied to.
No finding matches that filter.
Real input you can load into the tool above. Each one shows a different thing going wrong, because that is what the tool is for.
Correct in 0.11 and an error since 0.12
variable "region" {
type = "string"
}The provider has no Apple Silicon build, so init fails on a recent Mac
data "template_file" "init" {
template = file("init.sh")
}Still works, and converts the result to a string on the way through
bucket = "${var.bucket_name}"These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.
list() and map() were removed in 0.12, and the error names an unknown function. People go looking for a provider that supplies it.
Instead:Use the literal syntax: ["a", "b"] and { a = "b" }.
It works and it converts the result to a string, so a number or a list becomes text and the type error appears far from the cause.
Instead:Write the expression bare: region = var.region.
The template provider has no darwin_arm64 build, so the configuration cannot init at all on a recent Mac. The failure arrives with a new laptop, not with a change to the code.
Instead:Use the built-in templatefile(path, vars) function. No provider needed.
That is what makes this category expensive: the message describes the symptom accurately and says nothing about the version the syntax came from.
type = "string" was correct in 0.11. From 0.12 the type is a keyword, and the quoted form has been rejected for several majors. It survives in modules nobody has needed to touch, and the fix is to remove the quotes and, for a collection, say what it holds: list(string).
They are still all over copied snippets. The error names an unknown function, which reads like a missing provider rather than a removed builtin. The literal forms are ["a", "b"] and { a = "b" }.
region = "${var.region}" still works, and it turns whatever the expression produced into a string. A number or a list silently becomes text and the type error appears somewhere else entirely. Write the expression bare.
The template provider is deprecated and has no darwin_arm64 build, so a configuration using it fails at init on any recent Mac. That is usually how a team discovers the deprecation. The built-in templatefile(path, vars) function needs no provider at all.
Deprecated since 0.13, and still accepted. When both are present the required_providers entry wins, so the line you are reading is not necessarily the one in force, and the two can disagree indefinitely.
terraform_data arrived in 1.4 and does the same job with no provider to download, lock or hash. null_resource still works; it is one more thing in your lock file for no benefit.