Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error getting plugins: module "container_linux": missing required argument "version" #16859

Closed
MilenkoMarkovic opened this issue Dec 6, 2017 · 9 comments
Labels

Comments

@MilenkoMarkovic
Copy link

MilenkoMarkovic commented Dec 6, 2017

Terraform Version

Terraform v0.11.1
+ provider.archive v1.0.0
+ provider.external v1.0.0
+ provider.ignition v0.1.0
+ provider.local v1.0.0
+ provider.null v1.0.0
+ provider.random v1.0.0
+ provider.template v1.0.0
+ provider.tls v1.0.0

Terraform Configuration Files

...

Debug Output

Crash Output

Expected Behavior

Actual Behavior

I am trying to install tectonic, terraform is the prerequisite. I am on Ubuntu 16.04
$ terraform init ./platforms/metal
Initializing modules...
- module.container_linux
- module.ignition_masters
- module.ignition_workers
- module.kube_certs
- module.etcd_certs
- module.ingress_certs
- module.identity_certs
- module.bootkube
- module.tectonic
- module.flannel_vxlan
- module.calico
- module.canal
Error getting plugins: module "container_linux": missing required argument "version"

Steps to Reproduce

Important Factoids

References

@apparentlymart
Copy link
Contributor

Hi @MilenkoM! Sorry for this error.

Unfortunately as of Terraform 0.11.0 the name version is reserved inside module blocks to represent the Terraform module version when installing from a module registry. It looks like Tectonic is using this name for an input variable for a module, which is no longer possible in 0.11.0.

Until Tectonic is updated to address this naming conflict, I think it will be necessary to use Terraform 0.10.8, which is the newest release where version is not a reserved name within module blocks.

@apparentlymart
Copy link
Contributor

It looks like this has now been addressed in coreos/tectonic-installer#2471, with this module now using release_version instead of just version as the name for this input variable.

@wwwy3y3
Copy link

wwwy3y3 commented Dec 28, 2017

IMO, throwing a "reserved_word" error would be nice.

In my projects, I've been using version a lot in module, like this

variable "version" {
  description = "The application version"
  default     = "latest"
}

and it took me a while to find out that this variable always come out with the default value, which causes me some trouble

@apparentlymart what do you think we throw an error here?

@stormsilver
Copy link

I just ran into this exact same error in a module I am writing. Thank goodness this issue was here to tell me I simply need to rename my variable. I think a "reserved word" error would be wonderful, as the current wording is quite misleading.

@adamrbennett
Copy link

We also use version as an input variable in many modules. Disappointed to see such a generic reserved word introduced.

@bencromwell
Copy link

+1 on calls for a more specific error message.

Instead of:

Error getting plugins: module "foo": missing required argument "version"

It could be:

Error getting plugins: module "foo": uses reserved keyword "version" for a variable. Please change this to something else.

@mgarstecki
Copy link

I just tripped on this too while upgrading to TF 0.11.

I think this should to be documented in the upgrade guide (https://www.terraform.io/upgrade-guides/0-11.html), along with other breaking changes listed in the CHANGELOG (https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md#0110-november-16-2017).

@charles-d-burton
Copy link

I think the error terraform throws should indicate that it's a reserved keyword too now. The error is extremely misleading.

@ghost
Copy link

ghost commented Apr 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants