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

Module installer doesn't honor explicit build metadata in version constraint #20814

Closed
strixBE opened this issue Mar 25, 2019 · 3 comments
Closed

Comments

@strixBE
Copy link

strixBE commented Mar 25, 2019

Terraform Version

Terraform v0.11.13

Terraform Configuration Files

module "aks" {
  source  = "adfinis-forks/aks/azurerm"
  version = "=0.9.0+1.4970527"

  CLIENT_ID     = "testtest"
  CLIENT_SECRET = "testtest"
}

Debug Output

https://gist.github.com/MrStrix/2d3991857fb3363d150ea5fb70172c41

Expected Behavior

Terraform should pull the correct version as specified. (version 0.9.0+1.4970527). It should also pull the latest release (e.g. the release with the highest version number which would be 0.9.0+1.4970527 at the time of writing) when specifying a constraint like version = ">=0.9.0".

Actual Behavior

Terraform pulls a seemingly random version of the module (version 0.9.0+0.6babc9f)

Steps to Reproduce

  1. Create main.tf like described above
  2. run terraform init

Additional Context

The module is in the registry: https://registry.terraform.io/modules/adfinis-forks/aks/azurerm/0.9.0
and the releases are on github: https://github.com/adfinis-forks/terraform-azurerm-aks/releases

@apparentlymart apparentlymart changed the title Wrong version of module pulled in Module installer doesn't honor explicit build metadata in version constraint Mar 25, 2019
@nlee737
Copy link

nlee737 commented May 28, 2019

Looks like this is due to metadata not being checked during version comparison: go-version/version.go:128.

@pselle
Copy link
Contributor

pselle commented Aug 9, 2019

This was closed by #21640

@pselle pselle closed this as completed Aug 9, 2019
@ghost
Copy link

ghost commented Sep 9, 2019

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 Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants