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

Incompatible API version with plugin. Plugin version: 6, Client versions: [5] #1761

Closed
frankpengau opened this issue Aug 3, 2023 · 15 comments
Labels

Comments

@frankpengau
Copy link

When trying to use the following command:

terraformer import cloudflare --resources=*

or

terraformer import cloudflare --resources=dns,page_rule

I would get the following error:

Incompatible API version with plugin. Plugin version: 6, Client versions: [5]

Details:
Using terraformer v0.8.24 with Terraform v1.5.4 and cloudflare provider v4.11.0

@noudAndi
Copy link

noudAndi commented Aug 22, 2023

I get the same error for terraformer v0.8.24 with Terraform v1.5.5 and cloudflare provider v4.12.0

2023/08/22 15:11:34 Incompatible API version with plugin. Plugin version: 6, Client versions: [5]

@thefourcraft
Copy link

I'm facing the same issue when importing Cloudflare resources using Terraformer.

Environment:

  • Terraform Version: v1.5.6
  • Cloudflare Provider Version: v4.13.0
  • Terraformer Version: v0.8.24
  • Operating System: macOS (darwin_arm64)

Steps to Reproduce:

  1. Set up Cloudflare environment variables (CLOUDFLARE_API_KEY, CLOUDFLARE_EMAIL, CLOUDFLARE_ACCOUNT_ID)
  2. Initialize Terraform using terraform init
  3. Run terraformer import cloudflare --resources=firewall,dns

Expected Result:

Terraformer should successfully import the Cloudflare resources.

Actual Result:

I receive the following error message:

Incompatible API version with plugin. Plugin version: 6, Client versions: [5]

Additional Information:

  • I've tried clearing the Terraform plugin cache.
  • I've explicitly defined the required Terraform and Cloudflare provider versions in my main.tf.

@Nullreff
Copy link

Nullreff commented Aug 29, 2023

Fixed this by temporarily downgrading to version 3.12.2 of the cloudflare provider. Later releases use API version 6 which isn't compatible with version 5.

@GangGreenTemperTatum
Copy link

Also experiencing the same issue, the above worked for me:

Fixed this by temporarily downgrading to version 3.12.2 of the cloudflare provider. Later releases use API version 6 which isn't compatible with version 5.

  • Created a provider.tf
terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "3.12.2"
    }
  }
}
% tf init                                      

Initializing the backend...

Initializing provider plugins...
- Finding cloudflare/cloudflare versions matching "3.12.2"...
- Installing cloudflare/cloudflare v3.12.2...
- Installed cloudflare/cloudflare v3.12.2 (signed by a HashiCorp partner, key ID DE413CEC881C3283)

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!
% terraformer version
Terraformer v0.8.24
% terraformer import cloudflare --resources="*"

Here It appears that it's v4.13.0 that switched the protocol plugin version and isn't supported. The cloudflare provider is using the terraform plugin library version 6, and terraformer has not been updated to handle that yet.. does anyone know when this is going to be?

@rodolfobandeira
Copy link
Contributor

rodolfobandeira commented Sep 4, 2023

My guess is that people are using the https://github.com/cloudflare/cf-terraforming project nowadays, which left this part of the Terraformer project a bit behind on support.

@pataquets
Copy link

Same here, confirming:

$ terraform version
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/cloudflare/cloudflare v4.14.0
$ terraformer-all version
Terraformer v0.8.24
$ terraformer-all import cloudflare --resources=dns
2023/09/11 23:47:20 Incompatible API version with plugin. Plugin version: 6, Client versions: [5]

I'm working around it by using cloudflare/cf-terraforming.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 12, 2023
@o6uoq
Copy link

o6uoq commented Nov 12, 2023

Pinning Cloudflare Terraform provider to 3.32.0 and no more recent worked for me.

This is due to this commit, explictly this line.

@github-actions github-actions bot removed the Stale label Nov 13, 2023
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 12, 2024
@pataquets
Copy link

Issue still stands.
@sergeylanzman: care to remove the "Stale" label? This forces people to add no-value/noise comments just to keep just this issue open.

@github-actions github-actions bot removed the Stale label Jan 15, 2024
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 18, 2024
@frankpengau
Copy link
Author

I believe the issue still exists, can this issue not be closed?

@github-actions github-actions bot removed the Stale label Mar 21, 2024
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 22, 2024
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
@pataquets
Copy link

Since provider it's broken and looks like people are already using other tools, I've filed #1883.
BTW, if you need IaC for CF DNS-only resources as it's my case, I'm adding the tool I'm using now DNSControl to the alternatives shared by others.

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

No branches or pull requests

8 participants