terraform-provider-confluent: Error when provisioning schema with 1.32.0 version

Hello! I am getting the error during terraform plan:

[DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0 args=[.terraform/providers/registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0]

Error: failed to read provider configuration schema for registry.terraform.io/confluentinc/confluent: failed to instantiate provider "registry.terraform.io/confluentinc/confluent" to obtain schema: fork/exec .terraform/providers/registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0: no such file or directory

terraform {
  required_providers {
    confluent = {
      source  = "confluentinc/confluent"
      version = "1.32.0"
    }
  }
}

I’ve checked exactly the same code specifying versions 1.29.0, 1.30.0, 1.31.0 and it worked smoothly.

Does the latest version require a specific version of Terraform? I used 1.3.7.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 15

Most upvoted comments

Hi, I work with @msillence above. In our case, there is no cache to clear; we always run from a fresh Docker image in CI.

I believe this is caused by 1.32.0 being dynamically compiled, compared to earlier versions using static compilation. The plugin build works on my full-fat Ubuntu VM but not in the minimal hashicorp/terraform containers we use for building.

The following tested in the docker.io/hashicorp/terraform:1.3.9 container with my local plugin cache mounted. (The 1.26.0 lines are comparison - this is the next newest version I had installed.)

# 1.26.0 is a static build
/opt/terraform # file ./registry.terraform.io/confluentinc/confluent/1.26.0/linux_amd64/terraform-provider-confluent_1.26.0
./registry.terraform.io/confluentinc/confluent/1.26.0/linux_amd64/terraform-provider-confluent_1.26.0: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=iB8wxwsc9_GQkJAQweiI/sNTYadFUerkXQA7EbMYW/zCQWVpvDfC-92AxJ1LJG/zl9qErVjwmLW_L-f7byS, stripped

# 1.26.0 runs within the container
/opt/terraform # ./registry.terraform.io/confluentinc/confluent/1.26.0/linux_amd64/terraform-provider-confluent_1.26.0
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically

# 1.32.0 is a dynamic build
/opt/terraform # file ./registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0
./registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=8SfNWb1Abn_y718BUN-I/PH1ZOJTKh7G-G89wQMVi/7pnMTwFFJzGpJwJM40fD/vwMzK5ZvGUHoFFCvKApk, stripped

# Its given interpreter is missing
/opt/terraform # ls /lib64/ld-linux-x86-64.so.2
ls: /lib64/ld-linux-x86-64.so.2: No such file or directory

# And so it cannot run
/opt/terraform # ./registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0
/bin/sh: ./registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0: not found

# We can install its dependency in the container...
/opt/terraform # apk add --no-cache libc6-compat
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz
(1/1) Installing libc6-compat (1.2.3-r4)
OK: 30 MiB in 35 packages

# ...which is now present...
/opt/terraform # ls /lib64/ld-linux-x86-64.so.2
/lib64/ld-linux-x86-64.so.2

# ...but we seem to have moved on to another problem.
/opt/terraform # ./registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0
Error relocating ./registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0: __vfprintf_chk: symbol not found
Error relocating ./registry.terraform.io/confluentinc/confluent/1.32.0/linux_amd64/terraform-provider-confluent_1.32.0: __fprintf_chk: symbol not found

It is not clear which further libraries would be required to make this version work. From our point of view, it would be very helpful to return to a static build, or something which works with the official Terraform container.

Sure - I use podman but the following should also work for docker. (I’m mounting my plugin cache here - depending on how Terraform is configured, you might want to mount something else.)

podman run -it --rm --name tftest -v ~/.terraform.d/plugin-cache:/opt/terraform --entrypoint=/bin/sh docker.io/hashicorp/terraform:1.3.9

To be able to run the file tests, you would have to run within the container:

apk --no-cache add file

I’ve run the same checks against plugin version 1.34.0 and this seems to execute happily in the container now. Many thanks!

/opt/terraform # file ./registry.terraform.io/confluentinc/confluent/1.34.0/linux_amd64/terraform-provider-confluent_1.34.0
./registry.terraform.io/confluentinc/confluent/1.34.0/linux_amd64/terraform-provider-confluent_1.34.0: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=vnStJZwNkZ380iAPm52k/yv2-9UX9VfyGt8y3TWIX/97PaQrhSGM5qVQRKUhn7/2BN2hZN5X6Sgqdaj58Wy, stripped
/opt/terraform # ./registry.terraform.io/confluentinc/confluent/1.34.0/linux_amd64/terraform-provider-confluent_1.34.0
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically

👋 @petrkarytka @wahlfeld10x @neil-williamson thanks again for helping out with this issue!

From our point of view, it would be very helpful to return to a static build

As discussed, we returned to a static build in the latest release of TF provider (1.33.0).

Let me know if that helps!

Seeing this issue as well. We’re running 100s of TF jobs and use 10+ providers but this provider is the only one failing with this exact issue. Timeframe when the issue began is also the same as OP.

Thanks for the analysis @neil-williamson and others!

From our point of view, it would be very helpful to return to a static build

We’ll try to see whether we can deploy an easy fix otherwise we’ll roll back these changes in the next release of TF Provider.

@linouk23 This is not my case. I was trying to deploy from scratch when got the error.

Hi,

We’re experiencing the same issue and also using terraform 1.3.7

I tried upgrading to terraform 1.3.9 and it still fails

pinning the confluent module to <1.32 works