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

Provider versioning support #58

Closed
mairamaa opened this issue Jun 26, 2019 · 3 comments
Closed

Provider versioning support #58

mairamaa opened this issue Jun 26, 2019 · 3 comments

Comments

@mairamaa
Copy link

Terraform provides a way to constraint provider versions, but this requires plugin filename to end with version number in the format "_vx.y.z". Usage is explained in detail in https://www.terraform.io/docs/configuration/providers.html#plugin-names-and-versions. Feature can then be used within modules by applying constraints such as:

terraform {
 required_version > ">= 0.12"

 required_providers {
    aws = ">= 2.14.0"
 }
}

See https://www.terraform.io/docs/configuration/providers.html#version-provider-versions for more details

This is especially useful in cases where Terraform versions are upgraded within organizations and where custom providers require manual installations, as old plugin versions are not necessarily compatible with the new Terraform release.

Currently Kafka provider version is displayed as follows, which prevents usage of versioning constraint:

$ terraform version
Terraform v0.12.1
+ provider.aws v2.13.0
+ provider.kafka (unversioned)

Kindly requesting that versioning support is added as part of the provider

@Mongey
Copy link
Owner

Mongey commented Jul 18, 2019

👋 Hi @mairamaa , I don't think there's actually anything for me to do here. Last time I looked this is all about the filename of the provider, rather than embedding the information in the binary.

For instance ... if you have installed the provider at ~/.terraform.d/plugins/terraform-provider-kafka_v0.1.1 then terraform version will report back v0.1.1

terraform11 version
Terraform v0.11.14
+ provider.kafka v0.1.1

Given that I release the binary as terraform-provider-kafka_0.2.0_darwin_amd64.tar.gz I could update the release script to include the v before the version number, but I'm not sure that will actually help a whole bunch.

@mairamaa
Copy link
Author

mairamaa commented Aug 6, 2019

Hi and thanks for getting back to me.

Yeah, it's the filename that determines the "versioning". Wouldn't the correct place for the actual versioning information be in the binary that is compressed within the packaged versions? Currently the actual binaries are just named as "terraform-provider-kafka" if extracted directly. Could the release script be changed so that it adds the version information to the binary?

Mongey added a commit that referenced this issue Dec 30, 2019
* Build on Windows and ARM
* Include version in binary name

Fixes #58 & #76
Mongey added a commit that referenced this issue Dec 30, 2019
* Build on Windows and ARM
* Include version in binary name

Fixes #58 & #76
@Mongey Mongey closed this as completed in d2d9a45 Dec 30, 2019
@Mongey
Copy link
Owner

Mongey commented Dec 30, 2019

I've updated the release script to include the version in the binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants