Tuesday, April 5, 2022

Terraform: An argument or block definition is required here.

 

spec {
template {
spec {
hostAliases [
{
ip = "10.170.0.12"
hostnames = ["db2.dev.valuex.com","foo.dev.valuex.com"]
}
]
}
}
}


Error message:


│ On ../modules/mongo/cluster/main.tf line 171: An argument or block definition is required here. To set an argument, use the equals sign "=" to introduce

│ the argument value.


Correction:



spec {
template {
spec {
hostAliases = [
{
ip = "10.170.0.12"
hostnames = ["db2.dev.valuex.com","foo.dev.valuex.com"]
}
]
}
}
}

No comments:

Post a Comment