Giter VIP home page Giter VIP logo

Comments (13)

peimanja avatar peimanja commented on August 15, 2024 12

I know terraform 0.12.0 just released today but is there any timeline on releasing compatible version?

from terraform-provider-consul.

remilapeyre avatar remilapeyre commented on August 15, 2024 4

The Terraform 0.12 finally happened with the v2.5.0 release :)

from terraform-provider-consul.

remilapeyre avatar remilapeyre commented on August 15, 2024 2

Hi @EliaSaSe, the work to make this provider work with Terraform 0.12 has been done in the terraform-0.12 branch (https://github.com/terraform-providers/terraform-provider-consul/tree/terraform-0.12) and it is currently working. The release come shortly.

In the meantime, it is possible to copy the resulting artifact of make to the Terraform plugin folder (https://www.terraform.io/docs/configuration/providers.html#third-party-plugins) and you should be able to use it.

from terraform-provider-consul.

remilapeyre avatar remilapeyre commented on August 15, 2024

Hi @igordavid, thanks for opening this issue.

Are there any plans to release Consul provider which will be working with Terraform 0.12, and if so is there any timeline?

Absolutely! The Consul plugin should work with Terraform 0.12. I did not test it thought, the release date of Terraform 0.12 has not been announced as far as I know.

I don't know yet how much changes are needed but I don't expect it to be a lot.

I will use this issue to track progress of the Terraform 0.12 compatibility.

from terraform-provider-consul.

EliaSaSe avatar EliaSaSe commented on August 15, 2024

Hi @remilapeyre

I'm currently testing terraform 0.12 rc1. But I can't upgrade because this plugin has no 0.12 support for now. What is the progress with the 0.12 compatibility? Will be there an update for this plugin before 0.12 releases?

provider "consul" { [...] }
> terraform --version
Terraform v0.12.0-rc1
[...]
> terraform init
No available provider "consul" plugins are compatible with this Terraform version.

From time to time, new Terraform major releases can change the requirements for
plugins such that older plugins become incompatible.

Terraform checked all of the plugin versions matching the given constraint:
    (any version)

Unfortunately, none of the suitable versions are compatible with this version
of Terraform. If you have recently upgraded Terraform, it may be necessary to
move to a newer major release of this provider. Alternatively, if you are
attempting to upgrade the provider to a new major version you may need to
also upgrade Terraform to support the new version.

Consult the documentation for this provider for more information on
compatibility between provider versions and Terraform versions.


Error: no available version is compatible with this version of Terraform

Best regards,
Elia

from terraform-provider-consul.

EliaSaSe avatar EliaSaSe commented on August 15, 2024

@remilapeyre Ohh, I missed that branch. Thank you for the update. I will build my own plugin from this branch, until the release is available.

from terraform-provider-consul.

seans11 avatar seans11 commented on August 15, 2024

Hi @EliaSaSe, the work to make this provider work with Terraform 0.12 has been done in the terraform-0.12 branch (https://github.com/terraform-providers/terraform-provider-consul/tree/terraform-0.12) and it is currently working. The release come shortly.

In the meantime, it is possible to copy the resulting artifact of make to the Terraform plugin folder (https://www.terraform.io/docs/configuration/providers.html#third-party-plugins) and you should be able to use it.

I attempted to compile the latest terraform-provider-consul from the terraform 0.12 branch as recommended, but was unable to get it working.

I placed the plugin binary terraform-provider-consul in ~/.terraform.d/plugins and tried to run terraform again, but terraform does not appear to be using it. I tried specify a version = "> 2.3.0" in the consul provider statement, but that didn't correct the problem either. After running an init and plan I check the provider cache directories (.terraform and ~/.terraform.d/plugin-cache) and no consul provider is found while other providers are there.

The error I'm receiving is:
Error: Failed to instantiate provider "consul" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5]

Anyone have thoughts on how I might get this working?

from terraform-provider-consul.

remilapeyre avatar remilapeyre commented on August 15, 2024

Hi @seans11 . I don't think you need to specify a versin. Did you ran terraform init after adding the binary to to ~/.terraform.d/plugins?

from terraform-provider-consul.

seans11 avatar seans11 commented on August 15, 2024

Hi @seans11 . I don't think you need to specify a versin. Did you ran terraform init after adding the binary to to ~/.terraform.d/plugins?

I did run a terraform init and the following was the response I got back:

> terraform init
Initializing modules...
- module.base

Initializing provider plugins...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.12"
* provider.consul: version = "~> 6.0"
* provider.external: version = "~> 1.1"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

I deleted the entire .terraform directory and started fresh and I can now see the consul provider listed with the other providers, and it shows version 6.0.0 (I named the plugin terraform-provider-consul_v6.0.0_x4 to validate it was seeing the version of consul i compiled).

When I run terraform providers using the version = statement for my consul provider this is what I get:

> terraform providers
.
├── provider.aws
├── provider.consul > 2.3.0
└── module.base
    ├── provider.aws (inherited)
    └── provider.external

I did try removing the version = argument and I still receive the same error when running terraform plan

Error: Failed to instantiate provider "consul" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5]

from terraform-provider-consul.

remilapeyre avatar remilapeyre commented on August 15, 2024

The version should be provider.consul (unversioned). Did you try to run rm -rf .terraform && terraform init when the version = statement was not in the consul provider?

from terraform-provider-consul.

seans11 avatar seans11 commented on August 15, 2024

The version should be provider.consul (unversioned). Did you try to run rm -rf .terraform && terraform init when the version = statement was not in the consul provider?

I renamed the plugin to terraform-provider-consul
I removed the provider statement version=
I removed the .terraform directory
I ran terraform init

This is what it returned this time:

> terraform init
Initializing modules...
- module.base
  Getting source "../global/modules/base"

Initializing provider plugins...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.12"
* provider.external: version = "~> 1.1"

Terraform has been successfully initialized!

Now it doesn't show the consul provider. Additionally I'm still receiving the "Failed to instantiate provider" error.

from terraform-provider-consul.

Lasering avatar Lasering commented on August 15, 2024

If you use the code at the terraform-0.12 branch and change the file go.mod to use terraform 0.12 instead of terraform v0.12.0-alpha4.0.20190424121927-9327eedb0417. It works.

So a release should be very easy 😉

from terraform-provider-consul.

remilapeyre avatar remilapeyre commented on August 15, 2024

Thanks, we are in the process of releasing the bug fixes and new features we had and should do the release for Terraform 0.12 shortly after.

from terraform-provider-consul.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.