Closed sunshinekitty closed 6 years ago
Currently having the same issue with terraform 0.11.0 and the 1.7.9-tectonic.2 release.
Same issue here too. Any updates?
Having the same issue here :(
Error getting plugins: module root: module container_linux: required variable "version" not set
Hi @sunshinekitty I tried reproducing this locally and found some very strange results that lead me to suspect there are some internal Terraform issues. Can you please go to your main infrastructure directory, where you ran
terraform init
and run:for d in .terraform/modules/*; do git --git-dir="$d"/.git describe --tags; done
and please post the result.
Edit:
After some more investigation, it looks like this issue is the result of new features that have been introduced in the new Terraform minor version 0.11.0. This version contains improved module support, with real support for pinning module versions using the version
directive, e.g.:
module "foo" {
source = "bar"
version = "baz"
}
Unfortunately, this directive clashes with a variable in the container_linux
module by the same name; Terraform is unable to handle variables and directives with the same name in a given module block, so the version
variable is never passed to the module.
The current workaround requires the following steps:
source = "github.com/coreos/terraform-aws-kubernetes?ref=1.7.9-tectonic.2"
This is needed because Terraform <0.11.x does not support specifying module versions, which is also why the version
variable will be correctly passed.
The next release will include a correct patch for this issue to fully support Terraform 0.11.x, which simply means the variable name has to be changed from version
to something else.
Using what's in examples/kubernetes.tf by itself I'm unable to
terraform init
with the following error: